Hello @joanxie
Thank You for your reply.
Yes, I know the current ISI driver does not support RAW10 data.
I have added RAW10 Format as per below. Could you please review it?
In mxc-isi-cap.c( original , imx8-isi-cap.c) file,
struct mxc_isi_fmt mxc_isi_out_formats[] = {
{
.name = "RGB565",
.fourcc = V4L2_PIX_FMT_RGB565,
.depth = { 16 },
.color = MXC_ISI_OUT_FMT_RGB565,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB565_1X16,
}, {
.name = "RGB24",
.fourcc = V4L2_PIX_FMT_RGB24,
.depth = { 24 },
.color = MXC_ISI_OUT_FMT_BGR32P,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
}, {
.name = "BGR24",
.fourcc = V4L2_PIX_FMT_BGR24,
.depth = { 24 },
.color = MXC_ISI_OUT_FMT_RGB32P,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_BGR888_1X24,
}, {
.name = "YUYV-16",
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = { 16 },
.color = MXC_ISI_OUT_FMT_YUV422_1P8P,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_YUYV8_1X16,
}, {
.name = "YUV32 (X-Y-U-V)",
.fourcc = V4L2_PIX_FMT_YUV32,
.depth = { 32 },
.color = MXC_ISI_OUT_FMT_YUV444_1P8,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_AYUV8_1X32,
}, {
.name = "NV12 (YUYV)",
.fourcc = V4L2_PIX_FMT_NV12,
.depth = { 8, 8 },
.color = MXC_ISI_OUT_FMT_YUV420_2P8P,
.memplanes = 2,
.colplanes = 2,
.mbus_code = MEDIA_BUS_FMT_YUYV8_1X16,
}, {
.name = "YUV444M (Y-U-V)",
.fourcc = V4L2_PIX_FMT_YUV444M,
.depth = { 8, 8, 8 },
.color = MXC_ISI_OUT_FMT_YUV444_3P8P,
.memplanes = 3,
.colplanes = 3,
.mbus_code = MEDIA_BUS_FMT_YUV8_1X24,
}, {
.name = "xBGR32",
.fourcc = V4L2_PIX_FMT_XBGR32,
.depth = { 32 },
.color = MXC_ISI_OUT_FMT_XRGB32,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
}, {
.name = "ABGR32",
.fourcc = V4L2_PIX_FMT_ABGR32,
.depth = { 32 },
.color = MXC_ISI_OUT_FMT_ARGB32,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
}, { //MS added
.name = "BA10",
.fourcc = V4L2_PIX_FMT_SGRBG10,
.depth = { 16 },
.color = MXC_ISI_OUT_FMT_RAW10,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10,
}
};
/*
* Pixel link input format
*/
struct mxc_isi_fmt mxc_isi_src_formats[] = {
{
.name = "RGB32",
.fourcc = V4L2_PIX_FMT_RGB32,
.depth = { 32 },
.memplanes = 1,
.colplanes = 1,
}, {
.name = "YUV32 (X-Y-U-V)",
.fourcc = V4L2_PIX_FMT_YUV32,
.depth = { 32 },
.memplanes = 1,
.colplanes = 1,
}, { //MS added
.name = "SGRB10",
.fourcc = V4L2_PIX_FMT_SGRBG10,
.depth = { 16 },
.memplanes = 1,
.colplanes = 1,
}
};
In mxc-mipi-csi2-sam.c (original imx8-mipi-csi2-sam.c) file,
static const struct csis_pix_format mipi_csis_formats[] = {
{
.code = MEDIA_BUS_FMT_SGRBG10_1X10,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW10,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_YUYV8_2X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_RGB888_1X24,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RGB888,
.data_alignment = 24,
}, {
.code = MEDIA_BUS_FMT_UYVY8_2X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_VYUY8_2X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_SBGGR8_1X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW8,
.data_alignment = 8,
}, {
.code = MEDIA_BUS_FMT_SBGGR10_1X10,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW10,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_SGBRG10_1X10,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW10,
.data_alignment = 16,
/* }, {
.code = MEDIA_BUS_FMT_SGRBG10_1X10,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW10,
.data_alignment = 16, */
}, {
.code = MEDIA_BUS_FMT_SRGGB10_1X10,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW10,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_SBGGR12_1X12,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_SGBRG12_1X12,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_SGRBG12_1X12,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_SRGGB12_1X12,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
.data_alignment = 16,
},
};
and in mxc-isi-core.c (original imx8-isi-core.c) file, i have not set format.
could you please help me how i can added RAW10 format in imx8-isi-core.c file?
----------------------------------------------------------------------------------------------------------------------------
When 5MP data arrived (10.1 MB RAW Data file) Both ISI and MIPI interrupt is called correctly.
but When 5MP data does not arrive BOTH ISI and MIPI Interrupt is not executed, and I got zero frames from MIPI D PHY because I have read the MIPI register "Frame Counter (MIPI_CSI_FRAME_COUNTER_CH0)".
and can you please help me with how I can confirm that the output from ISI is correct or not?
I have checked with Size of the file and raw data bytes as per resolution and it correctly arrives when 5MP is run.
Waiting for your reply.
Thank You
Milav Soni