media: imx: imx6-media-csi: Support clamping Y10 and Y12 to Y8
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 10 Mar 2020 16:06:31 +0000 (17:06 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 12 Mar 2020 16:31:45 +0000 (17:31 +0100)
10-bit and 12-bit greyscale input data to the CSI can be written as
8-bit data to memory. Support this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx-media-utils.c

index bc20fcc88267f04fdf8a5d60d562391714f845c2..fae981698c493d604fbeaa2fcefc7b0b13d435c7 100644 (file)
@@ -161,7 +161,11 @@ static const struct imx_media_pixfmt rgb_formats[] = {
                .bayer  = true,
        }, {
                .fourcc = V4L2_PIX_FMT_GREY,
-               .codes = {MEDIA_BUS_FMT_Y8_1X8},
+               .codes = {
+                       MEDIA_BUS_FMT_Y8_1X8,
+                       MEDIA_BUS_FMT_Y10_1X10,
+                       MEDIA_BUS_FMT_Y12_1X12,
+               },
                .cs     = IPUV3_COLORSPACE_RGB,
                .bpp    = 8,
                .bayer  = true,