From 8dd060c8c3bd01495604b3c3895d5d2aa034d632 Mon Sep 17 00:00:00 2001 From: Fancy Fang Date: Fri, 29 Nov 2013 18:37:45 +0800 Subject: [PATCH] ENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P When the s0 format is PXP_PIX_FMT_YUV422P, the s0 pitch and U/V buffer address cannot be set correctly. Signed-off-by: Fancy Fang --- drivers/dma/pxp/pxp_dma_v2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c index a7c73f90c0e7..82a80fb51baa 100644 --- a/drivers/dma/pxp/pxp_dma_v2.c +++ b/drivers/dma/pxp/pxp_dma_v2.c @@ -900,9 +900,12 @@ static void pxp_set_s0buf(struct pxps *pxp) __raw_writel(Y1, pxp->base + HW_PXP_PS_BUF); if ((s0_params->pixel_fmt == PXP_PIX_FMT_YUV420P) || (s0_params->pixel_fmt == PXP_PIX_FMT_YVU420P) || - (s0_params->pixel_fmt == PXP_PIX_FMT_GREY)) { + (s0_params->pixel_fmt == PXP_PIX_FMT_GREY) || + (s0_params->pixel_fmt == PXP_PIX_FMT_YUV422P)) { /* Set to 1 if YUV format is 4:2:2 rather than 4:2:0 */ int s = 2; + if (s0_params->pixel_fmt == PXP_PIX_FMT_YUV422P) + s = 1; offset = proc_data->srect.top * s0_params->width / 4 + proc_data->srect.left / 2; @@ -936,7 +939,8 @@ static void pxp_set_s0buf(struct pxps *pxp) s0_params->pixel_fmt == PXP_PIX_FMT_NV12 || s0_params->pixel_fmt == PXP_PIX_FMT_NV21 || s0_params->pixel_fmt == PXP_PIX_FMT_NV16 || - s0_params->pixel_fmt == PXP_PIX_FMT_NV61) { + s0_params->pixel_fmt == PXP_PIX_FMT_NV61 || + s0_params->pixel_fmt == PXP_PIX_FMT_YUV422P) { __raw_writel(pitch, pxp->base + HW_PXP_PS_PITCH); } else if (s0_params->pixel_fmt == PXP_PIX_FMT_GY04) -- 2.39.5