AnsweredAssumed Answered

Camera Support For RAW10 Format

Question asked by vimal mano on Feb 4, 2019
Latest reply on Sep 10, 2019 by pranesh p

Hi,

I am using the following software packages

kernel version - 4.9.88

Yacto Distribution - Rocko

I need to connect the monochrome camera to IMX8M. The camera supports only RAW10 bit data so I made the following changes in kernel.

 

In mx6s_capture.c file  i add following under mx6s_configure_csi function

switch (csi_dev->fmt->pixelformat) {
case V4L2_PIX_FMT_YUV32:
case V4L2_PIX_FMT_SBGGR8:
width = pix->width;
break;
case V4L2_PIX_FMT_UYVY:
case V4L2_PIX_FMT_YUYV:
if (csi_dev->csi_mipi_mode == true)
width = pix->width;
else
/* For parallel 8-bit sensor input */
width = pix->width * 2;
break;
case V4L2_PIX_FMT_SBGGR10:
width = pix->width * 2;
break;
default:
pr_debug(" case not supported\n");
return -EINVAL;
}
csi_set_imagpara(csi_dev, width, pix->height);

if (csi_dev->csi_mipi_mode == true) {
cr1 = csi_read(csi_dev, CSI_CSICR1);
cr1 &= ~BIT_GCLK_MODE;
csi_write(csi_dev, cr1, CSI_CSICR1);

cr18 = csi_read(csi_dev, CSI_CSICR18);
cr18 &= BIT_MIPI_DATA_FORMAT_MASK;
cr18 |= BIT_DATA_FROM_MIPI;

switch (csi_dev->fmt->pixelformat) {
case V4L2_PIX_FMT_UYVY:
case V4L2_PIX_FMT_YUYV:
cr18 |= BIT_MIPI_DATA_FORMAT_YUV422_8B;
break;
case V4L2_PIX_FMT_SBGGR8:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW8;
break;
case V4L2_PIX_FMT_SBGGR10:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
break;
default:
pr_debug(" fmt not supported\n");
return -EINVAL;
}

csi_write(csi_dev, cr18, CSI_CSICR18);
}

 

After enable the support in kernel i can able to receive some image data but its corrupted and also i received 10 frames per second out of 60. so my question is

1.How the RAW10 format is arranged in buffer?

1.what is the default mipi clock in imx8m and how to change the mipi clock?

2.Did i miss anything to add in kernel to enable raw10 support?

 

Thanks in advance

Vimal.

Outcomes