media: rp1: cfe: Add a csi_dt value for 16bit formats
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Fri, 22 Dec 2023 11:53:52 +0000 (11:53 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:26 +0000 (11:35 +0000)
Raw 16bit formats didn't have a csi_dt value defined, which
presumably would trip the WARN_ON(!fmt->csi_dt); in
cfe_start_channel.

The value is defined in CSI2 v2.0 as 0x2e, so set it accordingly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/platform/raspberrypi/rp1_cfe/cfe_fmts.h

index 6b2690c..72516c9 100644 (file)
@@ -197,6 +197,7 @@ static const struct cfe_fmt formats[] = {
                .fourcc = V4L2_PIX_FMT_SBGGR16,
                .code = MEDIA_BUS_FMT_SBGGR16_1X16,
                .depth = 16,
+               .csi_dt = MIPI_CSI2_DT_RAW16,
                .flags = CFE_FORMAT_FLAG_FE_OUT,
                .remap = { V4L2_PIX_FMT_SBGGR16, V4L2_PIX_FMT_PISP_COMP1_BGGR },
        },
@@ -204,6 +205,7 @@ static const struct cfe_fmt formats[] = {
                .fourcc = V4L2_PIX_FMT_SGBRG16,
                .code = MEDIA_BUS_FMT_SGBRG16_1X16,
                .depth = 16,
+               .csi_dt = MIPI_CSI2_DT_RAW16,
                .flags = CFE_FORMAT_FLAG_FE_OUT,
                .remap = { V4L2_PIX_FMT_SGBRG16, V4L2_PIX_FMT_PISP_COMP1_GBRG },
        },
@@ -211,6 +213,7 @@ static const struct cfe_fmt formats[] = {
                .fourcc = V4L2_PIX_FMT_SGRBG16,
                .code = MEDIA_BUS_FMT_SGRBG16_1X16,
                .depth = 16,
+               .csi_dt = MIPI_CSI2_DT_RAW16,
                .flags = CFE_FORMAT_FLAG_FE_OUT,
                .remap = { V4L2_PIX_FMT_SGRBG16, V4L2_PIX_FMT_PISP_COMP1_GRBG },
        },
@@ -218,6 +221,7 @@ static const struct cfe_fmt formats[] = {
                .fourcc = V4L2_PIX_FMT_SRGGB16,
                .code = MEDIA_BUS_FMT_SRGGB16_1X16,
                .depth = 16,
+               .csi_dt = MIPI_CSI2_DT_RAW16,
                .flags = CFE_FORMAT_FLAG_FE_OUT,
                .remap = { V4L2_PIX_FMT_SRGGB16, V4L2_PIX_FMT_PISP_COMP1_RGGB },
        },
@@ -278,6 +282,7 @@ static const struct cfe_fmt formats[] = {
                .fourcc = V4L2_PIX_FMT_Y16,
                .code = MEDIA_BUS_FMT_Y16_1X16,
                .depth = 16,
+               .csi_dt = MIPI_CSI2_DT_RAW16,
                .flags = CFE_FORMAT_FLAG_FE_OUT,
        },
        {