msm: mdss: add support for NV21_VENUS in MDP
Earlier, camera preview buffers were of NV21(YCrCb_420_SP) and the video buffers were of NV12_VENUS(YCbCr_420_SP_VENUS) format. Now that the video encoder has support for NV21, both the camera and video buffers can be of NV21_VENUS (YCrCb_420_SP_VENUS) format. If the preview and video buffer sizes are the same, CPP double pass to generate video and preview buffers can be avoided and the buffers can now be generated within a single pass with CPP duplication thereby saving power. Add support in kernel for NV12_VENUS format to achieve the same. Change-Id: Ia0ee0155faaa5ba6d5cafbc0529428734eaf37e5 Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
This commit is contained in:
parent
db39cdcb68
commit
a8e138b0aa
4 changed files with 10 additions and 3 deletions
|
@ -304,6 +304,8 @@ static struct mdss_mdp_format_params mdss_mdp_format_map[] = {
|
|||
MDSS_MDP_CHROMA_420, VALID_ROT_WB_FORMAT, C1_B_Cb, C2_R_Cr),
|
||||
FMT_YUV_PSEUDO(MDP_Y_CBCR_H2V2_VENUS, MDSS_MDP_FETCH_LINEAR,
|
||||
MDSS_MDP_CHROMA_420, 0, C1_B_Cb, C2_R_Cr),
|
||||
FMT_YUV_PSEUDO(MDP_Y_CRCB_H2V2_VENUS, MDSS_MDP_FETCH_LINEAR,
|
||||
MDSS_MDP_CHROMA_420, 0, C2_R_Cr, C1_B_Cb),
|
||||
|
||||
FMT_YUV_PLANR(MDP_Y_CB_CR_H2V2, MDSS_MDP_FETCH_LINEAR,
|
||||
MDSS_MDP_CHROMA_420, VALID_ROT_WB_FORMAT, C2_R_Cr, C1_B_Cb),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -68,6 +68,7 @@ static inline u32 mdss_mdp_get_rotator_dst_format(u32 in_format, u32 in_rot90,
|
|||
else
|
||||
return in_format;
|
||||
case MDP_Y_CBCR_H2V2_VENUS:
|
||||
case MDP_Y_CRCB_H2V2_VENUS:
|
||||
case MDP_Y_CBCR_H2V2:
|
||||
if (in_rot90)
|
||||
return MDP_Y_CRCB_H2V2;
|
||||
|
|
|
@ -610,8 +610,11 @@ int mdss_mdp_get_plane_sizes(struct mdss_mdp_format_params *fmt, u32 w, u32 h,
|
|||
ps->num_planes = 1;
|
||||
ps->plane_size[0] = w * h * bpp;
|
||||
ps->ystride[0] = w * bpp;
|
||||
} else if (fmt->format == MDP_Y_CBCR_H2V2_VENUS) {
|
||||
int cf = COLOR_FMT_NV12;
|
||||
} else if (fmt->format == MDP_Y_CBCR_H2V2_VENUS ||
|
||||
fmt->format == MDP_Y_CRCB_H2V2_VENUS) {
|
||||
|
||||
int cf = (fmt->format == MDP_Y_CBCR_H2V2_VENUS) ?
|
||||
COLOR_FMT_NV12 : COLOR_FMT_NV21;
|
||||
ps->num_planes = 2;
|
||||
ps->ystride[0] = VENUS_Y_STRIDE(cf, w);
|
||||
ps->ystride[1] = VENUS_UV_STRIDE(cf, w);
|
||||
|
|
|
@ -175,6 +175,7 @@ enum {
|
|||
MDP_RGBA_8888_UBWC,
|
||||
MDP_Y_CBCR_H2V2_UBWC,
|
||||
MDP_RGBX_8888_UBWC,
|
||||
MDP_Y_CRCB_H2V2_VENUS,
|
||||
MDP_IMGTYPE_LIMIT,
|
||||
MDP_RGB_BORDERFILL, /* border fill pipe */
|
||||
MDP_FB_FORMAT = MDP_IMGTYPE2_START, /* framebuffer format */
|
||||
|
|
Loading…
Add table
Reference in a new issue