media: imx: imx7-media-csi: Add Y10 and Y12 formats support
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 10 Mar 2020 16:06:32 +0000 (17:06 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 12 Mar 2020 16:32:00 +0000 (17:32 +0100)
Support capturing the 10- and 12-bit greyscale formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@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/imx7-media-csi.c

index 3da1e79..a7771dd 100644 (file)
@@ -804,6 +804,14 @@ static int imx7_csi_configure(struct imx7_csi *csi)
        case V4L2_PIX_FMT_YUYV:
                cr18 |= BIT_MIPI_DATA_FORMAT_YUV422_8B;
                break;
+       case V4L2_PIX_FMT_Y10:
+               cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
+               cr1 |= BIT_PIXEL_BIT;
+               break;
+       case V4L2_PIX_FMT_Y12:
+               cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
+               cr1 |= BIT_PIXEL_BIT;
+               break;
        case V4L2_PIX_FMT_SBGGR8:
                cr18 |= BIT_MIPI_DATA_FORMAT_RAW8;
                break;