]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P
authorFancy Fang <B47543@freescale.com>
Fri, 29 Nov 2013 10:37:45 +0000 (18:37 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:47 +0000 (10:06 +0200)
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 <B47543@freescale.com>
drivers/dma/pxp/pxp_dma_v2.c

index a7c73f90c0e7a8521b466ad3fe9ef0d9d73eeeb5..82a80fb51baaae78f6204d3a0a3dd5664fdd1d5d 100644 (file)
@@ -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)