Issues with Camera Streaming on NVIDIA Jetson Xavier: v4l2-compliance Failures with SDK 5.1.3

Hello,
I am encountering issues with streaming video from an IMX219 camera connected to my NVIDIA Jetson Xavier Development Kit. I am using JetPack SDK version 5.1.3 with Jetson Linux 35.5.0. When I run the v4l2-compliance -d /dev/video0 command, it displays the following results:

Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
fail: v4l2-test-formats.cpp(1280): ret && node->has_frmintervals
test VIDIOC_G/S_PARM: FAIL
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)

Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
fail: v4l2-test-buffers.cpp(715): q.create_bufs(node, 1, &fmt) != EINVAL
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)

Total for tegra-video device /dev/video0: 45, Succeeded: 43, Failed: 2, Warnings: 0

There are failures in the test results, particularly with VIDIOC_G/S_PARM and buffer-related ioctls. Could these issues be causing problems with the camera streaming functionality? If so, how can I address these failures and resolve the potential streaming issues?
Thank you

Nope, this known failed doesn’t cause streaming issue.
Check the trace log to check if more clue for streaming failed.

https://elinux.org/Jetson/l4t/Camera_BringUp

I am following up on my previous inquiry regarding the issue I’m encountering when starting streaming. The log messages I receive are as follows:
tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 211.167965] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 211.168124] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=4, csi_port=4
[ 211.168363] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 211.168909] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 213.727398] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 213.727670] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
Could you please provide further assistance in diagnosing these errors and suggest possible solutions?

This log tell capture failed from the sensor. Get the trace log to know more.

Thanks

trace.txt (53.9 KB)

root@tegra-ubuntu:/home/xavier# echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked

root@tegra-ubuntu:/home/xavier# echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked

root@tegra-ubuntu:/home/xavier# echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked

root@tegra-ubuntu:/home/xavier# cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/vi/rate

460800000

root@tegra-ubuntu:/home/xavier# cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate

576000000

root@tegra-ubuntu:/home/xavier# cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

314000000
I am also attaching additional trace logs for further analysis.

This is not trace log.
Enable by below command and launch camera then "cat /sys/kernel/debug/tracing/trace
"

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 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace
cat /sys/kernel/debug/tracing/trace

When I executed the following command:
v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=10 --stream-to=output.raw
trace1.txt (3.1 KB)

From the trace log looks like NVCSI/VI didn’t receive any validate data from the sensor.
Maybe probe the sensor output signal to confirm the MIPI timing.

Thanks

Hi,

Thank you for the input.

The 4-lane MIPI camera is functioning correctly with the older SDK version 4.6.2, and streaming is possible. However, the issue arises when I upgrade to SDK version 5.1.3.

Given this information, could you suggest where I might look for potential errors or changes that could have affected the sensor’s data reception or MIPI timing in the new SDK version?

Thanks for your assistance!

The sensor is imx219?
Try enable by jetson-io instead of customized device tree.

We are using the AR1820 sensor. After adding the changes for the AR1820 in the DTSI file tegra194-camera-rbpcv2-imx219.dtsi, when I connect the AR1820 camera, its node is present. However, when I connect the IMX219,some errors are shown, which are given below:

[   18.313048] nv_imx219: disagrees about the version of symbol tegracam_v4l2subdev_unregister
[   18.323591] nv_imx219: Unknown symbol tegracam_v4l2subdev_unregister (err -22)
[   18.323715] nv_imx219: disagrees about the version of symbol tegracam_v4l2subdev_register
[   18.323726] nv_imx219: Unknown symbol tegracam_v4l2subdev_register (err -22)
[   18.323734] nv_imx219: disagrees about the version of symbol tegracam_device_unregister
[   18.323740] nv_imx219: Unknown symbol tegracam_device_unregister (err -22)
[   18.323760] nv_imx219: disagrees about the version of symbol tegracam_get_privdata
[   18.323770] nv_imx219: Unknown symbol tegracam_get_privdata (err -22)
[   18.323791] nv_imx219: disagrees about the version of symbol camera_common_mclk_enable
[   18.323797] nv_imx219: Unknown symbol camera_common_mclk_enable (err -22)

Do you download the kernel source to build the sensor driver?

Hi,

I downloaded the source files from the NVIDIA JetPack 5.1.3 page for building the kernel. On the carrier board, I have a 4-lane port for connecting the AR1820 sensor. I am working with SDK 5.1.3. After modifying the DTSI file and making the necessary changes, the IMX219 camera node is no longer visible.

When I connect the AR1820 sensor, the video0 node is present, but there is a streaming issue.

My priority is to get the AR1820 sensor camera to stream properly. Could you assist in identifying and resolving the streaming issue?

Thank you!

If the trace log is the same you may need to probe the sensor output signal to confirm it follow the MIPI spec.

Thanks

Could you please review my camera configuration? Here are the relevant parameters:
mclk_khz = “37125”;
num_lanes = “4”;
tegra_sinterface = “serial_e”;
phy_mode = “DPHY”;
discontinuous_clk = “no”;
dpcm_enable = “false”;
cil_settletime = “0”;
dynamic_pixel_bit_depth = “12”;
csi_pixel_bit_depth = “12”;
mode_type = “bayer”;
pixel_phase = “grbg”;

active_w = “4912”;
active_h = “3684”;
readout_orientation = “0”;
line_length = “4912”;
inherent_gain = “1”;
mclk_multiplier = “1”;
pix_clk_hz = “1748055053”; // Initially set
min_hdr_ratio = “1”;
max_hdr_ratio = “1”;

gain_factor = “1”;
min_gain_val = “0”; // dB
max_gain_val = “16”; // dB
step_gain_val = “1”;
default_gain = “0”;

exposure_factor = “1000000”;
min_exp_time = “500”;
max_exp_time = “100000”; // 100ms
step_exp_time = “1”;
default_exp_time = “10000”;

framerate_factor = “1000000”;
min_framerate = “1000000”;
max_framerate = “13000000”; // Adjusted for test
step_framerate = “1000000”;
default_framerate = “1000000”;

embedded_metadata_height = “0”;
deskew_initial_enable = “false”;
deskew_periodic_enable = “false”;
Do you think any adjustments to these parameters might help resolve the issues I’m experiencing?
issue is
tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
(NULL device *): vi_capture_control_message: NULL VI channel received
tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
Any guidance would be greatly appreciated!

Maybe try lower output size and pix_clk_hz.
Please NOTE below.

Skew calibration is required if sensor or deserializer is using DPHY, and the output data rate is > 1.5Gbps.
An initiation deskew signal should be sent by sensor or deserializer to perform the skew calibration. If the deskew signals is not sent, the receiver will stall, and the capture will time out.
You can calculate the output data rate with the following equation:

Output data rate = (sensor or deserializer pixel clock in hertz) * (bits per pixel) / (number of CSI lanes)

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