Video stream error

An error occurred while bringing up the camera.
I would appreciate your advice on this.

“v4l2-ctl --list-formats-ext -d /dev/video0” result

ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'RG10' (10-bit Bayer RGRG/GBGB)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)

“media-ctl -p” result

Media controller API version 5.10.120

Media device information
------------------------
driver          tegra-camrtc-ca
model           NVIDIA Tegra Video Input Device
serial
bus info
hw revision     0x3
driver version  5.10.120

Device topology
- entity 1: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Sink
                <- "max96724 7-0027":0 [ENABLED]
        pad1: Source
                -> "vi-output, max96724 7-0027":0 [ENABLED]

- entity 4: max96724 7-0027 (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev1
        pad0: Source
                [fmt:SRGGB10_1X10/1920x1080 field:none colorspace:srgb]
                -> "13e40000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 6: vi-output, max96724 7-0027 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "13e40000.host1x:nvcsi@15a00000-":1 [ENABLED]

“v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=960,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=200” This error occurs when entering a command.

[ 1606.183999] bwmgr API not supported
[ 1628.116083] bwmgr API not supported
[ 1630.656984] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 1630.669711] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1630.680446] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1630.688172] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 1630.698844] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1630.706559] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 1630.717265] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

Thanks

hello lewis15,

first of all, you should always given the sensor supported format into v4l pipeline for fetching the stream.
for instance,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

besides,
please give it another try with below commands to boost all the VI/CSI/ISP 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

I tried your answer but, it’s not working

hello lewis15,

there’s an invalid pixel format failure has reported.
could you please check sensor format dumps,
for instance, $ v4l2-ctl -d /dev/video0 --list-formats-ext

The content has been changed due to modifications.
Here is my v4l2-ctl -d /dev/video0 --list-formats-ext result
image

I tried v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100 command.
It’s occured kernel panic.

hello lewis15,

there’s a NULL pointer dereference failure, which might due to you’ve missing (or, NULL) property in the sensor device tree.
besides, may I also confirm the Jetpack release version you’re now using?

Currently I’m using JetPack 5.1.2.

please also verify the sensor driver with… To run a v4l2-compliance test and see-also Debugging Tips.

Here is v4l2-compliance -d /dev/video0 command result.

fail: v4l2-test-controls.cpp(663): g_ext_ctrls returned an error (22)
fail: v4l2-test-buffers.cpp(715): q.create_bufs(node, 1, &fmt) != EINVAL

The above two errors occur. Why do these errors occur?

v4l2-compliance SHA: not available, 64 bits

Compliance test for tegra-video device /dev/video0:

Driver Info:
        Driver name      : tegra-video
        Card type        : vi-output, max96724 7-0027
        Bus info         : platform:tegra-capture-vi:0
        Driver version   : 5.10.120
        Capabilities     : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : tegra-camrtc-ca
        Model            : NVIDIA Tegra Video Input Device
        Serial           :
        Bus info         :
        Media version    : 5.10.120
        Hardware revision: 0x00000003 (3)
        Driver version   : 5.10.120
Interface Info:
        ID               : 0x03000008
        Type             : V4L Video
Entity Info:
        ID               : 0x00000006 (6)
        Name             : vi-output, max96724 7-0027
        Function         : V4L2 I/O
        Pad 0x01000007   : 0: Sink
          Link 0x0200000c: from remote pad 0x1000003 of entity '13e40000.host1x:nvcsi@15a00000-': Data, Enabled

Required ioctls:
        test MC information (see 'Media Driver Info' above): OK
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second /dev/video0 open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
        test VIDIOC_LOG_STATUS: OK

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
        test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
        test VIDIOC_QUERYCTRL: OK
        test VIDIOC_G/S_CTRL: OK
                fail: v4l2-test-controls.cpp(663): g_ext_ctrls returned an error (22)
        test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
        test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
        test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
        Standard Controls: 1 Private Controls: 23

Format ioctls (Input 0):
        test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
        test VIDIOC_G/S_PARM: OK (Not Supported)
        test VIDIOC_G_FBUF: OK (Not Supported)
        test VIDIOC_G_FMT: OK
        test VIDIOC_TRY_FMT: OK
        test VIDIOC_S_FMT: OK
        test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
        test Cropping: OK (Not Supported)
        test Composing: OK (Not Supported)
        test Scaling: OK (Not Supported)

