Camera preview corruption on IMX8MP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Camera preview corruption on IMX8MP

1,943 Views
p_ashik
Contributor I

Hi team,
We are working on bringing up isx031 camera sensor with gmsl serializer-deserializer on IMX8MP evk.

We are able to get sensor output of 1920x1080 30fps YUV422 format(sensor data rate is 462mbps) with a GMSL o/p frequency of 600Mhz.
The command used is:

 

gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,pixelformat=YUYV ! videoconvert ! autovideosink

 

But the preview is corrupted as shown in the attached image(corrupt_image.jpg). Also attached image of actual scene (actual_image.jpg)and the csi error logs as well.(mipi_debug_log.txt)

Kindly let me know how to debug this issue further.

Below is the dts used for the camera,

isx031_mipi0: isx031_mipi@42 { 
                compatible = "isx031";
                reg = <0x42>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi0>;
                clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                clock-names = "xclk";
                assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
                assigned-clock-rates = <24000000>;
                csi_id = <0>;

                mclk = <24000000>;//isx031 mclk
                mclk_source = <0>;
                mipi_csi;
                status = "okay";


                port {
                        isx031_mipi_0_ep: endpoint {
                                remote-endpoint = <&mipi_csi0_ep>;
                                data-lanes = <1 2 3 4>;
                                clock-lanes = <0>;
                        };
                };
...           
&mipi_csi_0 {
        #address-cells = <1>;
        #size-cells = <0>;
        status = "okay";


        port@0 {
                reg = <0>;
                mipi_csi0_ep: endpoint {
                        remote-endpoint = <&isx031_mipi_0_ep>;
                        data-lanes = <4>;
                        csis-hs-settle = <13>;
                        csis-clk-settle = <0>;
                        csis-wclk;
                };
        };
};



Let me know if you require more information

Thanks in advance
Ashik

0 Kudos
Reply
4 Replies

1,877 Views
jimmychan
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

1,867 Views
p_ashik
Contributor I

Hi @jimmychan ,
Thanks for the reply.

I am currently using the inbuilt ISP of ISX031 and it outputs YUV422 stream(With corruption as in the attached image).

The guide you mentioned is suggesting to use IMX8's ISP. Do i need to add those changes as i am already using camera ISP?

Let me know if my understanding is correct or not.

0 Kudos
Reply

1,819 Views
jimmychan
NXP TechSupport
NXP TechSupport

As your camera already inbuilt ISP, you don't need to use/configure the ISP in i.MX8MP. Then the porting is more simple like the OV5640.

0 Kudos
Reply

1,756 Views
p_ashik
Contributor I

Hi @jimmychan ,
I suspect the issue is with mipi clock.

When i increase the gmsl serdes clock to 900MHz, the preview is proper.
But the current issue i am facing is, IMX8MP starts to stream the camera only when the gmsl serdes clock is at 500MHz(in this case camera streams with corruption) and when the gmsl serdes clock is changed to 900MHz the board doesnt give camera stream.

For testing purpose i am starting the stream at 500MHz and then changing the clock to 900MHz using i2c commands.

Am i missing anything related to MIPI clock in the IMX side?
Also do i need to modify hs-settle clk-settle values in the dts(How are these values calculated?)?

Thanks
Ashik

0 Kudos
Reply