ADV7280-M msleep(20) workaround alternative

Hello all,
I’m trying to capture video from ADV7280-M, however I’m unable to do it without adding msleep(20) within tegra_channel_capture_frame() in the vi4_fops.c. The drawback of this solution is halved framerate (unless it is caused by something else, like FE and FS being too close?).

Mipi signal on data lanes between the frames looks kind of suspicious. I never encountered a signal like this in my short career.

Sample fragment of a trace log from a failed capture looks like this:

click to expand

    kworker/5:3-2071  [005] ....   107.535563: rtos_queue_send_from_isr_failed: tstamp:3638753317 queue:0x0b4a7258
     kworker/5:3-2071  [005] ....   107.535565: rtos_queue_send_from_isr_failed: tstamp:3638753429 queue:0x0b4aad68
     kworker/5:3-2071  [005] ....   107.535567: rtos_queue_send_from_isr_failed: tstamp:3638753539 queue:0x0b4ac998
     kworker/5:3-2071  [005] ....   107.535570: rtos_queue_send_from_isr_failed: tstamp:3638753649 queue:0x0b4ae518
     kworker/5:3-2071  [005] ....   107.535572: rtos_queue_send_from_isr_failed: tstamp:3638753758 queue:0x0b4af2d8
     kworker/5:3-2071  [005] ....   107.535574: rtos_queue_send_from_isr_failed: tstamp:3638753867 queue:0x0b4b0098
     kworker/5:3-2071  [005] ....   107.535576: rtos_queue_send_from_isr_failed: tstamp:3638753976 queue:0x0b4b0e58
     kworker/5:3-2071  [005] ....   107.535578: rtos_queue_send_from_isr_failed: tstamp:3638754096 queue:0x0b4b1c18
     kworker/5:3-2071  [005] ....   107.535581: rtos_queue_send_failed: tstamp:3638755278 queue:0x0b4a7258
     kworker/5:3-2071  [005] ....   107.535583: rtcpu_vinotify_event: tstamp:3638756279 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3638754896 data:0x00000001
     kworker/5:3-2071  [005] ....   107.535585: rtcpu_vinotify_event: tstamp:3639349330 tag:CHANSEL_PXL_SOF channel:0x00 frame:1 vi_tstamp:3639348814 data:0x00000001
     kworker/5:3-2071  [005] ....   107.535587: rtcpu_vinotify_event: tstamp:3639349501 tag:ATOMP_FS channel:0x00 frame:1 vi_tstamp:3639348843 data:0x00000000
     kworker/5:3-2071  [005] ....   107.535589: rtcpu_vinotify_event: tstamp:3639356685 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:1 vi_tstamp:3639356306 data:0x08000000
     kworker/5:3-2071  [005] ....   107.591452: rtcpu_vinotify_event: tstamp:3639925308 tag:CHANSEL_PXL_EOF channel:0x00 frame:1 vi_tstamp:3639924636 data:0x023f0002
     kworker/5:3-2071  [005] ....   107.591458: rtcpu_vinotify_event: tstamp:3639925429 tag:ATOMP_FE channel:0x00 frame:1 vi_tstamp:3639924686 data:0x00000000
     kworker/5:3-2071  [005] ....   107.591460: rtcpu_vinotify_event: tstamp:3639934175 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3639933810 data:0x00000001
     kworker/5:3-2071  [005] ....   107.591464: rtos_queue_peek_from_isr_failed: tstamp:3640531512 queue:0x0b4b4500
     kworker/5:3-2071  [005] ....   107.591466: rtcpu_vinotify_event: tstamp:3640559181 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3640558806 data:0x00000001
     kworker/5:3-2071  [005] ....   107.591468: rtcpu_vinotify_event: tstamp:3641184179 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3641183801 data:0x00000001
     kworker/5:3-2071  [005] ....   107.647506: rtcpu_vinotify_event: tstamp:3641809179 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3641808801 data:0x00000001
     kworker/5:3-2071  [005] ....   107.647514: rtcpu_vinotify_event: tstamp:3642434176 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3642433796 data:0x00000001
     kworker/5:3-2071  [005] ....   107.647516: rtcpu_vinotify_event: tstamp:3643059175 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3643058795 data:0x00000001
     kworker/5:3-2071  [005] ....   107.703498: rtcpu_vinotify_event: tstamp:3643684166 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3643683791 data:0x00000001
     kworker/5:3-2071  [005] ....   107.703504: rtcpu_vinotify_event: tstamp:3644309162 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3644308786 data:0x00000001
     kworker/5:3-2071  [005] ....   107.703506: rtcpu_vinotify_event: tstamp:3644934162 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3644933786 data:0x00000001
 vi-output, imx2-8151  [005] ....   107.756504: tegra_channel_capture_setup: vnc_id 0 W 720 H 576 fmt cb
 vi-output, imx2-8151  [005] ....   107.756538: tegra_channel_capture_done: CFST: no notify!:107.407975232
 vi-output, imx2-8151  [005] ....   107.756546: tegra_channel_capture_frame: sof:107.407975232
 vi-output, imx2-8151  [003] ....   107.759437: tegra_channel_capture_frame: sof:107.647973856
     kworker/5:3-2071  [005] ....   107.759451: rtos_queue_peek_from_isr_failed: tstamp:3645531521 queue:0x0b4b4500
     kworker/5:3-2071  [005] ....   107.759453: rtcpu_vinotify_event: tstamp:3645559157 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3645558781 data:0x00000001
     kworker/5:3-2071  [005] ....   107.759453: rtcpu_vinotify_event: tstamp:3646184154 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:3646183777 data:0x00000001
     kworker/5:3-2071  [005] ....   107.759455: rtos_queue_send_from_isr_failed: tstamp:3646236078 queue:0x0b4a7258
     kworker/5:3-2071  [005] ....   107.759456: rtos_queue_send_from_isr_failed: tstamp:3646236196 queue:0x0b4aad68
     kworker/5:3-2071  [005] ....   107.759456: rtos_queue_send_from_isr_failed: tstamp:3646236309 queue:0x0b4ac998
     kworker/5:3-2071  [005] ....   107.759457: rtos_queue_send_from_isr_failed: tstamp:3646236422 queue:0x0b4ae518
     kworker/5:3-2071  [005] ....   107.759458: rtos_queue_send_from_isr_failed: tstamp:3646236532 queue:0x0b4af2d8
     kworker/5:3-2071  [005] ....   107.759458: rtos_queue_send_from_isr_failed: tstamp:3646236641 queue:0x0b4b0098
     kworker/5:3-2071  [005] ....   107.759459: rtos_queue_send_from_isr_failed: tstamp:3646236749 queue:0x0b4b0e58
     kworker/5:3-2071  [005] ....   107.759460: rtos_queue_send_from_isr_failed: tstamp:3646236858 queue:0x0b4b1c18
     kworker/5:3-2071  [005] ....   107.759461: rtos_queue_send_failed: tstamp:3646237497 queue:0x0b4a7258
     kworker/5:3-2071  [005] ....   107.759462: rtos_queue_send_from_isr_failed: tstamp:3646240937 queue:0x0b4a7258
     kworker/5:3-2071  [005] ....   107.759463: rtos_queue_send_from_isr_failed: tstamp:3646241072 queue:0x0b4aad68
     kworker/5:3-2071  [005] ....   107.759463: rtos_queue_send_from_isr_failed: tstamp:3646241182 queue:0x0b4ac998

