Thanks for your response.
Yesterday I was reading the datasheet IMX8DQXPRM.pdf, page 4.925, and I changed the .depth = { 10 } to .depth = { 16 } on the imx8-isi-cap.c, as you have pointed, this change have increased the output buffer to 16bits (10bits RAW and 6bits padding with 0), that is nice .
But unfortunately, the issue still there, I have one byte 0x00 and the other byte with data.
I have attached my changes in the Linux kernel as a patch file.
I am using a Toradex board and I am working on the Toradex branch toradex_4.14-2.3.x-imx (git://git.toradex.com/linux-toradex.git).
Also, I have included here some debug message from the device drivers when I running an application to read images using V4L2:
[ 81.125584] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 87.843953] drivers/media/platform/imx8/mxc-isi-cap.c, mxc_isi_source_fmt_init, 989 CONFIG_VIDEO_ECAM not configured
[ 87.862943] drivers/media/platform/imx8/mxc-isi-hw.c, mxc_isi_channel_set_csc, 300 dst_fmt->color = 0x000C
[ 87.872730] drivers/media/platform/imx8/mxc-isi-hw.c, mxc_isi_channel_set_csc, 306 is using V4L2_PIX_FMT_SGRBG10
[ 87.882993] drivers/media/platform/imx8/mxc-isi-hw.c, mxc_isi_channel_set_csc, 325, bypass csc
[ 87.891645] input fmt RGB4
[ 87.894394] output fmt BA10
[ 87.897192] drivers/media/platform/imx8/mxc-isi-hw.c, mxc_isi_channel_config, 614, CHNL_CTRL_CHNL_BYPASS_ENABLE=1
[ 88.258740] drivers/media/platform/imx8/mxc-mipi-csi2.c, mxc_mipi_csi2_hc_config, 240, MIPI Lane = 4
[ 88.268003] drivers/media/platform/imx8/mxc-mipi-csi2.c, mxc_mipi_csi2_hc_config, 254, Virtual Channel = 0
[ 88.277737] drivers/media/platform/imx8/mxc-mipi-csi2.c, mxc_mipi_csi2_csr_config, 207, CSI2SS_DATA_TYPE = 0xFFF7FFFF
[ 88.288388] drivers/media/platform/imx8/mxc-mipi-csi2.c, mxc_mipi_csi2_csr_config, 219, hs_settle = 6
[ 89.371574] i.mx8-hdp 56268000.hdmi: No EDID function, use default video mode
[ 89.380368] i.mx8-hdp 56268000.hdmi: No EDID function, use default video mode
I am trying to figure out where the "input fmt" was set as RGB4, and if this is the correct for RAW10.
I am thinking the "output fmt" is correct as BA10 "RAW10", but the Pixel Link connection between the MIPI CSI-2 [1] and the ISI is not correct.
I will continue to read the datasheet and device drivers.
My best regards,
Gabriel