diff mbox

[media] exynos-gsc: swap cb/cr only for 3 plane formats

Message ID 1387529973-6123-1-git-send-email-arun.kk@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arun Kumar K Dec. 20, 2013, 8:59 a.m. UTC
From: Prathyush K <prathyush.k@samsung.com>

The address for cb/cr needs to be swapped for 3 plane formats like
YVU420 and YVU420M. If these address gets swapped for other formats like
NV21, it results in passing a NULL dma address to gscalar (which will
result in a PAGE FAULT if sysmmu is enabled).

E.g. For NV21, the dma_address are (Y, CbCr, 0) and we swap them (Y, 0,
CbCr) which is incorrect.

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Shirish S <s.shirish@samsung.com>
Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
---
 drivers/media/platform/exynos-gsc/gsc-core.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 9d0cc04..ff851fc 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -844,11 +844,7 @@  int gsc_prepare_addr(struct gsc_ctx *ctx, struct vb2_buffer *vb,
 			addr->cr = vb2_dma_contig_plane_dma_addr(vb, 2);
 	}
 
-	if ((frame->fmt->pixelformat == V4L2_PIX_FMT_VYUY) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVYU) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_NV61) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_NV21) ||
+	if ((frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) ||
 		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420M))
 		swap(addr->cb, addr->cr);