The camera has the foolowing error

dmabuf fd error:

[  126.353091] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: could not get buf err=-22 ids[7].id<-->fd=1604
[  126.364454] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: dump job->pin_ids:8
[  126.373332] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[0].id<-->fd=688
[  126.383038] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[1].id<-->fd=1085
[  126.392781] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[2].id<-->fd=1416
[  126.402488] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[3].id<-->fd=1432
[  126.412173] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[4].id<-->fd=1552
[  126.421858] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[5].id<-->fd=1554
[  126.431553] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[6].id<-->fd=1578
[  126.441241] iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: job->pin_ids[7].id<-->fd=1604
[  126.450934] falcon 15340000.vic: >>>>>> pin_job_mem -22
[  126.456372] falcon 15340000.vic: nvhost_ioctl_channel_submit: dump user-space args relocs:
[  126.464974] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[0]: cmdbuf_mem=690, cmdbuf_offset=13804, target=688, target_offset=30720
[  126.478544] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[1]: cmdbuf_mem=690, cmdbuf_offset=13816, target=1085, target_offset=0
[  126.491830] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[2]: cmdbuf_mem=690, cmdbuf_offset=13828, target=1416, target_offset=0
[  126.505120] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[3]: cmdbuf_mem=690, cmdbuf_offset=13840, target=1432, target_offset=917504
[  126.518880] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[4]: cmdbuf_mem=690, cmdbuf_offset=13852, target=1552, target_offset=1179648
[  126.532732] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[5]: cmdbuf_mem=690, cmdbuf_offset=13864, target=1554, target_offset=0
[  126.546028] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[6]: cmdbuf_mem=690, cmdbuf_offset=13876, target=1578, target_offset=3407872
[  126.559868] falcon 15340000.vic: nvhost_ioctl_channel_submit: args_reloc[7]: cmdbuf_mem=690, cmdbuf_offset=13888, target=1604, target_offset=4325376
[  126.573715] falcon 15340000.vic: nvhost_ioctl_channel_submit: dump kernel-space job relocs:
[  126.582405] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[0]: cmdbuf_mem=690, cmdbuf_offset=13804, target=688, target_offset=30720
[  126.595889] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[1]: cmdbuf_mem=690, cmdbuf_offset=13816, target=1085, target_offset=0
[  126.609109] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[2]: cmdbuf_mem=690, cmdbuf_offset=13828, target=1416, target_offset=0
[  126.622320] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[3]: cmdbuf_mem=690, cmdbuf_offset=13840, target=1432, target_offset=917504
[  126.635987] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[4]: cmdbuf_mem=690, cmdbuf_offset=13852, target=1552, target_offset=1179648
[  126.649739] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[5]: cmdbuf_mem=690, cmdbuf_offset=13864, target=1554, target_offset=0
[  126.662953] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[6]: cmdbuf_mem=690, cmdbuf_offset=13876, target=1578, target_offset=3407872
[  126.676707] falcon 15340000.vic: nvhost_ioctl_channel_submit: job_reloc[7]: cmdbuf_mem=690, cmdbuf_offset=13888, target=1604, target_offset=4325376
[  126.690460] falcon 15340000.vic: nvhost_ioctl_channel_submit: failed with err nvhost_job_pin
[  126.699248] falcon 15340000.vic: nvhost_ioctl_channel_submit: =====================
[  126.707224] falcon 15340000.vic: nvhost_ioctl_channel_submit: failed with err 0

nvenc firmware error:

 sudo dmesg | grep falcon
[    8.074176] falcon 15340000.vic: Adding to iommu group 32
[    8.085331] falcon 15340000.vic: initialized
[    8.090136] falcon 15380000.nvjpg: Adding to iommu group 33
[    8.099364] falcon 15380000.nvjpg: initialized
[    8.104147] falcon 15540000.nvjpg1: Adding to iommu group 34
[    8.113414] falcon 15540000.nvjpg1: initialized
[    8.118275] falcon 154c0000.nvenc: Adding to iommu group 35
[    8.128796] falcon 154c0000.nvenc: initialized
[    8.133569] falcon 15a50000.ofa: Adding to iommu group 36
[    8.142581] falcon 15a50000.ofa: initialized
[   39.992922] falcon 154c0000.nvenc: Direct firmware load for nvhost_nvenc080.fw failed with error -2
[   40.002387] falcon 154c0000.nvenc: Falling back to sysfs fallback for: nvhost_nvenc080.fw
[   40.011742] falcon 154c0000.nvenc: looking for firmware in subdirectory

