IMX274 Drivers - on Tx1 vs Tx2

Hi Folks,

I am looking to operate two IMX274 from leopard concurrently on our Tx1 and Tx2 boxes. We are using R28.1 on Tx2 and R24 (Rev 2.1) on Tx1.

We are observing difference in behavior of same cameras on Tx1 and Tx2. Simple nvgstcapture-1.0 works on both Tx1 and Tx2. However following preview command line, works on Tx1 and not on Tx2 .

gst-launch-1.0 nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvoverlaysink overlay-x=400 overlay-y=600 overlay-w=320 overlay-h=190 overlay=1

Similarly, We can operate two IMX274 concurrently on Tx1, but not on Tx2 (each having two IMX274). For example following command line works on Tx1 but not on Tx2.

gst-launch-1.0 nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvoverlaysink overlay-x=400 overlay-y=600 overlay-w=320 overlay-h=190 overlay=1 & gst-launch-1.0 nvcamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvoverlaysink overlay-w=320 overlay-h=190 overlay=2

Could someone please help about potential reason for why same cameras would behave differently on Tx1 and Tx2 ? Folks, at Leopard imaging are looking at this - but they would like to understand difference between, environments (Tx1/R24) and (Tx2/R28.1).

Thanks,

Hi Folks,
Could someone please help ? Any idea linuxdev ?
Thanks

Without overlay-h parameter, it displays an image, but not sure what you’re expecting…
Sorry I can’t help much more about this, but note the following:
Using:

GST_DEBUG=*:3 gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvoverlaysink overlay-x=400 overlay-y=600 overlay-w=320 overlay=1
...
[b][0:00:00.225648408 21238       0x5ce370 ERROR           omxvideosink gstomxvideosink.c:1329:gst_omx_video_sink_setcaps:<nvoverlaysink-nvoverlaysink0> Failed to set Overlay Width
[/b]

This is working…You may try to start from there and see where it fails:

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM),width=640,height=480, framerate=30/1' ! nvoverlaysink overlay-x=400 overlay-y=600 overlay-w=640 overlay-h=480 overlay=1

Probably you need to scale your stream to the height and width you are asking to the sink.

Ok, you may try this:

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvvidconv ! 'video/x-raw(memory:NVMM), width=320, height=190' ! nvoverlaysink overlay-x=400 overlay-y=600 overlay-w=320 overlay-h=190 overlay=1

Thanks Honey_Patouceul.

  1. This command line works. It seems we need to specifically scale down to w/h of overlay window. However we do not need to do that on Tx1. Any idea why ?

  2. I am not able to operate second camera.

gst-launch-1.0 nvcamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvvidconv ! 'video/x-raw(memory:NVMM), width=320, height=190' ! nvoverlaysink overlay-x=400 overlay-y=600 overlay-w=320 overlay-h=190 overlay=1

works with sensor-id = 0, and show all green box with sensor-id=1. Any idea why ?

Thanks

Sorry, I have no experience of trying this on TX1. Just looked into this on seeing your question. No idea what is the full specification of this plugin.

I have no experience for this, but I suppose you would have to modify the device tree for handling the second camera. Have you done that and if yes how much tested ? More experienced people may help from there.

There is an known issue about nvoverlay. Please try the patch at
[url]https://devtalk.nvidia.com/default/topic/1024472/jetson-tx2/using-overlay-2-in-l4t-28-1-with-tx2/post/5213583/#5213583[/url]

Thanks DaneLLL.

I would also like to operate two IMX274 concurrently. The Tx2 driver does not quite support that. Would appreciate any pointers/guidance about how to go about instrumenting driver code to support two concurrent camera operation. Specifically, I am looking for -

  1. how to buld/compile IMX274 driver code.
  2. how to test/run it.

Thanks

Can you try to reach the vendor of your IMX274 boards? We don’t have the schematics of the boards.

Vendor, Leopard imaging, has expressed their inability to do it now. They want their customers to do it themselves. Would be great if anyone can provide preliminary knowledge about it.

Thanks,

Building the kernel isn’t that hard.
Download and install the latest Jetpack.
It will create a directory called Linux_for_Tegra that contains the kernel sources, and the scripts needed to flash a new image.
In sources/kernel/kernel-4.4, you will find the actual kernel sources. In this directory, you start setting up the environment needed, as per various kernel compilation tutorials.
Once you have a working config, you can change it with “make menuconfig” and selecting the various drivers/features you want to include/exclude.

The IMX274 driver lives in drivers/media/i2c/imx274.c

The “Tegra Linux Driver Package Development Guide” downloadable from the NVIDIA documentation website (if you’re logged in) goes though the necessary steps in a little more detail.
https://developer.nvidia.com/embedded/dlc/l4t-jetson-tx2-driver-package-28-1

Additional info related to the beginning of this topic, that I’ve posted in the wrong thread: [url]https://devtalk.nvidia.com/default/topic/1026691/jetson-tx2/how-to-overlay-two-picture-image-on-the-tx2/post/5222078/#5222078[/url].

Thank you, @snarky, @HP, for giving information.

We have [Sensor Driver Programming Guide] in https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-1

First you should need to check if the two sensors are connected to different CSI ports, and then program device tree according to the guide. v4l2-ctl/v4l2-compliance can be used to verify the driver.