Custom NVIDIA CSI2 CAMERA Board Display Issue After a Few Frames

Hello,

We are using the XS9922B chip to convert data from four AHD cameras into MIPI CSI2 signals, which are then connected to the NVIDIA CSI interface.
We have completed the device tree and driver development, successfully testing video signals and achieving stable operation (1920x1080 at 25fps, with test video).
However, when we connect the actual AHD camera signal, we encounter an issue where the system cannot operate for long. After a few seconds to over a minute of video input, the image exhibits partial corruption, and errors are reported, causing the video stream to stop displaying. Restarting the gstreamer pipeline continues to result in the same issue. We would appreciate any advice to help us diagnose the problem.

Specific steps and observations are as follows:

1. System Version

uname -a
Linux ubuntu 5.10.120-tegra #3 SMP PREEMPT Thu Sep 19 21:32:22 CST 2024 aarch64 aarch64 aarch64 GNU/Linux

cat /etc/nv_tegra_release 
# R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug  1 19:57:35 UTC 2023

2.Using GStreamer to Open the Device Without Connecting the AHD Camera (Outputting Test Video)

gst-launch-1.0 -v v4l2src device="/dev/video4" ! video/x-raw,framerate=30/1,width=1920,height=1080,format=UYVY ! xvimagesink &

We can see that it outputs the color test image normally. However, we also noticed an error: CHANSEL_NOMATCH.

Trace output:

cat /sys/kernel/debug/tracing/trace_pipe
     kworker/2:1-4493    [002] .... 16226.934150: rtcpu_vinotify_event: tstamp:510189379631 cch:-1 vi:1 tag:FS channel:0x00 frame:0 vi_tstamp:16326059837312 data:0x0000000000000012
     kworker/2:1-4493    [002] .... 16226.934150: rtcpu_vinotify_event: tstamp:510189379759 cch:-1 vi:1 tag:FS channel:0x02 frame:0 vi_tstamp:16326059997120 data:0x0000000000000012
     kworker/2:1-4493    [002] .... 16226.934150: rtcpu_vinotify_error: tstamp:510189382651 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x84 frame:0 vi_tstamp:16326060219712 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16226.934151: rtcpu_vinotify_error: tstamp:510189396223 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x44 frame:0 vi_tstamp:16326060654080 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16226.934151: rtcpu_vinotify_event: tstamp:510189704728 cch:0 vi:1 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:16326060034240 data:0x0000000000000001
     kworker/2:1-4493    [002] .... 16226.934151: rtcpu_vinotify_event: tstamp:510189704860 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:16326060035808 data:0x000000000802085f
     kworker/2:1-4493    [002] .... 16226.934151: rtcpu_vinotify_event: tstamp:510189705011 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x04 frame:0 vi_tstamp:16326060055168 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16226.934152: rtcpu_vinotify_event: tstamp:510189705142 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:16326060131744 data:0x359e2d0010000000
     kworker/2:1-4493    [002] .... 16226.934152: rtcpu_vinotify_event: tstamp:510189705292 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:16326060138272 data:0x0000000031000860
     kworker/2:1-4493    [002] .... 16226.934152: rtcpu_vinotify_event: tstamp:510189705421 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x84 frame:0 vi_tstamp:16326060219712 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16226.934152: rtcpu_vinotify_event: tstamp:510189705570 cch:-1 vi:1 tag:FS channel:0x01 frame:0 vi_tstamp:16326060440672 data:0x0000000000000012
     kworker/2:1-4493    [002] .... 16226.934152: rtcpu_vinotify_event: tstamp:510189705699 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x44 frame:0 vi_tstamp:16326060654080 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16226.934153: rtcpu_vinotify_event: tstamp:510190581516 cch:0 vi:1 tag:CHANSEL_PXL_EOF channel:0x23 frame:0 vi_tstamp:16326098404576 data:0x0000000004370002
     kworker/2:1-4493    [002] .... 16226.934153: rtcpu_vinotify_event: tstamp:510190581649 cch:0 vi:1 tag:ATOMP_FRAME_DONE channel:0x23 frame:0 vi_tstamp:16326098405184 data:0x0000000000000000
     kworker/2:1-4493    [002] .... 16226.934153: rtcpu_vinotify_event: tstamp:510190581800 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:16326098408064 data:0x000000000202085f
     kworker/2:1-4493    [002] .... 16226.934153: rtcpu_vinotify_event: tstamp:510190581930 cch:0 vi:1 tag:FE channel:0x03 frame:0 vi_tstamp:16326098405792 data:0x0000000000000022
     kworker/2:1-4493    [002] .... 16226.934154: rtcpu_vinotify_event: tstamp:510190582083 cch:0 vi:1 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:16326098405792 data:0x0000000800000000
     kworker/2:1-4493    [002] .... 16226.934154: rtcpu_vinotify_event: tstamp:510190582213 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:16326098414304 data:0x000000000002085f
     kworker/2:1-4493    [002] .... 16226.934154: rtcpu_vinotify_event: tstamp:510190582363 cch:-1 vi:1 tag:FE channel:0x00 frame:0 vi_tstamp:16326098430048 data:0x0000000000000022
     kworker/2:1-4493    [002] .... 16226.934154: rtcpu_vinotify_event: tstamp:510190582494 cch:-1 vi:1 tag:FE channel:0x02 frame:0 vi_tstamp:16326098586528 data:0x0000000000000022
     kworker/2:1-4493    [002] .... 16226.934154: rtcpu_vinotify_error: tstamp:510190627904 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x04 frame:0 vi_tstamp:16326100054624 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16226.934154: rtcpu_vinotify_error: tstamp:510190632634 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x84 frame:0 vi_tstamp:16326100219136 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16226.934155: rtcpu_vinotify_error: tstamp:510190646205 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x44 frame:0 vi_tstamp:16326100653504 data:0x00000000000003c9

