Merge "mdss: support for solid fill with color specified by HAL"
diff --git a/drivers/video/msm/mdss/mdp3_ppp.c b/drivers/video/msm/mdss/mdp3_ppp.c
index 069d021..83787c3 100644
--- a/drivers/video/msm/mdss/mdp3_ppp.c
+++ b/drivers/video/msm/mdss/mdp3_ppp.c
@@ -36,7 +36,6 @@
#define MDP_PPP_MAX_BPP 4
#define MDP_PPP_DYNAMIC_FACTOR 3
#define MDP_PPP_MAX_READ_WRITE 3
-#define MDP_SOLID_FILL_COLOR 0x0
#define ENABLE_SOLID_FILL 0x2
#define DISABLE_SOLID_FILL 0x0
@@ -403,7 +402,7 @@
MDP3_REG_WRITE(0x10144, 0);
MDP3_REG_WRITE(0x10148, 0);
MDP3_REG_WRITE(MDP3_TFETCH_FILL_COLOR,
- MDP_SOLID_FILL_COLOR);
+ blit_op->solid_fill_color);
MDP3_REG_WRITE(MDP3_TFETCH_SOLID_FILL,
ENABLE_SOLID_FILL);
} else {
@@ -522,6 +521,10 @@
blit_op->src.color_fmt = MDP_RGBX_8888;
if (blit_op->dst.color_fmt == MDP_RGBA_8888)
blit_op->dst.color_fmt = MDP_RGBX_8888;
+ blit_op->solid_fill_color = (req->const_color.g & 0xFF)|
+ (req->const_color.b & 0xFF) << 8 |
+ (req->const_color.r & 0xFF) << 16 |
+ (req->const_color.alpha & 0xFF) << 24;
} else {
blit_op->solid_fill = false;
}
diff --git a/drivers/video/msm/mdss/mdp3_ppp.h b/drivers/video/msm/mdss/mdp3_ppp.h
index 7dbe44e..9753e94 100644
--- a/drivers/video/msm/mdss/mdp3_ppp.h
+++ b/drivers/video/msm/mdss/mdp3_ppp.h
@@ -332,6 +332,7 @@
struct ppp_img_desc bg;
struct ppp_blend blend;
uint32_t mdp_op; /* Operations */
+ uint32_t solid_fill_color;
bool solid_fill;
};
diff --git a/include/linux/msm_mdp.h b/include/linux/msm_mdp.h
index 0ecf0fa..3425386 100644
--- a/include/linux/msm_mdp.h
+++ b/include/linux/msm_mdp.h
@@ -255,11 +255,19 @@
#define MDP_BLIT_REQ_VERSION 2
+struct color {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t alpha;
+};
+
struct mdp_blit_req {
struct mdp_img src;
struct mdp_img dst;
struct mdp_rect src_rect;
struct mdp_rect dst_rect;
+ struct color const_color;
uint32_t alpha;
uint32_t transp_mask;
uint32_t flags;