Hi All,
We are trying to support the RAW12 MIPI Camera sensor in our custom board which has iMX7 processor. We were successful in RAW8 and RAW10 support but we are facing some data loss issues in the RAW12 support which causes some artefacts in the output image. We have tried playing with the PIXEL_BIT and TWO_8BIT_SENSOR bits but nothing seems to work. sample images are shown below.
The Kernel snippet for the 12 Bit support is as below:
File: drivers/media/platform/mxc/subdev/mx6s_capture.c
+#define BIT_MIPI_DATA_FORMAT_RAW12 (0x2c << 25)
static struct mx6s_fmt formats[] = {
+{
+.name = "RAWRGB12 (SGRBG12)",
+.fourcc = V4L2_PIX_FMT_SGRBG12,
+.pixelformat = V4L2_PIX_FMT_SGRBG12,
+.mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12,
+.bpp = 2,
+}
static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
+case V4L2_PIX_FMT_SGRBG12:
+width = pix->width * 2;
+break;
cr1 &= ~BIT_GCLK_MODE;
+cr1 |= BIT_PIXEL_BIT;
+case V4L2_PIX_FMT_SGRBG12:
+cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
File: drivers/media/platform/mxc/subdev/mxc_mipi_csi.c
csis_pix_format mipi_csis_formats[] =
{
+.code = MEDIA_BUS_FMT_SGRBG12_1X12,
+.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
+.data_alignment = 16,
+}
Kindly, guide me in solving this issue.
Regards,
Sudar.K.B.
i think you may have read this. Seems you already have tried different settings.
Which camera are you using? Maybe the noise is from the camera side.