summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShivaraj Shetty <shivaraj@codeaurora.org>2013-10-22 18:43:17 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:23:16 -0700
commit2b1b34be2447fdc2136483a221cf39627d9c8e62 (patch)
treeb176e8e05d87f7656dfd8cc551fa83f861f8725b
parent36608696322d382f262539fd4e41ce0424420a5c (diff)
mdss: support for solid fill with color specified by HAL
This patch provides the support for filling the frame buffer with any color specified by the HAL. Change-Id: I9414764f858e309d35967430ef4e6f83d5e42e3e Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdp3_ppp.c7
-rw-r--r--drivers/video/fbdev/msm/mdp3_ppp.h1
-rw-r--r--include/uapi/linux/msm_mdp.h8
3 files changed, 14 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdp3_ppp.c b/drivers/video/fbdev/msm/mdp3_ppp.c
index deae57922d4b..c8d4cd1f4c58 100644
--- a/drivers/video/fbdev/msm/mdp3_ppp.c
+++ b/drivers/video/fbdev/msm/mdp3_ppp.c
@@ -38,7 +38,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
@@ -405,7 +404,7 @@ void mdp3_start_ppp(struct ppp_blit_op *blit_op)
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 {
@@ -524,6 +523,10 @@ static void mdp3_ppp_process_req(struct ppp_blit_op *blit_op,
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/fbdev/msm/mdp3_ppp.h b/drivers/video/fbdev/msm/mdp3_ppp.h
index 7dbe44e50703..9753e947f890 100644
--- a/drivers/video/fbdev/msm/mdp3_ppp.h
+++ b/drivers/video/fbdev/msm/mdp3_ppp.h
@@ -332,6 +332,7 @@ struct ppp_blit_op {
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/uapi/linux/msm_mdp.h b/include/uapi/linux/msm_mdp.h
index 074754c96162..9964ac6a31d1 100644
--- a/include/uapi/linux/msm_mdp.h
+++ b/include/uapi/linux/msm_mdp.h
@@ -245,11 +245,19 @@ struct mdp_csc {
#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;