Hello,
I’m writing a driver for the a sony sensor and getting the following output. The test.raw file is 20MB, all zeroes. Any support would be appreciated.
nvidia@tegra-ubuntu:~$ v4l2-compliance -d /dev/video0
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
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: 12
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
fail: v4l2-test-formats.cpp(427): unknown pixelformat 32314752 for buftype 1
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(571): q.has_expbuf(node)
test VIDIOC_EXPBUF: FAIL
Test input 0:
Total: 42, Succeeded: 40, 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
YCbCr Encoding : Default
Quantization : Default
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)
Index : 1
Type : Video Capture
Flags : mapped, done, error
Field : None
Sequence : 1
Length : 20623872
Bytesused: 20623872
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 2
Type : Video Capture
Flags : mapped, done
Field : None
Sequence : 2
Length : 20623872
Bytesused: 20623872
Timestamp: 0.000000s (Monotonic, End-of-Frame)
VIDIOC_STREAMOFF: ok
nvidia@tegra-ubuntu:~$ sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 3087/3087 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
kworker/4:1-115 [004] ...1 96.315157: rtos_queue_peek_from_isr_failed: tstamp:3343354994 queue:0x0b4a3c58
kworker/4:1-115 [004] ...1 96.315165: rtcpu_start: tstamp:3343356327
kworker/4:1-115 [004] ...1 96.419191: rtcpu_vinotify_handle_msg: tstamp:3346425711 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3346425225 data:0x00400060
kworker/4:1-115 [004] ...1 96.419198: rtcpu_vinotify_handle_msg: tstamp:3346430534 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:3346430083 data:0x00000000
kworker/4:1-115 [004] ...1 96.419202: rtcpu_vinotify_handle_msg: tstamp:3346531029 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3346530271 data:0x00400060
kworker/4:1-115 [004] ...1 96.419205: rtcpu_vinotify_handle_msg: tstamp:3346531234 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:3346530272 data:0x00000001
kworker/4:1-115 [004] ...1 96.419208: rtcpu_vinotify_handle_msg: tstamp:3346531429 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:3346530276 data:0x00000000
kworker/4:1-115 [004] ...1 96.419211: rtcpu_vinotify_handle_msg: tstamp:3346635775 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3346635319 data:0x00400060
kworker/4:1-115 [004] ...1 96.419214: rtcpu_vinotify_handle_msg: tstamp:3346740823 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3346740366 data:0x00400060
kworker/4:1-115 [004] ...1 96.419217: rtcpu_vinotify_handle_msg: tstamp:3346845868 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3346845413 data:0x00400060
kworker/4:1-115 [004] ...1 96.419220: rtcpu_vinotify_handle_msg: tstamp:3346950913 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3346950461 data:0x00400060
kworker/4:1-115 [004] ...1 96.419223: rtcpu_vinotify_handle_msg: tstamp:3347055966 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347055508 data:0x00400060
kworker/4:1-115 [004] ...1 96.419226: rtcpu_vinotify_handle_msg: tstamp:3347161010 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347160556 data:0x00400060
kworker/4:1-115 [004] ...1 96.419230: rtcpu_vinotify_handle_msg: tstamp:3347266056 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347265603 data:0x00400060
kworker/4:1-115 [004] ...1 96.419233: rtcpu_vinotify_handle_msg: tstamp:3347371107 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347370650 data:0x00400060
kworker/4:1-115 [004] ...1 96.419236: rtcpu_vinotify_handle_msg: tstamp:3347476152 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347475698 data:0x00400060
kworker/4:1-115 [004] ...1 96.419239: rtcpu_vinotify_handle_msg: tstamp:3347581201 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347580745 data:0x00400060
kworker/4:1-115 [004] ...1 96.471156: rtcpu_vinotify_handle_msg: tstamp:3347686246 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347685792 data:0x00400060
kworker/4:1-115 [004] ...1 96.471160: rtcpu_vinotify_handle_msg: tstamp:3347791294 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347790840 data:0x00400060
kworker/4:1-115 [004] ...1 96.471163: rtcpu_vinotify_handle_msg: tstamp:3347896343 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3347895886 data:0x00400060
kworker/4:1-115 [004] ...1 96.471167: rtcpu_vinotify_handle_msg: tstamp:3348001389 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348000933 data:0x00400060
kworker/4:1-115 [004] ...1 96.471170: rtcpu_vinotify_handle_msg: tstamp:3348106438 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348105981 data:0x00400060
kworker/4:1-115 [004] ...1 96.471173: rtcpu_vinotify_handle_msg: tstamp:3348211485 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348211028 data:0x00400060
kworker/4:1-115 [004] ...1 96.471176: rtcpu_vinotify_handle_msg: tstamp:3348316530 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348316075 data:0x00400060
kworker/4:1-115 [004] ...1 96.471180: rtos_queue_peek_from_isr_failed: tstamp:3348355932 queue:0x0b4a3c58
kworker/4:1-115 [004] ...1 96.471183: rtcpu_vinotify_handle_msg: tstamp:3348421578 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348421123 data:0x00400060
kworker/4:1-115 [004] ...1 96.471186: rtcpu_vinotify_handle_msg: tstamp:3348526627 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348526170 data:0x00400060
kworker/4:1-115 [004] ...1 96.471189: rtcpu_vinotify_handle_msg: tstamp:3348631676 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348631218 data:0x00400060
kworker/4:1-115 [004] ...1 96.471193: rtcpu_vinotify_handle_msg: tstamp:3348736721 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348736265 data:0x00400060
kworker/4:1-115 [004] ...1 96.471196: rtcpu_vinotify_handle_msg: tstamp:3348841767 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:3348841312 data:0x00400060
Are you able to capture frames with qv4l2 ? (You may install it with apt). You may have to increase gain.
No, I cannot capture frames with qv4l2. Attached is the kernel log.
Aug 8 17:52:13 tegra-ubuntu kernel: [ 50.895620] imx294 30-001a: imx294_power_on: power on
Aug 8 17:52:13 tegra-ubuntu kernel: [ 51.024070] imx294 30-001a: imx294_s_stream++,enable:1
Aug 8 17:52:13 tegra-ubuntu kernel: [ 51.031369] imx294 30-001a: imx294_s_stream mode[0]
Aug 8 17:52:14 tegra-ubuntu kernel: [ 52.120562] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
Aug 8 17:52:15 tegra-ubuntu kernel: [ 53.124945] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
Aug 8 17:52:16 tegra-ubuntu kernel: [ 54.129322] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
Aug 8 17:52:17 tegra-ubuntu kernel: [ 55.133681] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
Aug 8 17:52:17 tegra-ubuntu kernel: [ 55.139950] imx294 30-001a: imx294_s_stream++,enable:0
Aug 8 17:52:17 tegra-ubuntu kernel: [ 55.205703] imx294 30-001a: imx294_power_off: power off
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
Below trace show the PIXEL_LONG_LINE, Please make sure the width of resolution is correct.
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
Hi ShaneCCC,
I used yavta to get an image out, but the test pattern is only in the upper pixels. Here is an example: Imgur: The magic of the Internet (also attached).
Any idea what the issue could be?
Thanks!
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
That means your driver did report correct pixel format. Have a reference to imx185 for RGGB12
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.
Any suggestions would be appreciated!
Thanks
- Did you still see below message in trace after report the pixel format right?
- It doesn’t matter with the frame length/exposure time/line_length, it’s about the width of output size.
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
Hi ShaneCCC,
I just ran this:
nvidia@tegra-ubuntu:~$ v4l2-compliance -w
G_FMT: 3704x2778, 32314752, 1, 7424, 20623872, 8, 0, 0, feedcafe
TRY/S_FMT: 3704x2778, 32314752, 1, 7424, 20709376, 8, 0, 0, feedcafe
fail: v4l2-test-formats.cpp(684): Video Capture: TRY_FMT(G_FMT) != G_FMT
test VIDIOC_TRY_FMT: FAIL
G_FMT: 3704x2778, 32314752, 1, 7424, 20623872, 8, 0, 0, feedcafe
TRY/S_FMT: 3704x2778, 32314752, 1, 7424, 20709376, 8, 0, 0, feedcafe
fail: v4l2-test-formats.cpp(1027): Video Capture: S_FMT(G_FMT) != G_FMT
test VIDIOC_S_FMT: FAIL
Do you know why there would be a mismatch?
Also, I have the correct output width now, thanks for the help!
This is the new stack trace:
kworker/5:2-275 [005] ...1 122.290524: rtcpu_vinotify_handle_msg: tstamp:4155858779 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:4155858312 data:0x00000000
kworker/5:2-275 [005] ...1 122.290528: rtcpu_vinotify_handle_msg: tstamp:4155862787 tag:CHANSEL_PXL_SOF channel:0x00 frame:0 vi_tstamp:4155862337 data:0x00000001
kworker/5:2-275 [005] ...1 122.290531: rtcpu_vinotify_handle_msg: tstamp:4155867990 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:0 vi_tstamp:4155867544 data:0x08000000
kworker/5:2-275 [005] ...1 122.342572: rtcpu_vinotify_handle_msg: tstamp:4156521216 tag:CHANSEL_PXL_EOF channel:0x00 frame:0 vi_tstamp:4156520630 data:0x0ad90002
kworker/5:2-275 [005] ...1 122.342579: rtcpu_vinotify_handle_msg: tstamp:4156521395 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:4156520667 data:0x0ada0040
kworker/5:2-275 [005] ...1 122.342582: rtcpu_vinotify_handle_msg: tstamp:4156522342 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:0 vi_tstamp:4156521558 data:0x08000000
kworker/5:2-275 [005] ...1 122.342585: rtcpu_vinotify_handle_msg: tstamp:4156522509 tag:CHANSEL_FAULT_FE channel:0x01 frame:0 vi_tstamp:4156521559 data:0x00000001
kworker/5:2-275 [005] ...1 122.342588: rtcpu_vinotify_handle_msg: tstamp:4156522706 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:4156521562 data:0x00000000
And the resulting image is attached.
From the trace the sensor output more than 2778 lines. Try to increase the sensor driver to increase high.
kworker/5:2-275 [005] ...1 122.342579: rtcpu_vinotify_handle_msg: tstamp:4156521395 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:4156520667 data:0x0ada0040
Hi ShaneCCC,
Everything looks good now, thanks for all your help!
My sensor also supports 14 bit output but I don’t see any support for that in media-bus-format.h, is there a way to output 14 bit bayer to the TX2?
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.
Hello,
Is the IMX294 camera + TX2 combination commercially available?