Soc can't get an image from camera, but it does have mipi data

Hi, Nvidia:
I used the Orin NX’s CSI and deserializer (MAX96724) to get the four camera data, but when I configured both the driver and device tree, I found that I couldn’t get the data from any camera correctly.
According to the documentation,I adjusted the pixclk value several times, but it didn’t seem to work.and I have lane_polarity of CSI0 and CSI1 correctly, and the trace log I get is in the following file

Please help me locate this error with your experience.

trace_log.txt (66.9 MB)

At the same time, according to the error reported by dmesg, I think the data of mipi data exists

hello HuangZeng,

please check your virtual channel ID configurations, you may see-also Jetson Virtual Channel with GMSL Camera Framework.

Hello, JerryChang
My device tree configuration is the image below and I think my VC id related configuration is correct.


hello HuangZeng,

such discarding frame errors meant it encounter an unsuccessful capture state, it’s dropping buffer to requeue frames.
is it possible to trigger a reset signal before s_stream() from driver side for testing?

Hi, JerryChang
You mean I can try to capture an image and then reconfigure the camera and have it re-output the image? But I think it can be explained that when I use a camera, I can get the image!

hello HuangZeng,

no… I meant the software reset (on SerDes side) when calling s_stream() to align output streaming with VI capture engine.

Hi, JerryChang
Ah, I think this is difficult because I am currently using scripts for GMSL link configuration at the application layer, not in the driver.
If you think this part of the alignment is very important, I think I will try to configure it in the driver

Hi, Jerry
I have some new discoveries that need to be synchronized with you.

When I use the three cameras, I will be able to get the images of the three cameras normally, and their display is normal.

But when I use the four cameras, they produce the same information as the log I gave you earlier, and they can’t be received properly.

So I tried to reduce the speed of mipi to 1100mbps/lane, dmesg would get some errors and the system would hang. And restart after a period of time.

The following attachment is the log of dmesg when the error occurred.
get_streaming_error_log.txt (6.6 KB)

hello HuangZeng,

it looks the culprit is NULL pointer dereference to cause kernel panic and system hang.
is it always the same video device? or, it’s related to number of cameras when launching total 4-cam trigger this failure?

Hi, Jerry
Yes, it only has problems with four cameras, three cameras are normal.
At the same time, I hope you can give me some direction to think, I am not sure whether the problem is my GMSL register configuration or the device tree configuration.

hello HuangZeng,

it’s might be issue from device tree side, it’s usually an invalid value return to cause such error.
you may try adding some debug prints from kernel side to examine the parse_dt function calls.

Hi, Jerry
Hi, Jerry
I found the problem and my device tree configuration will be overwritten! Causes my configuration of port 0 to change from port-index = < 0> To 1, the override operation is in the file tegra234-p3768-0000-a0.dtsi, as shown in the image below.

1 Like

hello HuangZeng,

it looks like a known issue, we’ve fix check-in to rel-35 code-line.
you may apply below changes to address the failure.
for example,

diff --git a/cvb/tegra234-p3768-0000-a0.dtsi b/cvb/tegra234-p3768-0000-a0.dtsi
index 29edde2..95d7375 100644
--- a/cvb/tegra234-p3768-0000-a0.dtsi
+++ b/cvb/tegra234-p3768-0000-a0.dtsi
@@ -277,7 +277,7 @@

        host1x@13e00000 {
                nvcsi@15a00000 {
-                       csi_chan0 {
+                       channel@0 {
                                ports {
                                        port@0 {

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.