Camera issue: after I upgrade my board sdk version to R35.6.1, the sensor does not work then

Hi Nvidia,

after I upgrade my board sdk version to R35.6.1, the sensor does not work then. The old version works well. error dmesg:

[ 804.294857] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 804.304009] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 804.313587] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 804.321318] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 804.331983] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 804.339699] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 804.350488] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 806.862860] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 806.872010] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 806.881584] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 806.889310] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 806.899986] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 807.910847] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[ 807.919186] tegra194-vi5 13e40000.host1x:vi0@15c00000: vi_capture_control_send_message: failed to send IVC control message
[ 808.934847] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[ 808.943197] tegra-camrtc-capture-vi tegra-capture-vi: vi capture setup failed
[ 808.950557] tegra-camrtc-capture-vi tegra-capture-vi: fatal: error recovery failed
[ 808.958394] af0130_stop_streaming
[ 808.958400] af0130_write_table start
[ 808.958405] af0130_write_table: 0x100 = 0x0, bit: 1
[ 808.958566] af0130_write_table end
[ 808.962409] bwmgr API not supported
[ 810.055268] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[ 810.067338] tegra194-vi5 13e40000.host1x:vi0@15c00000: csi_stream_release: failed to disable nvcsi tpg on stream 0 virtual channel 0

What’s the different for new version sdk?

Seems the timeout CAPTURE_TIMEOUT_MS is new added, will increase it for a try.

after increase the timeout ms, error becomes:

[ 40.969852] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 131072
[ 41.003309] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 2, flags: 0, err_data 131072
[ 41.036635] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3, flags: 0, err_data 131072
[ 41.069993] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 4, flags: 0, err_data 131072
[ 41.103307] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 5, flags: 0, err_data 131072
[ 41.136636] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 6, flags: 0, err_data 131072
[ 41.169967] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 7, flags: 0, err_data 131072
[ 41.203293] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 8, flags: 0, err_data 131072
[ 41.236628] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 9, flags: 0, err_data 131072

Don’t know why only a upgrade of sdk, sensor becomes not work… It is some hard.

I tried flash old version’s(jetpack 5.1.1 , now is 5.1.5) kernel and dtb into current 5.1.5 ver board, and found similar error:

[ 44.506136] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 44.506152] vdd-12v-sys: disabling
[ 44.515328] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 44.525035] vdd-1v8-sys: disabling
[ 44.525040] vdd-3v3-ftdi: disabling
[ 44.525205] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 44.532979] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 44.543663] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 44.551401] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 44.562138] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 47.401818] af0130_start_streaming
[ 47.431381] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 131072
[ 47.464527] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 2, flags: 0, err_data 131072
[ 47.498015] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3, flags: 0, err_data 131072
[ 47.531340] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 4, flags: 0, err_data 131072

I guess for this new sdk version, the VI becomes some slower which caused this issue.

Nobody from Nvidia can help?

Get the trace log to check.

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 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

v4l2-ctl --stream-mmap -c bypass_mode=0

cat /sys/kernel/debug/tracing/trace

Hi @ShaneCCC

Thanks! Now I have upgraded my board to latest 6.2.1 ver and try to checking if sensor data can be received well. After that I will downgrade back to 5.1.5 and catch the trace here.

hi @ShaneCCC

On jetpack 6.2.1, do you know what’s the camera develop procedure? I have compiled out the ko, dtb, and Image, how to do next? Shall it be scp Image to /boot, scp dtb to /boot/dtb/kernel_xxx , and scp .ko to board, and do insmod .ko ?

Thanks.

Check the document for it.

I don’t know why I can’t make sensor driver work on 6.2.1, after insmod the .ko no log print as wanted at all, nothing…

Dump the device tree to confirm your sensor define is apply to the system.

sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

Thanks,

I did not see my sensor from the dump. I have the overlay.dtbo of the sensor, and already scp it to /boot/dtb/, how can I let the sensor’s dtbo be actived?

@ShaneCCC

@ShaneCCC

I also tried none overlay way as below:

I replaced line “include “tegra234-p3737-camera-modules.dtsi”“ with my own in file “t23x/nv-public/overlay/tegra234-p3737-0000+p3701-0000-dynamic.dts“ and scp the dtb file to /boot/dtb, but it also does not work, same appearance.

@ShaneCCC show me a way please.

Check this to apply the dtbo

@ShaneCCC

This part says to do flash action, how to flash, using flash.sh ? I did not download the whole rootfs images. I only downloaded the kernel source for development since I was flashing with sdkmanager? How could I do is right?

seems the sdkmanager already helped me with the rootfs image download, I’m doing the flash now:

sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1