msm_fb: Add runtime mixer-2 output format configuration
Set mixer-2 output format using metadata_ioctl before
queuing buffer for write back from mdp. Default output
format is NV12. Mixer-2 support RGB_565, RGB_888,
ARGB_8888, XRGB_888 and NV12 as output format.
Change-Id: I34d307e65cbd8e9e3356c8b5928edca42624d261
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
diff --git a/include/linux/msm_mdp.h b/include/linux/msm_mdp.h
index 404ea52..45bc0ea 100644
--- a/include/linux/msm_mdp.h
+++ b/include/linux/msm_mdp.h
@@ -564,6 +564,15 @@
mdp_op_max,
};
+enum {
+ WB_FORMAT_NV12,
+ WB_FORMAT_RGB_565,
+ WB_FORMAT_RGB_888,
+ WB_FORMAT_xRGB_8888,
+ WB_FORMAT_ARGB_8888,
+ WB_FORMAT_ARGB_8888_INPUT_ALPHA /* Need to support */
+};
+
struct msmfb_mdp_pp {
uint32_t op;
union {
@@ -585,6 +594,7 @@
metadata_op_base_blend,
metadata_op_frame_rate,
metadata_op_vic,
+ metadata_op_wb_format,
metadata_op_max
};
@@ -592,11 +602,17 @@
uint32_t is_premultiplied;
};
+struct mdp_mixer_cfg {
+ uint32_t writeback_format;
+ uint32_t alpha;
+};
+
struct msmfb_metadata {
uint32_t op;
uint32_t flags;
union {
struct mdp_blend_cfg blend_cfg;
+ struct mdp_mixer_cfg mixer_cfg;
uint32_t panel_frame_rate;
uint32_t video_info_code;
} data;