From: Fancy Fang Date: Fri, 29 Nov 2013 10:37:45 +0000 (+0800) Subject: ENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P X-Git-Tag: KARO-TX6-2014-07-10~121 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8dd060c8c3bd01495604b3c3895d5d2aa034d632;p=karo-tx-linux.git 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 --- 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)