]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00289648 mx6sl: v4l2 output: Add UYVY format as input format for v4l2
authorRobby Cai <R63905@freescale.com>
Tue, 26 Nov 2013 07:20:28 +0000 (15:20 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:46 +0000 (10:06 +0200)
This feature is easy for gstreamer to pipeline v4lsrc and v4lsink, since
camera output format can be set as UYVY in v4l2 capture driver, and PxP
will do the CSC from UYVY to RGB565 in v4l2 output driver for LCD display.

Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit d8f47ca83385f3e96ce457f35b69c4a7ac733a6e)

drivers/media/platform/mxc/output/mxc_pxp_v4l2.c

index d18043124b12cf3cc0b1d02c81153cca22daaced..98bbe83bcf63c46fbe2e8acc347eb169e3313c3b 100644 (file)
@@ -81,6 +81,11 @@ static struct pxp_data_format pxp_s0_formats[] = {
                .bpp = 2,
                .fourcc = V4L2_PIX_FMT_YUV422P,
                .colorspace = V4L2_COLORSPACE_JPEG,
+       }, {
+               .name = "UYVY",
+               .bpp = 2,
+               .fourcc = V4L2_PIX_FMT_UYVY,
+               .colorspace = V4L2_COLORSPACE_JPEG,
        },
 };
 
@@ -100,6 +105,8 @@ static unsigned int v4l2_fmt_to_pxp_fmt(u32 v4l2_pix_fmt)
                pxp_fmt = PXP_PIX_FMT_YUV420P;
        else if (v4l2_pix_fmt == V4L2_PIX_FMT_YUV422P)
                pxp_fmt = PXP_PIX_FMT_YUV422P;
+       else if (v4l2_pix_fmt == V4L2_PIX_FMT_UYVY)
+               pxp_fmt = PXP_PIX_FMT_UYVY;
 
        return pxp_fmt;
 }