msm: display: plane alpha support
Clean up the blending rule to follow blend_op set from hwc.
Use modulate alpha for plane alpha when it is not 0xff.
Keep backward compatibility if blend_op is not set.
Change-Id: I02fd3c3c7b5ace2e6eec22b2db0284161404a0fc
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
diff --git a/include/linux/msm_mdp.h b/include/linux/msm_mdp.h
index ff2f38a..394394b 100644
--- a/include/linux/msm_mdp.h
+++ b/include/linux/msm_mdp.h
@@ -350,6 +350,14 @@
struct mdp_sharp_cfg sharp_cfg;
};
+enum {
+ BLEND_OP_NOT_DEFINED = 0,
+ BLEND_OP_OPAQUE,
+ BLEND_OP_PREMULTIPLIED,
+ BLEND_OP_COVERAGE,
+ BLEND_OP_MAX,
+};
+
struct mdp_overlay {
struct msmfb_img src;
struct mdp_rect src_rect;
@@ -358,6 +366,7 @@
uint32_t is_fg; /* control alpha & transp */
uint32_t alpha;
uint32_t transp_mask;
+ uint32_t blend_op;
uint32_t flags;
uint32_t id;
uint32_t user_data[8];