Codec ioctls (Input 0):
        test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
        test VIDIOC_G_ENC_INDEX: OK (Not Supported)
        test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
                fail: v4l2-test-buffers.cpp(715): q.create_bufs(node, 1, &fmt) != EINVAL
        test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
        test VIDIOC_EXPBUF: OK
        test Requests: OK (Not Supported)

Total for tegra-video device /dev/video0: 45, Succeeded: 43, Failed: 2, Warnings: 0

And here is my trace log

# tracer: nop
#
# entries-in-buffer/entries-written: 36485/36485   #P:8
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
     kworker/4:3-172     [004] ....    34.269721: rtcpu_string: tstamp:2150916975 id:0x04010000 str:"VM0 deactivating."
          insmod-2146    [003] ....    35.975979: camera_common_s_power: status : 0x1
          v4l_id-2150    [001] ....    35.982628: tegra_channel_open: vi-output, max96724 7-0027
          v4l_id-2150    [001] ....    35.982757: tegra_channel_close: vi-output, max96724 7-0027
 pool-gnome-init-2082    [002] ....    35.985879: tegra_channel_open: vi-output, max96724 7-0027
 pool-gnome-init-2082    [002] ....    35.986231: tegra_channel_close: vi-output, max96724 7-0027
        v4l2-ctl-2456    [000] ....    58.674925: tegra_channel_open: vi-output, max96724 7-0027
        v4l2-ctl-2456    [000] ....    58.680273: tegra_channel_set_power: max96724 7-0027 : 0x1
        v4l2-ctl-2456    [000] ....    58.680312: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-2456    [000] ....    58.680316: csi_s_power: enable : 0x1
        v4l2-ctl-2456    [000] ....    58.681117: tegra_channel_capture_setup: vnc_id 0 W 1280 H 960 fmt c4
        v4l2-ctl-2456    [003] ....    58.689965: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-2456    [003] ....    58.704777: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-2456    [003] ....    58.704781: csi_s_stream: enable : 0x1
        v4l2-ctl-2456    [003] ....    58.705383: tegra_channel_set_stream: max96724 7-0027 : 0x1
     kworker/4:3-172     [004] ....    58.721717: rtcpu_string: tstamp:2914111273 id:0x04010000 str:"VM0 activating."
     kworker/4:3-172     [004] ....    58.721722: rtcpu_vinotify_event: tstamp:2914743152 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:93257237184 data:0x359d580010000000
     kworker/4:3-172     [004] ....    58.721723: rtcpu_vinotify_event: tstamp:2914743287 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:93257244160 data:0x0000000031000001
     kworker/4:3-172     [004] ....    58.721723: rtcpu_vinotify_event: tstamp:2914743440 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:93257305568 data:0x359d550010000000
     kworker/4:3-172     [004] ....    58.721724: rtcpu_vinotify_event: tstamp:2914743571 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:93257312224 data:0x0000000031000002
     kworker/4:3-172     [004] ....    58.721725: rtcpu_nvcsi_intr: tstamp:2914770350 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000010
     kworker/4:3-172     [004] ....    58.721726: rtcpu_nvcsi_intr: tstamp:2914773204 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000050
     kworker/4:3-172     [004] ....    58.721726: rtcpu_nvcsi_intr: tstamp:2914773930 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721727: rtcpu_nvcsi_intr: tstamp:2914776197 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000010
     kworker/4:3-172     [004] ....    58.721727: rtcpu_nvcsi_intr: tstamp:2914776849 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721728: rtcpu_nvcsi_intr: tstamp:2914782706 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721728: rtcpu_nvcsi_intr: tstamp:2914785629 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721729: rtcpu_nvcsi_intr: tstamp:2914807566 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721729: rtcpu_nvcsi_intr: tstamp:2914820001 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x06000000
     kworker/4:3-172     [004] ....    58.721730: rtcpu_nvcsi_intr: tstamp:2915155639 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721731: rtcpu_nvcsi_intr: tstamp:2915158566 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721731: rtcpu_nvcsi_intr: tstamp:2915163684 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721732: rtcpu_nvcsi_intr: tstamp:2915166608 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721732: rtcpu_nvcsi_intr: tstamp:2915174654 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721732: rtcpu_nvcsi_intr: tstamp:2915193665 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721733: rtcpu_nvcsi_intr: tstamp:2915201709 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721733: rtcpu_nvcsi_intr: tstamp:2915204633 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721734: rtcpu_nvcsi_intr: tstamp:2915209752 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721734: rtcpu_nvcsi_intr: tstamp:2915212675 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721734: rtcpu_nvcsi_intr: tstamp:2915215603 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721735: rtcpu_nvcsi_intr: tstamp:2915223646 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721735: rtcpu_nvcsi_intr: tstamp:2915261670 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721735: rtcpu_nvcsi_intr: tstamp:2915269715 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721736: rtcpu_nvcsi_intr: tstamp:2915272640 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721736: rtcpu_nvcsi_intr: tstamp:2915275564 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721737: rtcpu_nvcsi_intr: tstamp:2915280683 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.721737: rtcpu_nvcsi_intr: tstamp:2915284690 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777712: rtcpu_nvcsi_intr: tstamp:2915291653 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777714: rtcpu_nvcsi_intr: tstamp:2915294577 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777715: rtcpu_nvcsi_intr: tstamp:2915302622 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777715: rtcpu_nvcsi_intr: tstamp:2915318710 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777716: rtcpu_nvcsi_intr: tstamp:2915326752 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777717: rtcpu_nvcsi_intr: tstamp:2915329677 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777717: rtcpu_nvcsi_intr: tstamp:2915332601 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777718: rtcpu_nvcsi_intr: tstamp:2915337721 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777719: rtcpu_nvcsi_intr: tstamp:2915340646 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777719: rtcpu_nvcsi_intr: tstamp:2915343571 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777720: rtcpu_nvcsi_intr: tstamp:2915348689 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777721: rtcpu_nvcsi_intr: tstamp:2915351613 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777721: rtcpu_nvcsi_intr: tstamp:2915359659 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777722: rtcpu_nvcsi_intr: tstamp:2915378671 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777722: rtcpu_nvcsi_intr: tstamp:2915386714 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777723: rtcpu_nvcsi_intr: tstamp:2915394759 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777724: rtcpu_nvcsi_intr: tstamp:2915397683 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777724: rtcpu_nvcsi_intr: tstamp:2915400608 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777725: rtcpu_nvcsi_intr: tstamp:2915405728 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777726: rtcpu_nvcsi_intr: tstamp:2915408652 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777726: rtcpu_nvcsi_intr: tstamp:2915411577 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777727: rtcpu_nvcsi_intr: tstamp:2915435708 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777728: rtcpu_nvcsi_intr: tstamp:2915443751 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777728: rtcpu_nvcsi_intr: tstamp:2915446678 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777729: rtcpu_nvcsi_intr: tstamp:2915449602 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777730: rtcpu_nvcsi_intr: tstamp:2915451796 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777730: rtcpu_nvcsi_intr: tstamp:2915454720 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777731: rtcpu_nvcsi_intr: tstamp:2915457645 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777732: rtcpu_nvcsi_intr: tstamp:2915460571 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777732: rtcpu_nvcsi_intr: tstamp:2915462763 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777733: rtcpu_nvcsi_intr: tstamp:2915465690 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777733: rtcpu_nvcsi_intr: tstamp:2915468614 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777734: rtcpu_nvcsi_intr: tstamp:2915471539 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777735: rtcpu_nvcsi_intr: tstamp:2915476657 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
     kworker/4:3-172     [004] ....    58.777735: rtcpu_nvcsi_intr: tstamp:2915479581 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040

