Hi everyone,
I’ve been working on developing a driver for two IMX678 sensors for a Jetson Xavier NX on JetPack 5.0.2. The capture so far is working great when capturing with each camera separately in the following scenario:
- 3456x2180 at 25 fps resolution.
- 10 bits per pixel.
- 2 lanes.
- 1440000000 Hz datarate
I could make it work by using the information found in this post: Jetpack 5.0.2 camera driver port leads to tegra-capture-vi timeout - #3 by ShaneCCC to calculate the pixel clock value as follows:
Output data rate = (sensor or deserializer pixel clock in hertz) * (bits per pixel) / (number of CSI lanes)
pixel clock in hertz = (output data rate * number of CSI lanes) / (bits per pixel)
That is, in my case:
pixel clock in hertz = (1440000000 * 2) / 10 = 288000000 Hz
After performing the above calculation, I can dequeue buffers with v4l2-ctl using each camera separately.
Now, when I try to dequeue as follows:
- First dequeue with /dev/video0
- Second dequeue with /dev/video1 at the same time /dev/video0 is dequeueing
The dequeue is not successful and I got the following dmesg log messages:
[ 119.013416] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 119.013707] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 119.014851] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 119.015045] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 119.015264] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 119.015444] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 119.015946] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 121.573430] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 103.647810] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 104.925161] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 104.925475] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 104.927297] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 104.927511] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[ 104.927742] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 104.927880] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 0
[ 104.929720] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
Furthermore, it does not matter which video device starts, I get the same result.
Also, I tested the driver by increasing the pixel clock value x10 x20 x30, and the same log error messages still and the dequeue not working even with one camera.
Furthermore, I get the trace log messages. Find them attached at the end of this post. Where each file is
-
trace_log_video1_success.txt when could dequeue using /dev/video1
-
trace_log_video0_success.txt when could dequeue using /dev/video0
-
trace_log_dual_camera_not_capturing_log.txt when could not dequeue with both video devices simultaneously.
Question1 for NVIDIA: Does the pixel need to be calculated again based on the number of cameras that are used?
Question2 for NVIDIA: Do you have any documentation about the dual camera support capture on JetPack 5.0.2?
Thanks.
trace_log_video1_success.txt (589.8 KB)
trace_log_video0_success.txt (526.7 KB)
trace_log_dual_camera_not_capturing.txt (548.3 KB)