The patch in this thread fixes this problem.
https://forums.developer.nvidia.com/t/orin-vi5-channel-stop-kernel-panic-on-jetpack5-1-1/258971/7
But after running for 6 hours, the following error will be printed.
[21111.532847] tegra_channel_kthread_capture_enqueue:[vi-output, isx031 7-0030]->[21111008285070] - [21108455357441] = 2552927629 ns
[21111.532909] tegra194-vi5 13e00000.host1x:vi0@15c00000: vi_channel_close_ex,240
[21111.532914] tegra194-vi5 13e00000.host1x:vi0@15c00000: vi_channel_close_ex,242
[21111.532915] tegra194-vi5 13e00000.host1x:vi0@15c00000: vi_channel_close_ex,245
[21111.532917] tegra194-vi5 13e00000.host1x:vi0@15c00000: vi_channel_close_ex,248
[21111.532918] tegra194-vi5 13e00000.host1x:vi0@15c00000: vi_channel_close_ex,251
[21111.532919] tegra194-vi5 13e00000.host1x:vi0@15c00000: vi_channel_close_ex,254
[21111.532920] tegra194-vi5 13e00000.host1x:vi0@15c00000: vi_channel_close_ex,257
[21111.538410] tegra-camrtc-capture-vi tegra-capture-vi: dma_alloc_coherent failed
[21111.538415] tegra-camrtc-capture-vi tegra-capture-vi: fatal: error recovery failed
I looked at the code and found that there is no code to release chan->request[vi_port] in vi5_channel_error_recover, which will cause a memory leak.
There is only tegra_channel_capture_setup in vi5_channel_error_recover, but no related release function. But I found that there is a corresponding release function in vi5_channel_stop_streaming.
dma_free_coherent(chan->tegra_vi_channel[vi_port]->rtcpu_dev,
chan->capture_queue_depth * sizeof(struct capture_descriptor),
chan->request[vi_port], chan->request_iova[vi_port]);
So is this a code logic bug?
Also, will the patches in this post be reflected in new versions later?