I am getting data out now, but it is garbage. Here are updated test results.
nvidia@tegra-ubuntu:~$ v4l2-compliance -d /dev/video0
v4l2-compliance SHA : not available
Driver Info:
Driver name : tegra-video
Card type : vi-output, imx294 30-001a
Bus info : platform:15700000.vi:0
Driver version: 4.4.38
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
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)
fail: v4l2-test-formats.cpp(434): pixelformat 32314752 (RG12) for buftype 1 not reported by ENUM_FMT
test VIDIOC_G_FMT: FAIL
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
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
fail: v4l2-test-buffers.cpp(574): 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 input 0:
Total: 43, Succeeded: 41, Failed: 2, Warnings: 0
nvidia@tegra-ubuntu:~$ v4l2-ctl -d /dev/video0 -w --verbose --set-fmt-video=width=3704,height=2778,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 3704/2778
Pixel Format : 'RG12'
Field : None
Bytes per Line : 7424
Size Image : 20623872
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
Index : 0
Type : Video Capture
Flags : mapped, done, error
Field : None
Sequence : 0
Length : 20623872
Bytesused: 20623872
Timestamp: 0.000000s (Monotonic, End-of-Frame)
libv4l2: error dequeuing buf: Input/output error
VIDIOC_DQBUF: failed: Input/output error
VIDIOC_STREAMOFF: ok
nvidia@tegra-ubuntu:~$ sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 22/22 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
kworker/3:2-488 [003] ...1 2196.375285: rtos_queue_peek_from_isr_failed: tstamp:68970853849 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2196.375289: rtcpu_start: tstamp:68970854747
kworker/3:2-488 [003] ...1 2196.478878: rtcpu_vinotify_handle_msg: tstamp:68973549683 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:254072483 data:0x00000000
kworker/3:2-488 [003] ...1 2196.478883: rtcpu_vinotify_handle_msg: tstamp:68973553685 tag:CHANSEL_PXL_SOF channel:0x00 frame:0 vi_tstamp:254076316 data:0x00000001
kworker/3:2-488 [003] ...1 2196.478885: rtcpu_vinotify_handle_msg: tstamp:68973553878 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:254076517 data:0x00000100
kworker/3:2-488 [003] ...1 2196.478886: rtcpu_vinotify_handle_msg: tstamp:68973554696 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:0 vi_tstamp:254077287 data:0x08000000
kworker/3:2-488 [003] ...1 2196.478887: rtcpu_vinotify_handle_msg: tstamp:68973554828 tag:CHANSEL_FAULT_FE channel:0x01 frame:0 vi_tstamp:254077287 data:0x00000001
kworker/3:2-488 [003] ...1 2196.478888: rtcpu_vinotify_handle_msg: tstamp:68973554991 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:254077291 data:0x00000000
kworker/3:2-488 [003] ...1 2196.530826: rtos_queue_peek_from_isr_failed: tstamp:68975854712 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2196.686822: rtos_queue_peek_from_isr_failed: tstamp:68980855216 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2196.894871: rtos_queue_peek_from_isr_failed: tstamp:68985855769 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2197.050872: rtos_queue_peek_from_isr_failed: tstamp:68990856277 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2197.206866: rtos_queue_peek_from_isr_failed: tstamp:68995856781 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2197.362870: rtos_queue_peek_from_isr_failed: tstamp:69000857288 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2197.518874: rtos_queue_peek_from_isr_failed: tstamp:69005857795 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2197.674935: rtos_queue_peek_from_isr_failed: tstamp:69010858359 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2197.830870: rtos_queue_peek_from_isr_failed: tstamp:69015858808 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2197.986915: rtos_queue_peek_from_isr_failed: tstamp:69020859316 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2198.142922: rtos_queue_peek_from_isr_failed: tstamp:69025859821 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2198.298921: rtos_queue_peek_from_isr_failed: tstamp:69030860329 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2198.454919: rtos_queue_peek_from_isr_failed: tstamp:69035860834 queue:0x0b4a3c58
kworker/3:2-488 [003] ...1 2198.506855: rtos_queue_peek_from_isr_failed: tstamp:69036306112 queue:0x0b4a3c58
Aug 8 18:27:58 tegra-ubuntu kernel: [ 2196.272625] imx294 30-001a: imx294_power_on: power on
Aug 8 18:27:58 tegra-ubuntu kernel: [ 2196.367517] imx294 30-001a: imx294_s_stream++,enable:1
Aug 8 18:27:58 tegra-ubuntu kernel: [ 2196.374548] imx294 30-001a: imx294_s_stream mode[0]
Aug 8 18:27:59 tegra-ubuntu kernel: [ 2196.452997] tegra-vi4 15700000.vi: Status: 4 channel:00 frame:0000
Aug 8 18:27:59 tegra-ubuntu kernel: [ 2196.459308] tegra-vi4 15700000.vi: timestamp sof 2207153697664 eof 2207153704096 data 0x00000100
Aug 8 18:27:59 tegra-ubuntu kernel: [ 2196.468935] tegra-vi4 15700000.vi: capture_id 213 stream 0 vchan 0
Aug 8 18:27:59 tegra-ubuntu kernel: [ 2197.450909] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
Aug 8 18:28:01 tegra-ubuntu kernel: [ 2198.454945] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
Aug 8 18:28:01 tegra-ubuntu kernel: [ 2198.461005] imx294 30-001a: imx294_s_stream++,enable:0
Aug 8 18:28:01 tegra-ubuntu kernel: [ 2198.501442] imx294 30-001a: imx294_power_off: power off
Does the same trace log from #5? From the image it looks like only get one line data that could be the width report by driver is not match the sensor output. You can try reduce the width from the sensor driver to try an error to figure it out.
v4l2-ctl --list-formats-ext can show the resolution to make sure your modification.
Ok, my sensor is outputting RGGB12 and I set my default datafmt to RGGB12 in the driver, yet v4l2-ctl is returning RG10. The resolution is correct though. Here are the results:
nvidia@tegra-ubuntu:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'RG10'
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 3704x2778
Interval: Discrete 0.033s (30.000 fps)
Also, in v4l2-compliance I get:
Format ioctls:
info: found 1 frameintervals for pixel format 30314752 (RG10) and size 3704x2778
info: found 1 framesizes for pixel format 30314752 (RG10)
info: found 1 formats for buftype 1
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)
fail: v4l2-test-formats.cpp(434): pixelformat 32314752 (RG12) for buftype 1 not reported by ENUM_FMT
I have it reporting RG12 now, but the output is still the same (attached). Changing the frame length, exposure time, etc. in the driver has no effect, neither does changing the line_length in the dtsi.
I would rather suggest to use raw 12 due to we didn’t have any reference 14 bit sensors for QA test yet.
Also could you share your sensor driver and DT to contribute to others tegra forum user.