Hi expert,
As I want to integrate v4l2rtspserver to imx8m board, I try to build boundary-imx_6.1.y-pass2 branch and test v4l2-compliance firstly, but get bellow error:
Is it means our ov5640 mipi driver is not compliance with v4l2? how to fix these errors?
1.
[ 1161.060218] unknown pixelformat:' ' [ 1161.063995] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
- vb2_core_reqbufs crash
Thanks in advance.
kernel version and test command/result as below:
`# uname -a
Linux buildroot 6.1.22 #1 SMP PREEMPT Tue Jul 4 18:41:13 CST 2023 aarch64 GNU/Linux
# v4l2-compliance
v4l2-compliance 1.24.1, 64 bits, 64-bit time_t
[ 1157.875247] ov5640_power_down: powerdown=0
[ 1159.174671] ov5640_mipi: initialized AF successufully
Compliance test for mx6s-csi device /dev/video0:
Driver Info:
Driver name : mx6s-csi
Card type : mxc-mipi-csi2.0
Bus info : platform:30a90000.csi1_bridge
Driver version : 6.1.22
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Required ioctls:
test VIDIOC_QUERYCAP: OK
test invalid ioctls: OK
Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
fail: v4l2-compliance.cpp(764): prio != match
test VIDIOC_G/S_PRIORITY: FAIL
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
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)
fail: v4l2-test-input-output.cpp(426): std == 0
fail: v4l2-test-input-output.cpp(546): invalid attributes for input 0
test VIDIOC_G/S/ENUMINPUT: FAIL
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 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:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
[ 1160.755798] ov5640_set_wb: error -22
fail: v4l2-test-controls.cpp(493): s_ctrl returned an error (22)
test VIDIOC_G/S_CTRL: FAIL
[ 1160.779815] ov5640_set_wb: error -22
fail: v4l2-test-cont[ 1160.784029] unknown pixelformat:' '
[ 1160.790720] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
rols.cpp(962): s_ext_ctrls return[ 1160.797994] unknown pixelformat:'▒▒▒▒'
[ 1160.804582] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0xffffffff) invalid.
[ 1160.811812] unknown pixelformat:'▒▒▒▒'
[ 1160.815585] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0xffffffff) invalid.
[ 1160.822858] unknown pixelformat:' '
[ 1160.826633] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
[ 1160.833863] unknown pixelformat:' '
[ 1160.837635] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
[ 1160.844976] unknown pixelformat:' '
[ 1160.848751] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
[ 1160.855981] unknown pixelformat:' '
[ 1160.859753] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
[ 1160.867254] ------------[ cut here ]------------
[ 1160.871873] WARNING: CPU: 1 PID: 337 at drivers/media/common/videobuf2/videobuf2-core.c:841 vb2_core_reqbufs+0x170/0x460
[ 1160.882762] Modules linked in: cdc_acm crct10dif_ce ov5640_camera_mipi_v2 fsl_jr_uio
[ 1160.890528] CPU: 1 PID: 337 Comm: v4l2-compliance Tainted: G W 6.1.22 #1
[ 1160.898620] Hardware name: NXP i.MX8MQ EVK (DT)
[ 1160.903150] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 1160.910114] pc : vb2_core_reqbufs+0x170/0x460
[ 1160.914472] lr : vb2_core_reqbufs+0x138/0x460
[ 1160.918832] sp : ffff80000a18bae0
[ 1160.922144] x29: ffff80000a18bae0 x28: ffff0000037cd080 x27: ffff0000037cd430
[ 1160.929285] x26: 0000000000000000 x25: ffff0000037cd178 x24: 0000000000000000
[ 1160.936426] x23: 0000000000000001 x22: ffff80000a18bd28 x21: ffff0000037cd1b8
[ 1160.943566] x20: 0000000000000000 x19: ffff0000037cd110 x18: 0000000000000000
[ 1160.950707] x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffecbbf2e0
[ 1160.957847] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[ 1160.964987] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[ 1160.972128] x8 : ffff0000037cd1b8 x7 : 0000000000000000 x6 : 0000000000000000
[ 1160.979269] x5 : ffff800008cf0680 x4 : ffff0000037cd178 x3 : 0000000000000001
[ 1160.986409] x2 : 0000000000000000 x1 : ffff80000a18bb3c x0 : ffff80000a18bb38
[ 1160.993550] Call trace:
[ 1160.995997] vb2_core_reqbufs+0x170/0x460
[ 1161.000010] vb2_reqbufs+0x80/0xa0
[ 1161.003418] mx6s_vidioc_reqbufs+0x40/0x80
[ 1161.007518] v4l_reqbufs+0x50/0x70
[ 1161.010924] __video_do_ioctl+0x188/0x3e0
[ 1161.014934] video_usercopy+0x214/0x780
[ 1161.018771] video_ioctl2+0x18/0x30
[ 1161.022261] v4l2_ioctl+0x40/0x60
[ 1161.025583] _arm64_sys_ioctl+0xa8/0xf0
[ 1161.029514] invoke_syscall+0x48/0x120
[ 1161.033271] el0_svc_common.constprop.0+0x44/0x100
[ 1161.038065] do_el0_svc+0x30/0xd0
[ 1161.041384] el0_svc+0x2c/0x90
[ 1161.044448] el0t_64_sync_handler+0xbc/0x140
ed an error (22)
test VIDIOC_G/[ 1161.048719] el0t_64_sync+0x18c/0x190
[ 1161.055241] ---[ end trace 0000000000000000 ]---
[ 1161.060218] unknown pixelformat:' '
[ 1161.063995] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
[ 1161.071250] unknown pixelformat:' '
[ 1161.074999] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
[ 1161.082321] unknown pixelformat:' '
[ 1161.086083] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
[ 1161.093332] unknown pixelformat:' '
[ 1161.097093] mx6s-csi 30a90000.csi1_bridge: Fourcc format (0x00000000) invalid.
S/TRY_EXT_CTRLS: FAIL
fail: v4l2-test-controls.cpp(1108): subscribe event for control 'User Controls' failed
test VIDIOC(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 15 Private Controls: 0
Format ioctls:
fail: v4l2-test-formats.cpp(305): duplicate format 56595559 (YUYV)
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
fail: v4l2-test-formats.cpp(1362): ret && node->has_frmintervals
test VIDIOC_G/S_PARM: FAIL
test VIDIOC_G_FBUF: OK (Not Supported)
fail: v4l2-test-formats.cpp(468): !pix.width || !pix.height
test VIDIOC_G_FMT: FAIL
fail: v4l2-test-formats.cpp(738): Video Capture is valid, but no TRY_FMT was implemented
test VIDIOC_TRY_FMT: FAIL
warn: v4l2-test-formats.cpp(1157): S_FMT cannot handle an invalid pixelformat.
warn: v4l2-test-formats.cpp(1158): This may or may not be a problem. For more information see:
warn: v4l2-test-formats.cpp(1159): http://www.mail-archive.com/[email protected]/msg56550.html
fail: v4l2-test-formats.cpp(1173): S_FMT cannot handle an invalid format
test VIDIOC_S_FMT: FAIL
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
fail: v4l2-test-formats.cpp(1539): doioctl(node, VIDIOC_G_SELECTION, &sel) != EINVAL
test Cropping: FAIL
fail: v4l2-test-formats.cpp(1539): doioctl(node, VIDIOC_G_SELECTION, &sel) != EINVAL
test Composing: FAIL
fail: v4l2-test-formats.cpp(1824): doioctl(node, VIDIOC_S_FMT, &fmt)
fail: v4l2-test-formats.cpp(1972): testBasicScaling(node, fmt)
test Scaling: FAIL
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:
fail: v4l2-test-buffers.cpp(607): q.reqbufs(node, 1)
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
fail: v4l2-test-buffers.cpp(783): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing or malfunctioning.
fail: v4l2-test-buffers.cpp(784): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing, probably due to earlier failing format tests.
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)
Total for mx6s-csi device /dev/video0: 45, Succeeded: 31, Failed: 14, Warnings: 3
[ 1166.279804] ov5640_power_down: powerdown=1
=====================================================================================`