hello lewis15,

there’re several errors reported due to PHY interrupts.
for instance,
data-lane FIFO overflow, and, more than one bit error detected on the data-lane.

it looks you’re using a SerDes chip (i.e. max96724), please double check the chip configuration.

I confirmed that video data was coming into MIPI through an oscilloscope.
Therefore, it is not a hardware problem but a software problem, but I do not know where the problem is.

hello lewis15,

this usually due to the issue on sensor side,
since you’re using a SerDes chip for sending data, it would be SerDes chip configuration error.

SerDes-related settings were confirmed on site with MAXIM.
Therefore, I believe there is no problem with the SerDes settings.
Could this error occur if something goes wrong during the V4L2 registration process?

hello lewis15,

if there’s a error return, it’ll not register a video node, (/dev/video0).

here’re more details…
the step for camera device registration to setup a video device node to linux kernel.
sensor probing only run once during kernel initialization stage of system boot-up.
for a typical camera application running cycle, the driver will Power On the sensor, Start Sensor Streaming, sending relevant v4l2 controls, and finally power off the sensor.

please try adding --stream-skip options to ignore some frame in the beginning.
here’s a sample pipeline,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=BG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-skip=33 --stream-count=100

When I ran it using the sample pipeline provided, the same results were obtained.

[  155.344943] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  155.357834] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  155.368541] (NULL device *): vi_capture_control_message: NULL VI channel received
[  155.376260] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  155.386915] (NULL device *): vi_capture_control_message: NULL VI channel received
[  155.394628] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  155.405385] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

