Raspberry PI camera connected through CSI, "Dequeued v4l2 buffer contains corrupted data"

I have a Raspberry PI camera connected to my Jetson Orin Nano. I configured the CSI port for “Camera IMX477 Dual”, although I was only guessing at that, since IMX219 didn’t work. I also tried “Camera IMX477 Dual 4 Lane”.

Here’s some info on the camera:

$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
        /dev/media0

vi-output, imx477 9-001a (platform:tegra-capture-vi:1):
        /dev/video0
$ v4l2-ctl -d0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'RG10' (10-bit Bayer RGRG/GBGB)
                Size: Discrete 3840x2160
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.017s (60.000 fps)

So it appears that the camera is found, and I decided to test it:

$ ffplay /dev/video0
...
[video4linux2,v4l2 @ 0xffff6c000ba0] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0xffff6c000ba0] Time per frame unknown
[video4linux2,v4l2 @ 0xffff6c000ba0] Dequeued v4l2 buffer contains corrupted data (16588800 bytes).
    Last message repeated 31 times
[video4linux2,v4l2 @ 0xffff6c000ba0] Dequeued v4l2 buffer contains corrupted data (16588800 bytes).
[video4linux2,v4l2 @ 0xffff6c000ba0] Dequeued v4l2 buffer contains corrupted data (16588800 bytes).

Any suggestions on how to diagnose this problem?

Update: Evidently this is an IMX296. Do I need to do something special to get this to work?

Thanks.

hello theosib,

do you meant the physical camera module you’re using is actually an IMX296?

Yes. The physical camera module is an IMX296. Is this expected to work out of the box?

I got a USB adaptor board for this camera. Here’s what dmesg says:

[241087.757447] usb 1-2.1: new high-speed USB device number 8 using tegra-xusb
[241087.869919] usb 1-2.1: New USB device found, idVendor=0c45, idProduct=636d, bcdDevice= 1.00
[241087.869928] usb 1-2.1: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[241087.869932] usb 1-2.1: Product: Arducam IMX477 HQ Camera
[241087.869936] usb 1-2.1: Manufacturer: Arducam Technology Co., Ltd.
[241087.869939] usb 1-2.1: SerialNumber: UC517
[241087.873554] uvcvideo: Found UVC 1.00 device Arducam IMX477 HQ Camera (0c45:636d)
[241087.895365] input: Arducam IMX477 HQ Camera: Arduc as /devices/platform/3610000.xhci/usb1/1-2/1-2.1/1-2.1:1.0/input/input9

It shows up as /dev/video1. It looks like the 477 driver should work with this. I can get a list of supported resolutions using v2l. But I still can’t get any video out of this thing.

I also tried connecting a Logitech USB cam, and that worked fine.

hello theosib,

could you please help me confirm the camera connection types. for example, how your IMX296 connect to Orin Nano platform?

Initially, I was using a ribbon cable (I believe 15 pin on the camera side, 22 on the jetson side). So just to be clear, there are two scenarios I’ve tried:

  • Direct connect via ribbon cable to the CSI connector on the jetson. I can get metadata, but attempts to get video data say the data has been corrupted.
  • Indirect from ribbon cable to Arducam through USB to jetson. I can get metadata, but attempts to get video time out.

hello theosib,

let’s separate these two…
(1) Direct connect via ribbon cable to the CSI connector.
since the physical camera module is an IMX296, do you already done driver implementations to port the driver/device tree to Orin series?
(2) through USB to Jetson
in this way… it’ll simply consider as normal USB camera. it’s the board to transit the camera signaling as YUV for sending to Jetson, you may execute v4l to handle the camera stream.

I have not installed an IMX296 driver. Somewhere I have a tab open to where I can get a kernel patch, but some things I read suggested to me that the built-in 477 driver should support the 296. I didn’t want to go through all the trouble of installing kernel sources, making sure the patch was for the right kernel version, taking various corrective measures to get it to apply otherwise, etc., if the kernel was supposed to support the 296 already. Is there somewhere I can get a pre-built driver for this camera sensor?

As for USB, from that I don’t get any stream. Is it possible that the Arducam adaptor board is meant for a sensor other than the 296 and therefore simply isn’t compatible with it?

Thanks.

where did you read this info? can you see sensor device register the linux kernel correctly?
please check… $ ls /dev/video*, and also $ dmesg > klogs.txt.

I inferred it from random forum discussions that from people who are probably as confused as I am.

crw-rw----+ 1 root video 81, 0 May 12 15:40 /dev/video0
crw-rw----+ 1 root video 81, 4 May 18 15:42 /dev/video1
crw-rw----+ 1 root video 81, 5 May 18 15:42 /dev/video2

/dev/video1 and 2 are a USB webcam.

I’ll add dmesg as an attachment.
klogss.txt (122.9 KB)

I’m trying to figure out how to build the imx296 driver. None of the Ubuntu kernel source packages correspond to the currently installed kernel (5.10.104-tegra). I did find downstream kernel source at GitHub - OE4T/linux-tegra-5.10: NVIDIA downstream Linux kernel for Jetson platforms in single-repo form, derived from L4T R35.x series BSP, but upon unpacking that, there doesn’t seem to be an IMX296 driver anywhere in there. Is there another way I can get the source for this driver?

According to the page at https://developer.nvidia.com/embedded/jetson-partner-supported-cameras?t1_image-sensor=IMX296&t1_sensor-type=Global+Shutter&t1_supported-jetson-products=Orin, the IMX296 is supposed to be supported, so I feel like there must be something obvious I’m just missing here.

hello theosib,

according to Jetson Partner Supported Cameras page, that shows all the camera sensor and driver maintain by Jetson Camera Partners.
you may contact with partners to purchase the camera modules, and consult with them for your camera solutions.

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