]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00294114 PXP: correct the PS U/V buffer settings when format is YVU420P
authorFancy Fang <B47543@freescale.com>
Wed, 8 Jan 2014 02:32:52 +0000 (10:32 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:53 +0000 (10:06 +0200)
The PXP itself doesn't support YVU420P default. But we can get the
U and V address according to the format when we try to set PS_UBUF
and PS_VBUF registers. So the YVU420P can be supported indirectly.

Signed-off-by: Fancy Fang <B47543@freescale.com>
drivers/dma/pxp/pxp_dma_v2.c

index 42f6f837707d8583b900954604a2ecbe8f667c8a..f4a70bdf2c366b9a168cdd5bfa30a0c1b12122a7 100644 (file)
@@ -919,8 +919,13 @@ static void pxp_set_s0buf(struct pxps *pxp)
                U1 = U + offset;
                V = U + ((s0_params->width * s0_params->height) >> s);
                V1 = V + offset;
-               __raw_writel(U1, pxp->base + HW_PXP_PS_UBUF);
-               __raw_writel(V1, pxp->base + HW_PXP_PS_VBUF);
+               if (s0_params->pixel_fmt == PXP_PIX_FMT_YVU420P) {
+                       __raw_writel(V1, pxp->base + HW_PXP_PS_UBUF);
+                       __raw_writel(U1, pxp->base + HW_PXP_PS_VBUF);
+               } else {
+                       __raw_writel(U1, pxp->base + HW_PXP_PS_UBUF);
+                       __raw_writel(V1, pxp->base + HW_PXP_PS_VBUF);
+               }
        } else if ((s0_params->pixel_fmt == PXP_PIX_FMT_NV12) ||
                 (s0_params->pixel_fmt == PXP_PIX_FMT_NV21) ||
                 (s0_params->pixel_fmt == PXP_PIX_FMT_NV16) ||