please see-also Topic 291342, Topic 290584 for reference.

We will review the reference you provided.
From what I posted before
VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: I found on the forum that the FAIL part is critical.
Can you tell me why this error appears? Also, is there a solution?

v4l2-compliance SHA: not available, 64 bits

Compliance test for tegra-video device /dev/video0:

Driver Info:
        Driver name      : tegra-video
        Card type        : vi-output, max96724 7-0027
        Bus info         : platform:tegra-capture-vi:0
        Driver version   : 5.10.120
        Capabilities     : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : tegra-camrtc-ca
        Model            : NVIDIA Tegra Video Input Device
        Serial           :
        Bus info         :
        Media version    : 5.10.120
        Hardware revision: 0x00000003 (3)
        Driver version   : 5.10.120
Interface Info:
        ID               : 0x03000008
        Type             : V4L Video
Entity Info:
        ID               : 0x00000006 (6)
        Name             : vi-output, max96724 7-0027
        Function         : V4L2 I/O
        Pad 0x01000007   : 0: Sink
          Link 0x0200000c: from remote pad 0x1000003 of entity '13e40000.host1x:nvcsi@15a00000-': Data, Enabled

Required ioctls:
        test MC information (see 'Media Driver Info' above): OK
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second /dev/video0 open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
        test VIDIOC_LOG_STATUS: OK

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
        test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
        test VIDIOC_QUERYCTRL: OK
        test VIDIOC_G/S_CTRL: OK
                fail: v4l2-test-controls.cpp(663): g_ext_ctrls returned an error (22)
        test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
        test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
        test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
        Standard Controls: 1 Private Controls: 23

Format ioctls (Input 0):
        test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
        test VIDIOC_G/S_PARM: OK (Not Supported)
        test VIDIOC_G_FBUF: OK (Not Supported)
        test VIDIOC_G_FMT: OK
        test VIDIOC_TRY_FMT: OK
        test VIDIOC_S_FMT: OK
        test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
        test Cropping: OK (Not Supported)
        test Composing: OK (Not Supported)
        test Scaling: OK (Not Supported)

Codec ioctls (Input 0):
        test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
        test VIDIOC_G_ENC_INDEX: OK (Not Supported)
        test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
                fail: v4l2-test-buffers.cpp(715): q.create_bufs(node, 1, &fmt) != EINVAL
        test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
        test VIDIOC_EXPBUF: OK
        test Requests: OK (Not Supported)

Total for tegra-video device /dev/video0: 45, Succeeded: 43, Failed: 2, Warnings: 0

Him JerryChang.
I will continue to inform you of the results of debugging and testing.
First of all, sometimes v4l2-ctl works. I will attach the trace log.
However, in most cases, the following error occurs.


This is a tracelog for errors.
errortrace.txt (22.3 MB)

And this is a case where it operates intermittently and then turns off.
image
This is a tracelog
tracelog.txt (418.9 KB)

I would appreciate your advice on this.
Thanks

hello lewis15,

there’re lots of PHY interrupts in the error tracing logs.
all of them has reported with error code 0x40, which means more than one bit error detected on the data-lane.