[V4L2] Video driver fails when no reply from camera processor

Hello,

I am trying to connect four OV24A1B sensors over four 4 CSI lanes to the Jetson Xavier platform.

The driver is based on the ov5693.c and the device tree is based on the device tree of the ov5693 as well.

I am able to retrieve images from the sensors but sometimes when starting a capture sequence, the driver output the following message.

Mar  6 12:36:23 jetson-0423518027955 kernel: [  467.701199] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:23 jetson-0423518027955 kernel: [  467.701534] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:23 jetson-0423518027955 kernel: [  467.701597] tegra194-vi5 15c10000.vi: channel error, resetting the channel
Mar  6 12:36:23 jetson-0423518027955 kernel: [  467.701880] tegra194-vi5 15c10000.vi: channel error, resetting the channel
Mar  6 12:36:26 jetson-0423518027955 kernel: [  470.209388] tegra194-vi5 15c10000.vi: vi_capture_status : no reply from camera processor
Mar  6 12:36:26 jetson-0423518027955 kernel: [  470.209587] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:29 jetson-0423518027955 kernel: [  472.769383] tegra194-vi5 15c10000.vi: vi_capture_status : no reply from camera processor
Mar  6 12:36:29 jetson-0423518027955 kernel: [  472.769545] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:31 jetson-0423518027955 kernel: [  475.329390] tegra194-vi5 15c10000.vi: vi_capture_status : no reply from camera processor
Mar  6 12:36:31 jetson-0423518027955 kernel: [  475.329557] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:34 jetson-0423518027955 kernel: [  477.889379] tegra194-vi5 15c10000.vi: vi_capture_status : no reply from camera processor
Mar  6 12:36:34 jetson-0423518027955 kernel: [  477.889593] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:36 jetson-0423518027955 kernel: [  480.449385] tegra194-vi5 15c10000.vi: vi_capture_status : no reply from camera processor
Mar  6 12:36:36 jetson-0423518027955 kernel: [  480.449558] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:39 jetson-0423518027955 kernel: [  483.009455] tegra194-vi5 15c10000.vi: vi_capture_status : no reply from camera processor
Mar  6 12:36:39 jetson-0423518027955 kernel: [  483.009666] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.569401] tegra194-vi5 15c10000.vi: vi_capture_status : no reply from camera processor
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.569580] tegra194-vi5 15c10000.vi: vi capture dequeue status failed

I would like to understand what are the possible root causes of this issue?

