msm_fb: display: Add support to YCBYCR MDP format

Add support of MDP_YCBYCR_H2V1 interleaved YUV format to MDP
for a-family targets.

Change-Id: I5afb84a95693d1ced114152364782a10c4d56bc2
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
This commit is contained in:
Mayank Chopra 2013-09-06 16:07:59 +05:30 committed by Artem Borisov
parent 46076762d6
commit e92f596664
2 changed files with 15 additions and 4 deletions

View file

@ -875,6 +875,7 @@ static void mdp4_overlay_vg_get_src_offset(struct mdp4_overlay_pipe *pipe,
(pipe->src_y * pipe->srcp1_ystride);
break;
case MDP_YCBYCR_H2V1:
case MDP_YCRYCB_H2V1:
if (pipe->src_x & 0x1)
pipe->src_x += 1;
@ -1074,6 +1075,7 @@ int mdp4_overlay_format2type(uint32 format)
case MDP_BGRA_8888:
case MDP_RGBX_8888:
return OVERLAY_TYPE_RGB;
case MDP_YCBYCR_H2V1:
case MDP_YCRYCB_H2V1:
case MDP_Y_CRCB_H2V1:
case MDP_Y_CBCR_H2V1:
@ -1250,6 +1252,7 @@ int mdp4_overlay_format2pipe(struct mdp4_overlay_pipe *pipe)
pipe->bpp = 4; /* 4 bpp */
pipe->chroma_sample = MDP4_CHROMA_RGB;
break;
case MDP_YCBYCR_H2V1:
case MDP_YCRYCB_H2V1:
pipe->frame_format = MDP4_FRAME_FORMAT_LINEAR;
pipe->fetch_plane = OVERLAY_PLANE_INTERLEAVED;
@ -1261,10 +1264,17 @@ int mdp4_overlay_format2pipe(struct mdp4_overlay_pipe *pipe)
pipe->unpack_tight = 1;
pipe->unpack_align_msb = 0;
pipe->unpack_count = 3;
pipe->element3 = C0_G_Y; /* G */
pipe->element2 = C2_R_Cr; /* R */
pipe->element1 = C0_G_Y; /* G */
pipe->element0 = C1_B_Cb; /* B */
if (pipe->src_format == MDP_YCRYCB_H2V1) {
pipe->element3 = C0_G_Y; /* G */
pipe->element2 = C2_R_Cr; /* R */
pipe->element1 = C0_G_Y; /* G */
pipe->element0 = C1_B_Cb; /* B */
} else if (pipe->src_format == MDP_YCBYCR_H2V1) {
pipe->element3 = C0_G_Y; /* G */
pipe->element2 = C1_B_Cb; /* B */
pipe->element1 = C0_G_Y; /* G */
pipe->element0 = C2_R_Cr; /* R */
}
pipe->bpp = 2; /* 2 bpp */
pipe->chroma_sample = MDP4_CHROMA_H2V1;
break;

View file

@ -94,6 +94,7 @@ enum {
MDP_ARGB_8888, /* ARGB 888 */
MDP_RGB_888, /* RGB 888 planer */
MDP_Y_CRCB_H2V2, /* Y and CrCb, pseudo planer w/ Cr is in MSB */
MDP_YCBYCR_H2V1, /* YCbYCr interleave */
MDP_YCRYCB_H2V1, /* YCrYCb interleave */
MDP_Y_CRCB_H2V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */
MDP_Y_CBCR_H2V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */