TC Chen

i.MX8M Mini support mipi-csi raw12 issue

Discussion created by TC Chen on Jul 26, 2020
Latest reply on Jul 29, 2020 by Wigros Sun

Dear Sir,

 

Our sensor is [AR0135] + [1280 x 960] + [2 mipi lane with 800 Mpbs each lane]

Cureently, we meet the following issues when we want to capture mipi-csi aw12 on i.MX8M Mini.

 

(A). Reference from NXP community:

[i.MX8M Mini] => imx8m mini mipi csi采图异常  => No success to capture raw10

[i.MX8M] => Confirmed support for RAW12 through 4-lane CSI-2 sensor on i.MX8M?  => Success to Capture raw12


(B). The case which we capture video image with "multiple sensor images"(分屏)

 

#modify "fsl-imx8mm-evk.dts"
data-lanes = <2>;
csis-hs-settle = <17>;
csis-clk-settle = <0>;

 

#modify "mxc_mipi_csi.c"
{
.code = MEDIA_BUS_FMT_SBGGR12_1X12,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
.data_alignment = 16,
},

 

#modify "mx6s_capture.c"
{
.name = "RAWRGB12 (SBGGR12)",
.fourcc = V4L2_PIX_FMT_SBGGR12,
.pixelformat = V4L2_PIX_FMT_SBGGR12,
.mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
.bpp = 2,
},

...................................................

...................................................

case V4L2_PIX_FMT_YUV32:
case V4L2_PIX_FMT_SBGGR8:
case V4L2_PIX_FMT_SBGGR12:
width = pix->width;
break;

 

@@Then, We get the image below:

 

 

However, if we modify "mx6s_capture.c"
{
.name = "RAWRGB12 (SBGGR12)",
.fourcc = V4L2_PIX_FMT_SBGGR12,
.pixelformat = V4L2_PIX_FMT_SBGGR12,
.mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
.bpp = 1,
},

 

@@We get the image below:

 

 

 

(C).The case which we capture video image with with heavily noise:

 

#modify "fsl-imx8mm-evk.dts"
&csi1_bridge {
fsl,mipi-mode;
fsl,two-8bit-sensor-mode;
status = "okay";
.......................................
};

#modify "mx6s_capture.c"
case V4L2_PIX_FMT_SBGGR12://RAW12
cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
break;

 

@@We get the image below:

 

 

(D). RAW12 Capturer and Player

We use "yavta" to capture raw12 video from our board
#yavta -c100 -p -fSBGGR12 -s 1280x960 -F/home/root/output.raw /dev/video0

And, uisng ffplay to play raw12 video in PC.
#ffplay.exe -video_size 1280x960 -pixel_format bayer_bggr16be output.raw

 

 

(E). Our Question:

 

(1). As we know, i.MX8M is different from i,MX7D, but i.MX8M-Mini is the same as imx7D. So, we want to know whether the configuration between i.MX8M and i.MX8M-Mini is the same ? When we set configuration as (C) (fsl,two-8bit-sensor-mode + BIT_MIPI_DATA_FORMAT_RAW12), the result seems more negative with heavily noise.

 

(2). How to solve "multiple sensor images"(分屏) in (B) ? It may be happened in i.MX8M Mini, not in i.MX8M.

 

(3). Do you have suggestion which tool can capture raw12 video ? And, which tool can play raw12 video in PC ?

 

Thanks a lot for your help.

 

Sincerely,

TC.Chou

Outcomes