Sample fragment of a dmesg log looks like this:

click to expand

[  107.483525] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  107.489994] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  107.500422] vi4: width: 720
[  107.500427] vi4: height: 576
[  107.500430] vi4: pixel format: 203
[  107.500432] vi4: CSI port: 0
[  107.500435] vi4: virtualch: 1
[  107.500437] vi4: data type: 30
[  107.723548] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  107.730131] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  107.740152] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000008
[  107.748047] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000008
[  107.756525] vi4: width: 720
[  107.756527] vi4: height: 576
[  107.756529] vi4: pixel format: 203
[  107.756530] vi4: CSI port: 0
[  107.756532] vi4: virtualch: 1
[  107.756533] vi4: data type: 30
[  107.963427] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  107.969896] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  107.980254] vi4: width: 720
[  107.980257] vi4: height: 576
[  107.980259] vi4: pixel format: 203
[  107.980261] vi4: CSI port: 0
[  107.980262] vi4: virtualch: 1
[  107.980264] vi4: data type: 30
[  107.980651] imx219: stop streaming
[  108.031500] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000008
[  108.039504] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000008

I’d be grateful for any tips. I browsed the forums for similar issues and I must have missed something, for all I found is the msleep(20) workaround.

Regards,
Jaglaz

Have try apply the patch from below link to program the csimux_notify_mask_stream

1 Like