[V4L2] VI error "vi capture dequeue status failed"

I chose the xavier development board, the camera is ov2775, after loading the camera driver, execute the command:
V4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=BG12 --stream-mmap --stream-count=100 -d /dev/video0
The tips are as follows:
241.660577] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
[ 241.660822] tegra194-vi5 15c10000.vi: channel error, resetting the channel
[241.691783] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
[ 241.692036] tegra194-vi5 15c10000.vi: channel error, resetting the channel
[244.400475] tegra194-vi5 15c10000.vi: no reply from camera processor
[244.400653] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
[244.400943] tegra194-vi5 15c10000.vi: channel error, resetting the channel
[ 246.960713] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 246.960863] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
[ 246.961084] tegra194-vi5 15c10000.vi: channel error, resetting the channel
[ 249.520968] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 249.521133] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
[ 249.521385] tegra194-vi5 15c10000.vi: channel error, resetting the channel
[ 249.521389] ------------[ cut here ]------------
[ 249.521602] WARNING: CPU: 2 PID: 7409 at /home/kuangjx/xavier/public_sources/
Kernel_src/kernel/kernel-4.9/drivers/media/v4l2-core/videobuf2-core.c:899 vb2_bu
Wr_done+0x1f0/0x230
[ 249.522071] —[ end trace 83676f62b22ff61d ]—
[ 252.081215] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 252.081409] tegra194-vi5 15c10000.vi: vi capture dequeue status failed
[ 252.081632] ------------[ cut here ]------------
[ 252.081674] tegra194-vi5 15c10000.vi: channel error, resetting the channel
[ 252.081903] WARNING: CPU: 2 PID: 7409 at /home/kuangjx/xavier/public_sources/
Kernel_src/kernel/kernel-4.9/drivers/media/v4l2-core/videobuf2-core.c:899 vb2_bu
Wr_done+0x1f0/0x230
[ 252.082409] —[ end trace 83676f62b22ff61e ]—
[ 252.082645] ------------[ cut here ]------------
[ 252.082752] WARNING: CPU: 2 PID: 7409 at /home/kuangjx/xavier/public_sources/
Kernel_src/kernel/kernel-4.9/drivers/media/v4l2-core/videobuf2-core.c:899 vb2_bu
Wr_done+0x1f0/0x230
[ 252.083186] —[ end trace 83676f62b22ff61f ]—
What caused this kind of problem, how to check it.

Please enable the trace to get more information.

echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo > /sys/kernel/debug/tracing/trace
cat /sys/kernel/debug/tracing/trace

/sys/kernel/debug/tracing/trace
The contents of the file can be found in the attached info.txt

info.txt (10.7 MB)

The trace show the PIXEL_LONG_LINE, the line pixel more as expect.

 kworker/0:0-7937  [000] ....   443.777544: rtcpu_vinotify_event: tstamp:14006288950 tag:CHANSEL_FAULT channel:0x23 frame:1 vi_tstamp:14006088267 data:0x00000200

Please check my settings and give me some clue.

DTS:

mode0 { /* OV2775_MODE_1920X1080_30FPS  */
   				mclk_khz = "24000";
				num_lanes = "2";
					
				//add
				phy_mode = "DPHY";

				tegra_sinterface = "serial_a";
				//tegra_sinterface = "serial_c";
				//modify
				discontinuous_clk = "no";
				//discontinuous_clk = "yes";
				dpcm_enable = "false";
				cil_settletime = "0";

				active_w = "1920";
				active_h = "1080";
				
				pixel_t = "bayer_bggr12";
				//pixel_t = "bayer_bggr";
				//modify
				//mode_type="bayer";
				//pixel_phase = "rggb";
				//dynamic_pixel_bit_depth = "12";
				//csi_pixel_bit_depth = "12";				

				readout_orientation = "0";
				line_length = "3550";
				inherent_gain = "1";
				mclk_multiplier = "5";
				pix_clk_hz = "120000000";
				
				min_gain_val = "1.0";
				max_gain_val = "16";
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "1.5";
				max_framerate = "30";
				min_exp_time = "30";
				max_exp_time = "660000";
				embedded_metadata_height = "2";
			};

ov2775 driver:

#define OV2775_DEFAULT_MODE	OV2775_MODE_1920X1080_LCG
#define OV2775_DEFAULT_HDR_MODE	OV2775_MODE_1920X1080_HDR
#define OV2775_DEFAULT_WIDTH	1920
#define OV2775_DEFAULT_HEIGHT	1080
#define OV2775_DEFAULT_DATAFMT		MEDIA_BUS_FMT_SBGGR12_1X12
#define OV2775_DEFAULT_CLK_FREQ	 	24000000
  1. Did you make sure this sensor output embedded data?
    embedded_metadata_height = “2”;
  2. show the v4l2-ctl --list-formats-ext

1.This is a reference from the TX2 platform.

2.ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘BG12’
Name : 12-bit Bayer BGBG/GRGR
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)

Boost the clock to check if help.

https://elinux.org/Jetson_TX2/28.1_Camera_BringUp

The clock is already the biggest

root@jetson-0424418058540:/home/nvidia# cat /sys/kernel/debug/bpmp/debug/clk/vi/
max_rate
998400000
root@jetson-0424418058540:/home/nvidia# cat /sys/kernel/debug/bpmp/debug/clk/vi/
rate
998400000
root@jetson-0424418058540:/home/nvidia# cat /sys/kernel/debug/bpmp/debug/clk/isp
/max_rate
1190400000
root@jetson-0424418058540:/home/nvidia# cat /sys/kernel/debug/bpmp/debug/clk/isp
/rate
1190400000
root@jetson-0424418058540:/home/nvidia# cat /sys/kernel/debug/bpmp/debug/clk/nvc
si/max_rate
400000000
root@jetson-0424418058540:/home/nvidia# cat /sys/kernel/debug/bpmp/debug/clk/nvc
si/rate
400000000

@kja23
From the trace log the problem should be the sensor didn’t send the FE(frame end) package.

Execute v4l2-compliance test, there is a test problem, is there a correlation?
sudo v4l2-compliance -d /dev/video0
v4l2-compliance SHA : not available

Driver Info:
Driver name : tegra-video
Card type : vi-output, ov2775 1-0010
Bus info : platform:15c10000.vi:0
Driver version: 4.9.108
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video 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)

Test input 0:

    Control ioctls:                                                         
            test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK                        
            test VIDIOC_QUERYCTRL: OK                                       

[ 67.124773] ov2775 1-0010: could not find ctrl 9a2002
[ 67.130381] ov2775 1-0010: could not find ctrl 9a2002
[ 67.135464] ov2775 1-0010: could not find ctrl 9a2002
[ 67.140490] ov2775 1-0010: could not find ctrl 9a2002
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 1 Private Controls: 16

    Format ioctls:                                                          
            test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK              
            fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
            test VIDIOC_G/S_PARM: FAIL                                      
            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:                                                           
            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:                                                          
            test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK                    
            test VIDIOC_EXPBUF: OK                                          

Test input 0:

Total: 43, Succeeded: 42, Failed: 1, Warnings: 0

“Could not find ctrl 9a2002” is what caused it, “test VIDIOC_G/S_PARM: FAIL” is what caused it, how to solve it?

Don’t bother it. That FAIL won’t case capture failed.
Consulte to sensor vendor to make sure the FE package problem.