IMX477 Driver allows hires images, but breaks gstreamer and v4l2 utilities

  1. Where did you get the camera module(s)?
    (Raspberry Pi HQ Camera Module - SEN-16760 - SparkFun Electronics)
  2. Model number of the product(s).
    Raspberry Pi HQ IMX477
  3. What hardware/platform were you working on?
    NVIDIA Jetson nano developer kit, Jetpack 4.6.1 (updated to L4T 32.7.3)
  4. Instructions you have followed. (link/manual/etc.)
    Used the full installation script:
    Releases · ArduCAM/MIPI_Camera · GitHub
  5. Problems you were having.
    The camera is able to take images using the nvargus_nvraw utility without any apparent issue. However, I am not able to get any video feeds through gstreamer or using the v4l2 utility. v4l2 will show the available camera modes, but commands using the gstreamer or v4l2 for previewing a video feed hang indefinitely. The v4l2 is also not able to capture images (but gstreamer can still capture images). Before installing the driver, I was able to run video feeds with both of these utilities with no problem. I did read somewhere that maybe the arducam driver could be overwriting some of the native jetpack graphics software, which could be blocking the ability to generate a video feed, but I don’t know.
  6. The dmesg log from your hardware.
    Here is what I am running to see the available modes:

v4l2-ctl --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘RG10’
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 4032x3040
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 3840x2160
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.017s (60.000 fps)

Here’s what I am using to capture an image:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=4032,height=3040,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test_v4l2.raw

And the command hangs. When I run dmesg, I believe this is the following corresponding behavior until I cancel the command:

[84726.919897] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 0
[84726.953277] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 1
[84726.986656] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 2
[84727.020044] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 3
[84727.053326] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 4
[84727.086777] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 5
[84727.120244] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 6
[84727.154198] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 7
[84727.186668] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 8
[84727.220198] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 9
[84727.253521] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 10
(this continues until you cancel the command)
7. Troubleshooting attempts you’ve made.
8. What help do you need?
Understanding why the driver installation has affected use of gstreamer and v4l2 and how to fix it.

@alecy14

–set-ctrl=sensor_mode=<mode_index>, you can try to increase this parameter. mode_index is 0 for 4032x3040 resolution. You can set it to --set-ctrl=sensor_mode=0