CSI camera problem in Jetson Orin Nx

Hi Nvidia team

I am using Jetson Orin Nx. I have installed the driver for imx708 camera and I can capture a video from CSI 1 port and that is working properly. But when I connect the same camera with the same cable to the CSI 2 port I got this error:

" nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:702 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating) "

and the result of v4l2-ctl --list-devices is:

NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0

vi-output, imx708 9-001a (platform:tegra-capture-vi:1):
/dev/video0

Hello @sab3.

Does your driver support capture from the CAM1 port?

Could you please share your device tree for further checking?

Regards!
Eduardo Salazar
Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

Please confirm the lane_polarity configuration. You can reference to imx219 to set the lane_polarity to try.

Thanks

What do you mean about “confirm the lane_polarity configuration”?

Or Orin NX/Nano need add lane_polarity due to HW data lane swap.
You can check the design from the download center.

Thanks

1 Like

Hello @sab3

What Shane means is that lane_polarity must be 0x6 for sensors attached to CSI0/1 port, since CSI0 D1 and CSI1 D0 has P/N swizzled, in Orin NX 16GB, Orin NX 8GB, Orin Nano 8GB and Orin Nano 4GB modules. Set it by 0x0 for other cases. You can check at Sensor Software Driver Programming — NVIDIA Jetson Linux Developer Guide 1 documentation

Also, you can check our IMX708 driver for the Orin Nano at NVIDIA-Jetson-IMX708-RPIV3/patches_orin_nano/patches/6.0_orin_nano_imx708_v0.1.0.patch at main · RidgeRun/NVIDIA-Jetson-IMX708-RPIV3 · GitHub it could work as a reference for you.

I hope this helps.
Regards!

2 Likes

Thanks so much Eduardo and Shane

I am trying to modify the device-tree but the main problem that I have is the device tree in /proc/device-tree folder is not the same with dtb file in /boot/dtb folder. When I modified the dtb in /boot/dtb and reboot Jetson, nothing changed in /proc/device-tree

Hello @sab3

Could you please describe how are you modifying the device-tree in /boot/dtb?

Please, share the device-tree and the /boot/extlinux/extlinux.conf file

Regards!

First I decompiled “dtb” to “dts” with “dtc -I dtb -O dts -o” and then I midfield the resulting dts file and saved it and afterward I recompiled modified dts file with “dtc” again to convert it to dtb file and then I replaced the existing dtb in /boot/dtb folder with resulting dtb and reboot.
This is the extlinux file
extlinux.txt (1.4 KB)

You need replace this file.

FDT /boot/arducam/dts/tegra234-p3767-0000-p3768-0000-a0-user-custom.dtb
1 Like

Actually I modified the device_tree and I changed lane_polarity to 6 as you mentioned and I check it and it was done. but still the camera imx708 is not detected in the CSI 1 and it was detected in CSI 0. The same error as before is generated:

nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:702 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED

Actually the CAM0 is CSI-1(CSI-B) and CAM1 is CSI-2 (CSI-C) the lane_polarity only need for the CAM0.

Thanks

ok but what should I do with this error in CAM1: CSI-2 (CSI-C)

nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:702 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED

Using v4l2-ctl to capture and get the trace log.

https://docs.nvidia.com/jetson/archives/r36.4/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html#to-run-a-v4l2-ctl-test

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

1 Like

@sab3

You could add the following lines in your main device tree, just for testing

	model = "NVIDIA Jetson Orin Nano Engineering Reference Developer Kit Super";
	nvidia,dtsfilename = "Orin_device_tree";
	nvidia,dtbbuildtime = "february 19th, 11:20";

perhaps after the model and compatible parameters. Please, notice that this is for a Jetson Orin Nano.

Then try to check them at:

cat /proc/device-tree/nvidia,dtbbuildtime
cat /proc/device-tree/nvidia,dtsfilename

to verify if it fits with the time in which the device tree was compiled and it is loading with success. You should get an output similar to the following:

february 19th, 11:20Orin_device_tree

Furthermore, you could compare your device tree against the tegra234-p3767-camera-p3768-imx219-C.dts overlay that is in the NVIDIA sources

The path is:

./hardware/nvidia/t23x/nv-public/overlay/tegra234-p3767-camera-p3768-imx219-C.dts

Regards!

1 Like

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