MIPI streaming error with Jetson AGX Orin

tegra-capture-vi uncorr_err: 6960x560 RAW12 BGGR, MIPI active on scope but no V4L2 frames

dmesg log is: “tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms”

Sample media-ctl topology:

- entity 1: fslidar_mipi 2-0036 (1 pad, 1 link)
        device node name /dev/v4l-subdev0
    pad0: Source
            [fmt:SBGGR12_1X12/6960x560@1/10 field:none colorspace:srgb]
            -> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 3: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
	    device node name /dev/v4l-subdev1
	pad0: Sink <- fslidar [ENABLED]
	pad1: Source -> "vi-output, fslidar_mipi 2-0036":0 [ENABLED]

- entity 6: vi-output, fslidar_mipi 2-0036
	    device node name /dev/video0
	pad0: Sink <- nvcsi [ENABLED]

Scope (after start scan): MIPI CLK lane and D0–D3 show activity

How to solve the problem now

hello 512870718,

did you already probe the MIPI signaling to verify the high-speed signaling?

according to the error logs.. uncorr_err: request timed out after 2500 ms
it means there’s no validate frames received by VI engine.

let’s examine your Sensor Pixel Clock, which must be set correctly to avoid potential issues.
FYI, I usually using sensor CSI lane output rate.
for instance, pixel_clk_hz = sensor data rate per lane (Mbps) * number of lanes / bits per pixel

Thank you for your reply!

For pix_clk_hz, we used 6960×560×10 = 38.976 MHz; vendor cited ~600M per lane. Using your formula with 600 Mbps/lane, 4 lanes, RAW12 → 200 MHz. So, should we set pix_clk_hz from lane rate and then set line_length/frame_length so that line_length × frame_length × fps equals that value?

hello 512870718,

you may give it a try to configure pix_clk_hz as 200Mhz for quick testing.

Hi JerryChang,

The dts file is as follows named tegra234-p3737-lidar-csi67.overlay.txt

I have a try to configure pix_clk_hz as 200MHz and VI now returns 6960×560 buffers after pix_clk_hz=200 MHz, but frame content is mostly empty (5/560 rows)

the dmesg log is as follows:

[ 321.308207] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 131072
[ 321.308207] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 131072
[ 321.399118] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3, flags: 0, err_data 131072
[ 321.399118] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3, flags: 0, err_data 131072

I have a question:

With active_h = 560, is frame_length = 2874 (implied by 200 MHz and line_length = 6960) correct, or should VTS = 560 with a different line_length so that line_length × VTS × fps = 200 MHz?

tegra234-p3737-lidar-csi67.overlay.txt (7.1 KB)

hello 512870718,

discarding frame reported to indicate a frame has dropped due to invalidate capture state.
let’s enable VI tracing logs to obtain more details.
you may

see-also Topic 349718 for some VI tracing logs with a success image capture as an example.
please note that, here must be one pair of CHANSEL_PXL_SOF/CHANSEL_PXL_EOF to indicate a frame has detected by VI engine. afterwards, it’s ATOMP_FRAME_DONE to indicate it’s complete writing a frame to memory.
for instance,

sudo su
modprobe rtcpu_debug
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo > /sys/kernel/debug/tracing/trace

it should be the settings from sensor data sheet, you must configure the device tree identical with your hardware settings.

Hi JerryChang,

The track log is as follows.

Does this log indicate that MIPI has already entered Orin, but VI has received almost less than one frame of 6960 × 560, and the frame boundary and DT programming do not match. And then what should I do?

track.log (8.9 KB)

hello 512870718,

it dose looks like some MIPI data has received by VI. however, there’re some error reported.
for instance,
kworker/7:2-150 [007] ....... 1271.227749: rtcpu_nvcsi_intr: tstamp:40324658582 class:CORRECTABLE_ERR type:PHY_INTR phy:3 cil:0 st:0 vc:0 status:0x00000110
kworker/7:2-150 [007] ....... 1271.227749: rtcpu_nvcsi_intr: tstamp:40324658582 class:CORRECTABLE_ERR type:PHY_INTR phy:3 cil:1 st:0 vc:0 status:0x00000110

it shows PHY interrupts. the error code 0x110 means data-lane FIFO overflow.
please see-also similar topics for digging into data-lane FIFO overflow failures. such as… Topic 209574, and Topic 242054.

Hi JerryChang. Thank you for your support!!!

Did you mean that there is something wrong with the configuration of the device tree, like line_length,pix_clk_hz or others.

The device tree file is as follows. Please help me confirm if there are any issues with the device tree and which parameters need to be confirmed from the snesor supplier. Thank you.

The resolution is 6960x560, the frame rate is 10fps, the image is RAW16, and the MIPI rate is 600M/lane.

tegra234-p3737-lidar-csi67.overlay.txt (7.1 KB)

hello 512870718,

just an FYI,
line_length is pixel line width horizontal timing size for the sensor mode. Used to calibrate the features in the camera stack. the value must be greater than or equal to active_w.

did you tried the commands to boost all the clocks.
for instance,

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

Hi JerryChang,

I tried to used the command you provided to boost all the clocks. Then, do not appear uncorr_err: request timed out after 2500 ms.

And that I modify pix_clk_hz as 400 MHz in device tree also do not appear uncorr_err.

The trace log is as follows. Does it mean the direction of problem-solving is correct?

trace.log (7.2 KB)