Driver Error When using V4L2 to Capture IMX477 Video

I am trying to test an IMX477 Camera using the RidgeRun driver and V4L2 with the following command:

v4l2-ctl -d /dev/video0 --stream-mmap

The command hangs and does not produce the expected output with a < representing each frame processed. I do not need to save these frames anywhere as I am just trying to test the sensor + driver. However, the following GStreamer command DOES work just fine and produces a valid MP4.

gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! nvvidconv ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test_cam1_full.mp4

If I switch the nvarguscamerasrc for nvv4l2camerasrc, I get the same results as the V4L2 command. The following dmesg output appears after the failed v4l2-ctl command:

[  252.314842] ------------[ cut here ]------------
[  252.315163] WARNING: CPU: 0 PID: 976 at drivers/media/common/videobuf2/videobuf2-core.c:1956 __vb2_queue_cancel+0x1b8/0x220
[  252.315444] Modules linked in: 8021q garp mrp realtek cfg80211 snd_soc_tegra210_ope snd_soc_tegra186_asrc snd_soc_tegra186_dspk snd_soc_tegra186_arad snd_soc_tegra210_iqc snd_soc_tegra210_mvc snd_soc_tegra210_afc snd_soc_tegra210_dmic snd_soc_tegra210_adx snd_soc_tegra210_amx snd_soc_tegra210_admaif snd_soc_tegra210_mixer snd_soc_tegra210_sfc snd_soc_tegra210_i2s snd_soc_tegra_pcm nvgpu aes_ce_blk crypto_simd cryptd aes_ce_cipher ghash_ce sha2_ce sha256_arm64 sha1_ce tegra_udrm snd_soc_tegra_machine_driver snd_soc_spdif_tx pwm_fan snd_soc_tegra210_adsp mttcan snd_hda_codec_hdmi can_dev max77620_thermal snd_hda_tegra snd_soc_tegra_utils snd_hda_codec userspace_alert tegra_bpmp_thermal snd_soc_simple_card_utils nvadsp snd_soc_tegra210_ahub cdc_acm snd_hda_core tegra210_adma nv_imx477 spi_tegra114 nvmap ina3221 fuse
[  252.317342] CPU: 0 PID: 976 Comm: v4l2-ctl Tainted: G        W         5.10.104-l4t-r35.1+g54ed8db939c5 #1
[  252.321254] Hardware name: Unknown NVIDIA Jetson Xavier NX Developer Kit/NVIDIA Jetson Xavier NX Developer Kit, BIOS 1.0-d7fb19b 08/10/2022
[  252.333872] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[  252.339648] pc : __vb2_queue_cancel+0x1b8/0x220
[  252.344360] lr : __vb2_queue_cancel+0x40/0x220
[  252.349074] sp : ffff8000157e3ac0
[  252.352287] x29: ffff8000157e3ac0 x28: ffff60f36e87e580
[  252.358015] x27: ffffad3164fd7000 x26: fffffffffffffe00
[  252.363255] x25: ffff60f34a9dc428 x24: ffff60f36e87eb80
[  252.369032] x23: ffff60f341f581f8 x22: ffff60f341f58080
[  252.374278] x21: ffff60f341f58678 x20: ffff60f341f58720
[  252.379872] x19: ffff60f341f58678 x18: ffffffffffffffff
[  252.385128] x17: 0000000000000000 x16: ffffad31647f8970
[  252.390934] x15: ffffffffffffffff x14: ffffff0000000000
[  252.396152] x13: ffffffffffffffff x12: 0000000000000003
[  252.401924] x11: 0101010101010101 x10: 0000000000000a80
[  252.407184] x9 : ffff8000157e37e0 x8 : ffff60f36e87f060
[  252.412515] x7 : 00000000000000eb x6 : 00000001fe754e57
[  252.418284] x5 : 00ffffffffffffff x4 : 00184d134d4cc95c
[  252.423454] x3 : 0000000000000017 x2 : ffffad316381d090
[  252.429048] x1 : ffff60f341ffc3f0 x0 : 0000000000000004
[  252.434164] Call trace:
[  252.436611]  __vb2_queue_cancel+0x1b8/0x220
[  252.440909]  vb2_core_queue_release+0x30/0x60
[  252.445074]  _vb2_fop_release+0x88/0xa4
[  252.449101]  tegra_channel_close+0x68/0x180
[  252.453126]  v4l2_release+0xc0/0xf4
[  252.456630]  __fput+0x80/0x234
[  252.459759]  ____fput+0x24/0x30
[  252.462499]  task_work_run+0x88/0x140
[  252.466421]  do_exit+0x354/0xa34
[  252.469392]  do_group_exit+0x40/0xa0
[  252.472902]  get_signal+0x108/0x83c
[  252.476610]  do_notify_resume+0x188/0x990
[  252.480596]  work_pending+0xc/0x384
[  252.484092] ---[ end trace be0f3dd1e08c94fb ]---
[  252.489260] videobuf2_common: driver bug: stop_streaming operation is leaving buf 00000000c6b4a842 in active state
[  252.499280] videobuf2_common: driver bug: stop_streaming operation is leaving buf 00000000ec0d8626 in active state
[  252.509600] videobuf2_common: driver bug: stop_streaming operation is leaving buf 00000000c634891e in active state
[  252.519751] videobuf2_common: driver bug: stop_streaming operation is leaving buf 00000000618ac52e in active state

I am using a custom Yocto image with a custom baseboard. Here is the Linux version info:

[    0.000000] Linux version 5.10.104-l4t-r35.1+g54ed8db939c5 (oe-user@oe-host) (aarch64-oe4t-linux-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Thu Mar 9 22:14:31 UTC 2023

Has anyone else seen this behavior or have any advice for further debugging? @DavidSoto-RidgeRun Have any other users of the driver seen anything similar to this?

Thanks!

hello pwolfe1,

could you please confirm your camera functionality by using native Jetpack-5.1 release image?

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