Does the orin nx platform support one CSI port running two 640x480 240fps cameras at the same time?

Platform: Jetson Orin Nx
JetPack: R35.4.1(JetPack5.1.2)
Hardware: 1 x max9296 + 2 x max9295 + 2 x imx556

Question:
I tested two sensors running together on a csi port with a maximum of 174fps each. It works well. But when set to 240fps, neither sensor gets any data.

Kernel log is as follows:

[59389.327202] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[59389.328990] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[59389.337148] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[59389.347409] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[59389.357550] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[59389.357554] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[59389.388155] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072

And trace log is as follows:
trace_log.txt (4.4 MB)

Does the orin nx platform support one CSI port running two 640x480 240fps cameras at the same time?Or how can I fix it?

Did you boost the clocks to try?

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

Yes, I already did.

The trace log show lots of short frame that could be the output size incorrect.
Please check the trace log if have the same message by running each single camera.

Thanks

It only happens when running two 240fps cameras.
If it’s because the platform doesn’t support it, I wouldn’t keep wasting time on it.

The log tells the FIFO error due to NVCSI can’t process the input data in time. If you have boosted the clocks, suppose it could be HW limitation for two 240fps input.

Thanks

I want to know which log says it can’t process the data in time.
This is convenient for my follow-up debugging.
Thanks.

Below error tell the pixel incomplete if confirm the sensor output size correct then that could be the NVCSI lost the data.

Can configure the output frame rate to 160 to check?

     kworker/1:0-20      [001] .... 59389.347388: rtcpu_vinotify_event: tstamp:1856493906539 cch:0 vi:0 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:59407803850368 data:0x01b0200001000000

The below picture shows it works well at 160fps.


And attach the trace log below:
trace_log_boost.txt (2.9 MB)

Still see the CHANSEL_SHORT_FRAME message in the trace log for 160fps.
Could you confirm 60fps again. If still have the short frame message I would suspect the sensor output size incorrect.

Thanks

CHANSEL_SHORT_FRAME message still appears at 60fps, but only once after streaming for each sensor.
trace_log_boost_60fps.txt (2.6 MB)
These modules runs well on other platform, not jetson, and the number of cars with this module is over 100K.Maybe it’s not the camera output error.

I saw not just once in the log.
Could you confirm by single camera.
Clean the log by sudo bash -c “echo > /sys/kernel/debug/tracing/trace”
first.
Then run the vl42-ctl for single camera then check by below command.

sudo cat /sys/kernel/debug/tracing/trace | grep -i short_frame

Thanks,I boost the clock of deserdes and it can run 4 cameras now.
But I meet some error when i test it with v4l2 command.


This sync error occasionally occurs during startup, and although it can reset itself, it makes me very uncomfortable.
Trace log is as follow:
single_cam_trace_log_boost_240fps.txt (1.1 MB)
I’d really appreciated if u can offer me any help!

Apply this patch to try.

0001-capture-ivc-fix-multi-cam-race-condition.patch (2.4 KB)

Thanks for your quick reply. I applied this patch and it didn’t improve.

The trace log have lots of short frame in the beginning. Suppose it could be the cause.

yes, I found that the sync error occurs when the CHANSEL_SHORT_FRAME appears more than once.
If the CHANSEL_SHORT_FRAME appears only once after streaming, it won’t occur.
Maybe I need to check if the data length output from sensor or from deserdes correct.

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