Moreover, after receiving multiple errors as shown above, the driver ends up in an infinite loop printing the same warning until the platform is rebooted.

Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.569799] ------------[ cut here ]------------
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.569905] WARNING: CPU: 1 PID: 12272 at /home/bacchus/bacchus/Xavier/public_sources/kernel_src/kernel/kernel-4.9/drivers/media/v4l2-core/videobuf2-core.c:901 vb2_buffer_done+0x1f0/0x248
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570180] Modules linked in:
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570187]
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570199] CPU: 1 PID: 12272 Comm: vi-output, ov24 Not tainted 4.9.108+ #135
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570201] Hardware name: jetson-xavier (DT)
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570206] task: ffffffc3b11a1c00 task.stack: ffffffc35fad0000
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570246] PC is at vb2_buffer_done+0x1f0/0x248
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570253] LR is at free_ring_buffers+0x6c/0x140
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570257] pc : [<ffffff8008b577e8>] lr : [<ffffff8008b61f84>] pstate: 20c00045
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570259] sp : ffffffc35fad3d00
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570262] x29: ffffffc35fad3d00 x28: 0000000000000000
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570269] x27: 0000000000000000 x26: ffffffc3d7cf9eb8
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570274] x25: ffffff800d36d000 x24: 431bde82d7b634db
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570311] x23: 0000000000000007 x22: ffffffc3d7cf9b48
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570315] x21: ffffffc3b129e800 x20: ffffffc3b129e800
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570320] x19: ffffffc3d7cf9018 x18: 0000000000000010
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570324] x17: 0000007fab457ad0 x16: 0000000000002b51
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570329] x15: 0000000000000006 x14: 7461747320657565
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570334] x13: 7571656420657275 x12: 7470616320697620
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570339] x11: 3a69762e30303030 x10: 3163353120356976
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570346] x9 : 0000000000000b2a x8 : 000000000000004d
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570351] x7 : ffffff8009ed4f88 x6 : 000000000000004a
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570356] x5 : 0000000000000000 x4 : 0000000000000007
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570361] x3 : 0000000000000001 x2 : 0000000000000007
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570366] x1 : 0000000000000007 x0 : ffffff8008b61f84
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570370]
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570373] ---[ end trace 1bd712ad98c0c69e ]---
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570460] Call trace:
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570499] [<ffffff8008b577e8>] vb2_buffer_done+0x1f0/0x248
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570504] [<ffffff8008b61f84>] free_ring_buffers+0x6c/0x140
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570535] [<ffffff8008b6bb6c>] tegra_channel_kthread_capture_dequeue+0xa4/0x370
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570544] [<ffffff80080dabd8>] kthread+0xe8/0x100
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570580] [<ffffff8008083500>] ret_from_fork+0x10/0x50
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570588] vb2_buffer_done: Video buffer state before warning: 7
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570749] ------------[ cut here ]------------
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.570843] WARNING: CPU: 1 PID: 12272 at /home/bacchus/bacchus/Xavier/public_sources/kernel_src/kernel/kernel-4.9/drivers/media/v4l2-core/videobuf2-core.c:901 vb2_buffer_done+0x1f0/0x248
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571151] Modules linked in:
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571155]
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571162] CPU: 1 PID: 12272 Comm: vi-output, ov24 Tainted: G        W       4.9.108+ #135
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571164] Hardware name: jetson-xavier (DT)
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571167] task: ffffffc3b11a1c00 task.stack: ffffffc35fad0000
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571200] PC is at vb2_buffer_done+0x1f0/0x248
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571207] LR is at free_ring_buffers+0x6c/0x140
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571210] pc : [<ffffff8008b577e8>] lr : [<ffffff8008b61f84>] pstate: 20c00045
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571212] sp : ffffffc35fad3d00
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571215] x29: ffffffc35fad3d00 x28: 0000000000000000
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571221] x27: 0000000000000000 x26: ffffffc3d7cf9eb8
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571226] x25: ffffff800d36d000 x24: 431bde82d7b634db
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571231] x23: 0000000000000007 x22: ffffffc3d7cf9b48
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571236] x21: ffffffc3b129e400 x20: ffffffc3b129e400
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571241] x19: ffffffc3d7cf9018 x18: 0000000000000000
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571246] x17: 0000007fab457ad0 x16: 0000000000002b51
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571251] x15: ffffffffffffffff x14: 6e696e7261772065
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571256] x13: 726f666562206574 x12: 6174732072656666
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571261] x11: 7562206f65646956 x10: 203a656e6f645f72
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571266] x9 : 0000000000000b4c x8 : 76205d3838353037
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571272] x7 : 352e35383420205b x6 : ffffffc35fad3727
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571276] x5 : 0000000000000001 x4 : 0000000000000007
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571282] x3 : 0000000000000002 x2 : 0000000000000007
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571314] x1 : 0000000000000007 x0 : ffffff8008b61f84
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571320]
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571322] ---[ end trace 1bd712ad98c0c69f ]---
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571405] Call trace:
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571412] [<ffffff8008b577e8>] vb2_buffer_done+0x1f0/0x248
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571416] [<ffffff8008b61f84>] free_ring_buffers+0x6c/0x140
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571422] [<ffffff8008b6bb6c>] tegra_channel_kthread_capture_dequeue+0xa4/0x370
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571427] [<ffffff80080dabd8>] kthread+0xe8/0x100
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571431] [<ffffff8008083500>] ret_from_fork+0x10/0x50
Mar  6 12:36:41 jetson-0423518027955 kernel: [  485.571434] vb2_buffer_done: Video buffer state before warning: 7

Do you have an idea how to avoid the infinite loop ? It seems to be linked with the V4L2 buffer management.

Thanks in advance,

hello Mobilaz,

please note that your 4x 4-lane sensor should connected to CSI-A/CSI-C/CSI-E/CSI-G.
please refer to Sensor Driver Programming Guide, please check the diagram of the port index mapping for different Jetson platforms.

you should also refer to Topic 1046625 for some details. thanks