version:jetpack 5.1.1

Check the patch from below link.

你好,问题依旧存在,请问这个是否和vic性能相关,有进一步的解决方向吗?

Please give more detail information not just a log only.

jtop:

Do you boost the clocks to verify?

sudo nvpmodel -m 0
sudo jetson_clocks
sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

echo userspace > /sys/devices/13e10000.host1x/15340000.vic/devfreq/15340000.vic/governor

是的,

cat /sys/devices/platform/13e40000.host1x/15340000.vic/devfreq/15340000.vic/governor
userspace
cat /sys/devices/platform/13e40000.host1x/15340000.vic/devfreq/15340000.vic/max_freq
729600000
cat /sys/devices/platform/13e40000.host1x/15340000.vic/devfreq/15340000.vic/cur_freq
729600000

Hi,
The VIC/NVENC prints are harmless. If you are bringing up a camera, would suggest check camera driver. You would need to have a good driver for successfully capturing frame data through v4l2-ctl command.

你说的是kernel driver还是gstreamer driver?

You can verify your sensor kernel driver by v4l2-ctl first.

Thanks

Please verify by --stream-mmap -d /dev/video*
Also need to issue multiple cameras if your case need multiple cameras.

Thanks

试了,发现也会有一样的问题,是否能给个排查方向?

 ps -elf | grep v4l2
0 S nvidia   4061609       1  0  80   0 -  7565 vb2_co 03:14 ?        00:00:00 v4l2-ctl --device=/dev/video0 --stream-mmap
0 S nvidia   4061610       1  0  80   0 -  7565 vb2_co 03:14 ?        00:00:00 v4l2-ctl --device=/dev/video1 --stream-mmap
0 S nvidia   4061611       1  0  80   0 -  7565 -      03:14 ?        00:00:00 v4l2-ctl --device=/dev/video2 --stream-mmap
0 S nvidia   4061612       1  0  80   0 -  7565 vb2_co 03:14 ?        00:00:00 v4l2-ctl --device=/dev/video3 --stream-mmap
0 S nvidia   4061613       1  0  80   0 -  7565 vb2_co 03:14 ?        00:00:00 v4l2-ctl --device=/dev/video4 --stream-mmap
0 S nvidia   4061614       1  0  80   0 -  7565 vb2_co 03:14 ?        00:00:00 v4l2-ctl --device=/dev/video5 --stream-mmap
0 S nvidia   4061615       1  0  80   0 -  7565 vb2_co 03:14 ?        00:00:00 v4l2-ctl --device=/dev/video6 --stream-mmap
0 S nvidia   4061616       1  0  80   0 -  7565 vb2_co 03:14 ?        00:00:00 v4l2-ctl --device=/dev/video7 --stream-mmap
0 S nvidia   4165001 4066324  0  80   0 -  2143 pipe_r 03:22 pts/2    00:00:00 grep --color=auto v4l2

What’s the error message?
And I would suggest upgrade to latest release to confirm again.

我这边发现开启NVMAP_CONFIG_DEFER_FD_RECYCLE配置,没有再出现

iommu_context_dev 13e40000.host1x:niso1_ctx0: pin_array_ids: could not get buf err

但出现了如下错误

[315408.632694] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[315408.642066] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[315408.652758] (NULL device *): vi_capture_control_message: NULL VI channel received
[315408.660650] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[315408.671647] (NULL device *): vi_capture_control_message: NULL VI channel received
[315408.679563] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 1
[315408.690605] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[315408.700531] mv-max9296 2-0008: stop streaming...

是否有进一步的解决方案?

This error tell unable capture frame data from the sensor.
It could be sensor driver’s problem.

能否给一个排查方向,我这边看fd的分配和释放是用户空间来操作的。

Suppose it’s sensor stability issue. Please check with your sensor vendor for the driver problem.

NVMAP_CONFIG_HANDLE_AS_FD := y
这个配置会导致非公开的代码无法运行吗?

Sorry, I can’t tell it. Could you help to confirm it.

Thanks