TX2 Multiple capture

Hi all,

I am developing a TX2 driver for a camera “os08a10”, I was able to capture with three single cameras but when I try to capture with the three cameras at same time I get a crash. Do you know if the TX2 supports multiple cameras capturing? I’m using JetPack 3.1. The output below is running a gstreamer pipeline capturing with v4l2 for the device 0 and at same time running same pipeline for the device 1 is when the crash appears. Do you know about this issue?

[ 321.519772] os08a10 32-0021: Power on
[ 321.529442] os08a10 32-0021: Setting format
[ 321.533790] os08a10 32-0021: Setting format
[ 321.577734] os08a10 32-0021: Getting format
[ 321.587882] os08a10 32-0021: os08a10_s_stream: STREAM STARTING
[ 321.593767] os08a10 32-0021: os08a10_s_stream: write mode table 0
[ 321.689367] tegra-vi4 15700000.vi: master error
[ 321.709640] tegra-vi4 15700000.vi: Status: 3 channel:00 frame:00C0
[ 321.716015] tegra-vi4 15700000.vi: timestamp sof 331294981280 eof 331303985568 data 0x00000002
[ 321.725561] tegra-vi4 15700000.vi: capture_id 768 stream 0 vchan 0
[ 321.732849] tegra-vi4 15700000.vi: Status: 3 channel:01 frame:0002
[ 321.739169] tegra-vi4 15700000.vi: timestamp sof 331303981152 eof 331303985536 data 0x00020000
[ 321.748625] tegra-vi4 15700000.vi: capture_id 130 stream 4 vchan 0
[ 322.677207] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 322.689217] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 323.681205] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[ 323.686878] os08a10 30-0021: os08a10_s_stream: stream off
[ 323.693193] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[ 323.699147] os08a10 32-0021: os08a10_s_stream: stream off
[ 323.705681] nvcsi 150c0000.nvcsi: csi4_stream_check_status (4) INTR_STATUS 0x00000008
[ 323.713673] nvcsi 150c0000.nvcsi: csi4_stream_check_status (4) ERR_INTR_STATUS 0x00000008
[ 323.721598] os08a10 30-0021: Power off
[ 323.740565] os08a10 32-0021: Power off

Regards,
-Adrian

What your command for multiple camera?
Have a try below steps to maximize VI clock

$ cd /sys/kernel/debug/bpmp/debug/clk
$ cat vi/rate
$ echo 1 > vi/state
$ echo 1 > vi/mrq_rate_locked
$ cat vi/max_rate > vi/rate

Hi ShaneCCC,

Thanks for the information, I tested with the steps to maximize the VI clock but the issue is still happening.

I am capturing with V4L2:

  • first I set up a stream with this command:
    v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-mmap
  • and then I set up other stream with this commmand while the other stream is running:
    v4l2-ctl -d /dev/video1 --set-fmt-video=width=3840,height=2160,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-mmap

Have you ever tested multiple capture with 4K resolution?

Thanks,
-Adrian

Try to increase below in your DT to try.

max_pixel_rate
pix_clk_hz

Hi,

We were able to capture from three cameras simultaneously on the TX2 using nvcamerasrc, we noticed if only two of the three cameras were phsically connected and if we try a dual capture, it failed. We reduced the DTB to 2 cameras to check if the number of cameras connected to the board was the problem and that test was successful. Another test that we ran was to disable the module in the tegra-camera-platform that we are not using when the DTB was for three cameras, then trying a Dual capture ran succesfully too.

So as a summary, having 3 modules enabled in tegra-camera-platform (Device Tree), but only 2 cameras phsically connected, triggers an issue in the nvcamera-deamon. So that in order to have all the cameras nodes in the device tree but a different number of cameras connected, you would need to enable or disable the corresponding modules to match the correct configuration.

Thanks for all your support.

-Adrian

@ACervantes
That’s a known defeat. You have to connect all sensor you define in the tegra-camera-platform otherwise you need modify the sensor driver to do the detection and don’t register the video node to avoid it.

@ACervantes @ShaneCCC

Just want to share that I have also experienced this issue with less cameras connected then what’s specified in plugin manager, it seems to have a problem enumerating the video devices correctly.

Can I ask what command you used to capture three CSI cameras simultaneously using nvcamerasrc? Right now I have 3 cameras all detected and bound (video0,video1,video2) However, I can only stream them one at a time. Except when I specify sensor-id=2 (video2) it shows the same feed as sensor-id=0. Doesn’t matter which CSI port the 3 cameras are on. (Tested on all combinations of CSI1,CSI2,CSI3,CSI4)

Any help is much appreciated.

Does the v4l2-ctl can capture from different sensor?
You can have argus_camera to launch multiple session for multiple sensor.

@ShaneCCC

How can I have argus_camera launch multiple sessions? What kind of command? We are using a RAW BAYER Sensor and I found in the Accelerated GStreamer User Guide, page 45 "Jetson TX1 and Jetson TX2 currently support 2 CSI RAW BAYER sensors.

https://developer.download.nvidia.com/embedded/L4T/r28_Release_v2.0/GA/Docs/Jetson_TX1_and_TX2_Accelerated_GStreamer_User_Guide.pdf?q3hn1tkb8RiFI1YkhTrh1bvSdUEQGfUCOQ2QHRTC5R3LNo9vKn1UgFtSh4dMWHvokarrSKwUL8fCSOK_ArrpHCsWYmXa4dBXWQqsj65EWaZ8_Va057YTwvRFnxaDxtNO0cfSfjjF3-e9OoyaV454Zb99r2IXeEynskdPSznmeisgSXMaVXXVjpNrMsUQ0nOaWM5wUr5HyoY7Adox

You can select it from the UI. The “capture” button can pull down to select “Muti Session”

How do I launch argus_camera?

Download the L4T Multimedia API and build the argus by reference to …/tegra_multimedia_api/argus/README.TXT

Okay thank you. I’m still having the main issue which is that I have 3 cameras connected (video0, video1, video2) , but when I stream all 3 at the same time I only have 2 unique feeds and 1 duplicate feed. video2 always replicates the video0 feed. This happens when using gstreamer/nvcamerasrc and argus_camera.

Do you know any reason why this would happen?

It’s could be the DT cause it. Check the “position” if any duplicate.

There are no position duplicates. I’ve had issues before with the position property where some positions would cause the camera to fail with argus.

I’ve also tried running ./jetson_clocks and also the steps to maximize VI clk that you listed in this thread. I’ll test some more positions and see if that helps. I also read that “discontinuous_clk” should try to be toggled. Right now I have that set to no.

Hi Liam,

Maybe this post can help you https://devtalk.nvidia.com/default/topic/1036889/jetson-tx2/same-badge-for-three-cameras-/post/5267512/#5267512

I saw that when I used same badge for the cameras. I was checking some ISP configurations and I noticed that when I added same badge for the cameras.

Regards,

-Adrian