Hi all,
I am facing a bit strange issue while capturing on RAW8 i.MX6Quad.
Actually, I am working with a Dart i.MX6 Evaluation Kit board and 2 sensors (OV5640 and OV9281) both cameras on RAW8 mode.
At first, I got timeout issues when trying to capture but that message was fixed after adding support to V4L2_PIX_FMT_GREY and IPU_PIX_FMT_GREY on IPU/v4l2_capture related files according to some post on this forum. Currently using V4L2_PIX_FMT_GREY format on the drivers to manage the RAW8 data, for some reason I still get the timeout message if I try to use BAYER data format V4L2_PIX_FMT_SRGGB8.
I can get a constant 60fps with OV9281 and 30 FPS with OV5640 using V4L2 utils but the images have a strange displacement of 64 extra bytes each 5 lines (for OV9281) and each 14 lines (for OV5640).
I am not sure why this is happening, the MIPI was configured to 2 lanes, RAW8 data type and MIPI CLK range for 400 Mhz.
This is the issue on OV9281
This is the test pattern.
Any help to understand this issue will be really appreciated.
Just in case, I am working with kernel version 4.9.88 Yocto Sumo.
Thanks.
In capture driver mx6s_capture.c, RAW8 data can be captured. see below. But the data with RAW8 is not handled. so your image was not normally displayed.
static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
{
....
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;
default:
pr_debug(" fmt not supported\n");
return -EINVAL;
}
csi_write(csi_dev, cr18, CSI_CSICR18);
....
}