Hello!
We use a custom camera driver that connects to a (non-camera) ASIC which outputs RAW12 data.
The ASIC outputs via a 4-lane CSI-2 connection on 4 Virtual Channels, each channel is mapped to one /dev/videoX device. The output is not continous as is triggered from Jetson (over Ethernet).
We now want to capture all 4 virtual channels in parallel using v4l2-ctl (and saving the generated raw file to a RAMDISK)
After several acquisitions always one random v4l2-ctl will crash with the below error message in the dmesg. This will only happen if we capture all four video devices at the same time, never if we just capture e.g. one. Is this a performance topic?
Thanks for any help!
[ 1092.880584] ------------[ cut here ]------------
[ 1092.885495] channel context at 2 is busy
[ 1092.885525] WARNING: CPU: 0 PID: 9852 at /dvs/git/dirty/git-master_linux/kernel/nvidia/drivers/platform/tegra/rtcpu/capture-ivc.c:176 tegra_capture_ivc_notify_chan_id+0x18c/0x1b0
[ 1092.901878] Modules linked in: spidev nv_8191(E) nvidia_modeset(O) fuse xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c xt_addrtype iptable_filter br_netfilter lzo_rle lzo_compress zram overlay ramoops reed_solomon aes_ce_blk crypto_simd cryptd rtl8822ce rtk_btusb snd_soc_tegra186_asrc aes_ce_cipher snd_soc_tegra186_dspk snd_soc_tegra210_ope snd_soc_tegra186_arad snd_soc_tegra210_mvc snd_soc_tegra210_iqc btusb ghash_ce btrtl snd_soc_tegra210_adx snd_soc_tegra210_dmic snd_soc_tegra210_afc sha2_ce snd_soc_tegra210_adsp btbcm snd_soc_tegra210_admaif sha256_arm64 snd_soc_tegra210_amx ucsi_ccg snd_soc_tegra210_mixer snd_soc_tegra210_i2s snd_soc_tegra210_sfc snd_soc_tegra_machine_driver btintel snd_soc_tegra_pcm typec_ucsi sha1_ce snd_soc_tegra_utils cam_cdi_tsc cfg80211 snd_hda_codec_hdmi nvadsp snd_soc_tegra210_ahub snd_soc_simple_card_utils typec snd_soc_spdif_tx snd_hda_tegra tegra_bpmp_thermal nct1008
[ 1092.901978] i2c_nvvrs11 tegra210_adma nv_hawk_owl snd_hda_codec snd_soc_rt5640 max96712 snd_hda_core userspace_alert snd_soc_rl6231 spi_tegra114 nvidia(O) loop binfmt_misc ina3221 pwm_fan nvgpu nvmap ip_tables x_tables [last unloaded: mtd][ 1092.902012] CPU: 0 PID: 9852 Comm: vi-output, Tainted: G OE 5.10.120-tegra #1
[ 1092.902014] Hardware name: Unknown Jetson AGX Orin Developer Kit/Jetson AGX Orin Developer Kit, BIOS 4.1-33958178 08/01/2023
[ 1092.902017] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=–)
[ 1092.902021] pc : tegra_capture_ivc_notify_chan_id+0x18c/0x1b0
[ 1092.902025] lr : tegra_capture_ivc_notify_chan_id+0x18c/0x1b0
[ 1092.902026] sp : ffff80002bf73ad0
[ 1092.902028] x29: ffff80002bf73ad0 x28: 0000000000000000
[ 1092.902032] x27: 0000000000001043 x26: ffff6df34e833800
[ 1092.902036] x25: ffff6df2c08418b8 x24: ffff6df2c4eb0088
[ 1092.902041] x23: 0000000000000060 x22: ffff6df2c4eb0080
[ 1092.902044] x21: ffff6df2c4eb0c80 x20: 0000000000000002
[ 1092.902048] x19: 0000000000000060 x18: 0000000000000000
[ 1092.902052] x17: 0000000000000000 x16: 0000000000000000
[ 1092.902056] x15: ffff6df326ce9430 x14: ffffffffffffffff
[ 1092.902060] x13: ffffc14172888de8 x12: ffffc14172888a1b
[ 1092.902064] x11: 0000000000000000 x10: 0000000000000ab0
[ 1092.902068] x9 : ffff80002bf73ad0 x8 : 2073692032207461
[ 1092.902072] x7 : 20747865746e6f63 x6 : c00000010000005e
[ 1092.902076] x5 : ffff6e01ecebc958 x4 : ffffc14172587a48
[ 1092.902079] x3 : 0000000000000001 x2 : ffff6e01ecebc960
[ 1092.902083] x1 : 0000000000000000 x0 : 0000000000000000
[ 1092.902087] Call trace:
[ 1092.902090] tegra_capture_ivc_notify_chan_id+0x18c/0x1b0
[ 1092.902095] vi_capture_setup+0x35c/0x670
[ 1092.902099] tegra_channel_capture_setup+0xe8/0x2d0
[ 1092.902102] vi5_channel_error_recover+0x154/0x230
[ 1092.902105] tegra_channel_error_recover+0x78/0xa0
[ 1092.902108] tegra_channel_kthread_capture_dequeue+0x130/0x1f0
[ 1092.902112] kthread+0x148/0x170
[ 1092.902116] ret_from_fork+0x10/0x24
[ 1092.902118] —[ end trace 68506e371e03ea5a ]—
[ 1092.911207] tegra194-vi5 13e40000.host1x:vi0@15c00000: failed to update control callback
*[ 1092.919212] (NULL device ): vi_capture_control_message: NULL VI channel received
[ 1092.920807] tegra-camrtc-capture-vi tegra-capture-vi: vi capture setup failed
[ 1092.927245] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 1092.937164] BUG: Bad page state in process vi-output, pfn:1003e7b
*[ 1092.951178] (NULL device ): vi_capture_control_message: NULL VI channel received
[ 1092.954973] page:0000000077f099e1 refcount:1 mapcount:0 mapping:0000000000000000 index:0x3 pfn:0x1003e7b
[ 1092.960034] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 2
[ 1092.969685] head:0000000085787485 order:3 compound_mapcount:0 compound_pincount:0
[ 1092.988065] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 1092.988260] flags: 0x8000000000010200(slab|head)
[ 1093.002411] raw: 8000000000000000 ffffffb806ef9e01 ffffffb806ef9e88 dead000000000400
[ 1093.010435] raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
[ 1093.018561] head: 8000000000010200 dead000000000100 dead000000000122 ffff6df2c0003900
[ 1093.026683] head: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
[ 1093.034762] page dumped because: non-NULL mapping