Frame corruption in mipi_csi_1

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

Frame corruption in mipi_csi_1

14,995 Views
vimalan_93
Contributor I

Hi,

I am using the linux kernel 4.14.78 from sumo bsp in imx8m EVK (REV-B4) board. I can able to stream the resolution 3200x1600@30 fps in mipi_csi_2(connector:J1503) constantly after every reboot. but when i try to stream the same in mipi_csi_1(J1502) it produces corrupted frames very frequently, like 7 out of 10 times. i have enclosed my DTB configuration of both  mipi_csi_1 & mipi_csi_2 below.

mipi_csi_1: mipi_csi1@30a70000 {
compatible = "fsl,mxc-mipi-csi2_yav";
reg = <0x0 0x30a70000 0x0 0x1000>; /* MIPI CSI1 Controller base addr */
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MQ_CLK_DUMMY>,
<&clk IMX8MQ_CLK_CSI1_CORE>,
<&clk IMX8MQ_CLK_CSI1_ESC>,
<&clk IMX8MQ_CLK_CSI1_PHY_REF>;
clock-names = "clk_apb", "clk_core", "clk_esc", "clk_pxl";
assigned-clocks = <&clk IMX8MQ_CLK_CSI1_CORE>,
<&clk IMX8MQ_CLK_CSI1_PHY_REF>,
<&clk IMX8MQ_CLK_CSI1_ESC>;
assigned-clock-rates = <266000000>, <400000000>, <66000000>;
power-domains = <&mipi_csi1_pd>;
csis-phy-reset = <&src 0x4c 7>;
phy-gpr = <&gpr 0x88>;
status = "disabled";
};

mipi_csi_2: mipi_csi2@30b60000 {
compatible = "fsl,mxc-mipi-csi2_yav";
reg = <0x0 0x30b60000 0x0 0x1000>; /* MIPI CSI2 Controller base addr */
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MQ_CLK_DUMMY>,
<&clk IMX8MQ_CLK_CSI2_CORE>,
<&clk IMX8MQ_CLK_CSI2_ESC>,
<&clk IMX8MQ_CLK_CSI2_PHY_REF>;
clock-names = "clk_apb", "clk_core", "clk_esc", "clk_pxl";
assigned-clocks = <&clk IMX8MQ_CLK_CSI2_CORE>,
<&clk IMX8MQ_CLK_CSI2_PHY_REF>,
<&clk IMX8MQ_CLK_CSI2_ESC>;
assigned-clock-rates = <266000000>, <400000000>, <66000000>;
power-domains = <&mipi_csi2_pd>;
csis-phy-reset = <&src 0x50 7>;
phy-gpr = <&gpr 0xa4>;
status = "disabled";
};

I have attached the normal image and corrupted image for your reference.

Has anyone faced this issue? what is the difference between mipi_csi_1 & mipi_csi_2?

Please help me to solve this issue.

Thanks

Vimal.

0 Kudos
Reply
9 Replies

14,637 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vimal

one can try to rebuld image from scratch and apply performance patches from

i.MX8M EVK MIPI CSI Camera Frame Rate 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

14,638 Views
vimalan_93
Contributor I

As i said, I am using SUMO version in yacto(kernel:4.14.78), so the performance patches(tuning.7z.zip & Camera.tar.bz2) are already applied in this bsp. can you please suggest any other method to debug or solve this issue?

Any immediate help is really appreciated.

Thanks,

vimal.

0 Kudos
Reply

14,638 Views
vimalan_93
Contributor I

Hi igor,

Thanks for your continuous support,

it tested the following resolution 3200x1300 &1600x1300 in my camera and 1920x1080 & VGA resolution in ov5640 camera.

i tested all the above resolutions with the following DTB changes for improving the data rate. in all the resolution i faced the issue.

assigned-clock-rates = <266000000>, <400000000>, <66000000>;

when i changed the DTB to default value like below. the ov5640 camera stream without any issue. but in my requirement the default DTB clock settings are not enough.

assigned-clock-rates = <133000000>, <100000000>, <66000000>;

the higher clock settings in DTB is perfectly working in  mipi_csi_2(connector:J1503).

please help us to resolve this issue in mipi_csi_1(connector:J1502).

Thanks in advance,

Vimal.

0 Kudos
Reply

14,638 Views
igorpadykov
NXP Employee
NXP Employee

so is it working fine with lower resolutions in mipi_csi_1.

 

~igor

0 Kudos
Reply

14,638 Views
vimalan_93
Contributor I

No, After changing the DTB settings to higher clock rate, lower resolution(VGA) also get corrupted.

Thanks,

Vimal.

0 Kudos
Reply

14,638 Views
igorpadykov
NXP Employee
NXP Employee

so without changing the DTB settings is it working fine with lower resolutions in mipi_csi_1.

 

~igor

0 Kudos
Reply

14,638 Views
vimalan_93
Contributor I

Hi igor,

Yes, without changing the DTB settings all resolutions are working fine in ov5640 camera. 

Please guide me to configure the dtb settings for higher FPS.  how to calculate the DPHY clock using the below values

assigned-clock-rates = <266000000>, <400000000>, <66000000>; = ?

assigned-clock-rates = <133000000>, <100000000>, <66000000>; = ?

Thanks,

vimal.

0 Kudos
Reply

14,638 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vimal

according to attached Release Notes Table 8. Supported features

tested and supported "720p30, 1080p30, 2592x1944@15".

For 3200x1600@30 fps settings and optimizations one can

proceed with NXP Professional Services | NXP 

Best regards
igor

0 Kudos
Reply

14,638 Views
igorpadykov
NXP Employee
NXP Employee

is it working fine with lower resolutions.

~igor

0 Kudos
Reply