3.Using GStreamer to Open the Device with AHD Camera Connected

Initially, we can receive data from the AHD camera. However, after a few seconds to over a minute, the image shows corruption, and we can observe corresponding errors in dmesg and trace_pipe.

Live dmesg output:

[16771.638938] --------cntt=  24-----
[16778.425426] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[16778.465432] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[16778.505429] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[16778.542079] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512

We can see that after seven seconds of capturing, there is a screen distortion phenomenon, and image capture cannot continue.

cat /sys/kernel/debug/tracing/trace_pipe

     kworker/2:1-4493    [002] .... 16792.697559: rtcpu_vinotify_error: tstamp:527869336376 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x84 frame:0 vi_tstamp:16891818738848 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16792.697561: rtcpu_vinotify_event: tstamp:527869418413 cch:0 vi:1 tag:FE channel:0x01 frame:0 vi_tstamp:16891810619616 data:0x0000000000000022
     kworker/2:1-4493    [002] .... 16792.697561: rtcpu_vinotify_event: tstamp:527869418565 cch:0 vi:1 tag:FS channel:0x01 frame:0 vi_tstamp:16891811998976 data:0x0000000000000012
     kworker/2:1-4493    [002] .... 16792.697562: rtcpu_vinotify_event: tstamp:527869418696 cch:0 vi:1 tag:CHANSEL_NOMATCH channel:0x44 frame:0 vi_tstamp:16891812247584 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16792.697562: rtcpu_vinotify_event: tstamp:527869418846 cch:-1 vi:1 tag:FE channel:0x02 frame:0 vi_tstamp:16891817109568 data:0x0000000000000022
     kworker/2:1-4493    [002] .... 16792.697562: rtcpu_vinotify_event: tstamp:527869418977 cch:-1 vi:1 tag:FS channel:0x02 frame:0 vi_tstamp:16891818485472 data:0x0000000000000012
     kworker/2:1-4493    [002] .... 16792.697563: rtcpu_vinotify_event: tstamp:527869419128 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x84 frame:0 vi_tstamp:16891818738848 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16792.697563: rtcpu_vinotify_error: tstamp:527869805017 cch:-1 vi:1 tag:CSIMUX_FRAME channel:0x03 frame:0 vi_tstamp:16891833737728 data:0x0000000000c00062
     kworker/2:1-4493    [002] .... 16792.697564: rtcpu_vinotify_error: tstamp:527869855943 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0xc4 frame:0 vi_tstamp:16891835365696 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16792.697564: rtcpu_vinotify_event: tstamp:527869856387 cch:-1 vi:1 tag:CSIMUX_FRAME channel:0x03 frame:0 vi_tstamp:16891833737728 data:0x0000000000c00062
     kworker/2:1-4493    [002] .... 16792.697565: rtcpu_vinotify_event: tstamp:527869856538 cch:-1 vi:1 tag:FS channel:0x03 frame:0 vi_tstamp:16891835116544 data:0x0000000000000012
     kworker/2:1-4493    [002] .... 16792.697565: rtcpu_vinotify_event: tstamp:527869856669 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0xc4 frame:0 vi_tstamp:16891835365696 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16792.697566: rtcpu_nvcsi_intr: tstamp:527869913054 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000008
     kworker/2:1-4493    [002] .... 16792.697566: rtcpu_nvcsi_intr: tstamp:527869913054 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000008
     kworker/2:1-4493    [002] .... 16792.697566: rtcpu_vinotify_error: tstamp:527869963260 cch:-1 vi:1 tag:CHANSEL_NOMATCH channel:0x04 frame:0 vi_tstamp:16891838799136 data:0x00000000000003c9
     kworker/2:1-4493    [002] .... 16792.697566: rtcpu_nvcsi_intr: tstamp:527869963386 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697567: rtcpu_nvcsi_intr: tstamp:527869963386 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697567: rtcpu_nvcsi_intr: tstamp:527869967836 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697567: rtcpu_nvcsi_intr: tstamp:527869967836 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697568: rtcpu_nvcsi_intr: tstamp:527869977835 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697568: rtcpu_nvcsi_intr: tstamp:527869977835 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697568: rtcpu_nvcsi_intr: tstamp:527869982280 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697568: rtcpu_nvcsi_intr: tstamp:527869982280 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697569: rtcpu_nvcsi_intr: tstamp:527869986725 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697569: rtcpu_nvcsi_intr: tstamp:527869986725 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697569: rtcpu_nvcsi_intr: tstamp:527869996721 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697569: rtcpu_nvcsi_intr: tstamp:527869996721 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697570: rtcpu_nvcsi_intr: tstamp:527870001166 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697570: rtcpu_nvcsi_intr: tstamp:527870001166 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697570: rtcpu_nvcsi_intr: tstamp:527870005612 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697570: rtcpu_nvcsi_intr: tstamp:527870005612 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697571: rtcpu_nvcsi_intr: tstamp:527870020055 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697571: rtcpu_nvcsi_intr: tstamp:527870020055 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697571: rtcpu_nvcsi_intr: tstamp:527870024500 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697572: rtcpu_nvcsi_intr: tstamp:527870024500 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697572: rtcpu_nvcsi_intr: tstamp:527870038942 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697572: rtcpu_nvcsi_intr: tstamp:527870038942 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697572: rtcpu_nvcsi_intr: tstamp:527870043387 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697573: rtcpu_nvcsi_intr: tstamp:527870043387 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697573: rtcpu_nvcsi_intr: tstamp:527870057830 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697573: rtcpu_nvcsi_intr: tstamp:527870057830 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697573: rtcpu_nvcsi_intr: tstamp:527870062276 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697574: rtcpu_nvcsi_intr: tstamp:527870062276 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697574: rtcpu_nvcsi_intr: tstamp:527870076721 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697574: rtcpu_nvcsi_intr: tstamp:527870076721 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697575: rtcpu_nvcsi_intr: tstamp:527870081165 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697575: rtcpu_nvcsi_intr: tstamp:527870081165 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697575: rtcpu_nvcsi_intr: tstamp:527870100052 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697575: rtcpu_nvcsi_intr: tstamp:527870100052 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697576: rtcpu_nvcsi_intr: tstamp:527870118941 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004
     kworker/2:1-4493    [002] .... 16792.697576: rtcpu_nvcsi_intr: tstamp:527870118941 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:3 status:0x00000004

In the trace_pipe log, we saw the following errors:

rtcpu_nvcsi_intr : class:CORRECTABLE_ERR : status : 0x00000004
rtcpu_vinotify_error : tag : CHANSEL_NOMATCH
rtcpu_vinotify_error:  tag : CSIMUX_FRAME
tcpu_nvcsi_intr : class:GLOBAL type:STREAM_VC : status:0x00000008

Therefore, we would like to ask what could be the cause of these errors. Is it due to incorrect device tree properties, incomplete MIPI signals, or perhaps we should consider making a new camera board? We look forward to your reply.

The log tell the payload data CRC error that could be signal problem.

rtcpu_nvcsi_intr : class:CORRECTABLE_ERR : status : 0x00000004

Thank you for your reply. We have found that there may be some issues with the camera baseboard. We will remake a board and check the situation.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.