OV2311 Custom Driver Issues
We have connected an OV2311 sensor to an Orin NX 16GB dev kit from waveshare
Custom kernel is built with Jetson Linux 35.4.1, and overlay is applied. Driver, overlay, and other files used are here public.zip (23.3 KB)
ov2311 has been tried on CAM0 and CAM1 slot, and results are the same.
Running the following:
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
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
v4l2-ctl -V
v4l2-ctl -d /dev/video0 --list-formats
v4l2-ctl -d /dev/video0 --list-formats-ext
gst-launch-1.0 -v \
nvarguscamerasrc do-timestamp=true awblock=true aelock=true sensor-id=0 \
! 'video/x-raw(memory:NVMM), width=(int)1600, height=(int)1300, framerate=(fraction)60/1' \
! nvvidconv \
! nvv4l2h264enc \
! h264parse \
! qtmux \
! filesink location=test_2311.mp4 -e
Gives:
832000000
1011200000
642900000
Format Video Capture:
Width/Height : 1600/1300
Pixel Format : 'RG10' (10-bit Bayer RGRG/GBGB)
Field : None
Bytes per Line : 3200
Size Image : 4160000
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'RG10' (10-bit Bayer RGRG/GBGB)
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'RG10' (10-bit Bayer RGRG/GBGB)
Size: Discrete 1600x1300
Interval: Discrete 0.017s (60.000 fps)
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1600, height=(int)1300, format=(string)NV12, framerate=(fraction)60/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1600, height=(int)1300, format=(string)NV12, framerate=(fraction)60/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1600, height=(int)1300, format=(string)NV12, framerate=(fraction)60/1
/GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1600, height=(int)1300, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1600, height=(int)1300, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
/GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1600, height=(int)1300, format=(string)NV12, framerate=(fraction)60/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1600, height=(int)1300, format=(string)NV12, framerate=(fraction)60/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1600, height=(int)1300, format=(string)NV12, framerate=(fraction)60/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1600 x 1300 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 31.000000; Exposure Range min 10000, max 16440000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 1600 H = 1300
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = video/quicktime, variant=(string)apple
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)apple
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Interrupt while waiting for EOS - stopping pipeline...
Execution ended after 0:00:35.316775955
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
Freeing pipeline ...
cat /sys/kernel/debug/tracing/trace gives:
# tracer: nop
#
# entries-in-buffer/entries-written: 572586/572586 #P:8
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
v4l2-ctl-4797 [000] .... 352.125908: tegra_channel_open: vi-output, ov2311 10-0060
v4l2-ctl-4797 [000] .... 352.126191: tegra_channel_close: vi-output, ov2311 10-0060
v4l2-ctl-4798 [003] .... 352.128643: tegra_channel_open: vi-output, ov2311 10-0060
v4l2-ctl-4798 [003] .... 352.128791: tegra_channel_close: vi-output, ov2311 10-0060
v4l2-ctl-4799 [004] .... 352.132557: tegra_channel_open: vi-output, ov2311 10-0060
v4l2-ctl-4799 [004] .... 352.132772: tegra_channel_close: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.254195: tegra_channel_open: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.254254: tegra_channel_close: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.254972: tegra_channel_open: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.255002: tegra_channel_close: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.270869: tegra_channel_open: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.270879: tegra_channel_close: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.271122: tegra_channel_open: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.271128: tegra_channel_close: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.271135: tegra_channel_open: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.271161: tegra_channel_close: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.271171: tegra_channel_open: vi-output, ov2311 10-0060
nvargus-daemon-4802 [004] .... 352.271206: tegra_channel_close: vi-output, ov2311 10-0060
CaptureSchedule-4818 [004] .... 352.390007: tegra_channel_open: vi-output, ov2311 10-0060
CaptureSchedule-4818 [004] .... 352.390146: tegra_channel_set_power: ov2311 10-0060 : 0x1
CaptureSchedule-4818 [004] .... 352.390150: camera_common_s_power: status : 0x1
CaptureSchedule-4818 [004] .... 352.690797: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
CaptureSchedule-4818 [004] .... 352.690805: csi_s_power: enable : 0x1
CaptureSchedule-4818 [004] .... 352.691087: tegra_channel_set_stream: enable : 0x1
CaptureSchedule-4818 [004] .... 352.700283: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
CaptureSchedule-4818 [004] .... 352.700286: csi_s_stream: enable : 0x1
CaptureSchedule-4818 [004] .... 352.700288: tegra_channel_set_stream: ov2311 10-0060 : 0x1
kworker/4:1-71 [004] .... 352.763451: rtcpu_vinotify_event: tstamp:11705452841 cch:1 vi:1 tag:VIFALC_TDSTATE channel:0x0b frame:0 vi_tstamp:374574346880 data:0x759da00010000000
kworker/4:1-71 [004] .... 352.763453: rtcpu_vinotify_event: tstamp:11705453002 cch:1 vi:1 tag:VIFALC_TDSTATE channel:0x0b frame:0 vi_tstamp:374574353376 data:0x0000000031000001
kworker/4:1-71 [004] .... 352.763454: rtcpu_vinotify_event: tstamp:11706128994 cch:1 vi:1 tag:VIFALC_TDSTATE channel:0x0b frame:0 vi_tstamp:374594901984 data:0x759d9d0010000000
kworker/4:1-71 [004] .... 352.763455: rtcpu_vinotify_event: tstamp:11706129130 cch:1 vi:1 tag:VIFALC_TDSTATE channel:0x0b frame:0 vi_tstamp:374594908480 data:0x0000000031000002
kworker/4:1-71 [004] .... 352.763457: rtcpu_nvcsi_intr: tstamp:11706227671 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x02000040
kworker/4:1-71 [004] .... 352.763458: rtcpu_nvcsi_intr: tstamp:11706227671 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000240
kworker/4:1-71 [004] .... 352.763458: rtcpu_nvcsi_intr: tstamp:11706242411 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x10000044
kworker/4:1-71 [004] .... 352.763459: rtcpu_nvcsi_intr: tstamp:11706242411 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00001044
kworker/4:1-71 [004] .... 352.763460: rtcpu_nvcsi_intr: tstamp:11706242914 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 352.763460: rtcpu_nvcsi_intr: tstamp:11706242914 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 352.763461: rtcpu_nvcsi_intr: tstamp:11706243409 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 352.763462: rtcpu_nvcsi_intr: tstamp:11706243409 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 352.763462: rtcpu_nvcsi_intr: tstamp:11706243916 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.285870: rtcpu_nvcsi_intr: tstamp:11879013217 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.285870: rtcpu_nvcsi_intr: tstamp:11879013719 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.285871: rtcpu_nvcsi_intr: tstamp:11879013719 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
CaptureSchedule-4818 [005] .... 358.311523: tegra_channel_set_stream: enable : 0x0
CaptureSchedule-4818 [005] .... 358.311525: tegra_channel_set_stream: ov2311 10-0060 : 0x0
CaptureSchedule-4818 [005] .... 358.311730: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
CaptureSchedule-4818 [005] .... 358.311732: csi_s_stream: enable : 0x0
CaptureSchedule-4818 [000] .... 358.321255: tegra_channel_set_power: ov2311 10-0060 : 0x0
CaptureSchedule-4818 [000] .... 358.321269: camera_common_s_power: status : 0x0
CaptureSchedule-4818 [000] .... 358.330338: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
CaptureSchedule-4818 [000] .... 358.330342: csi_s_power: enable : 0x0
kworker/4:1-71 [004] .... 358.339275: rtcpu_nvcsi_intr: tstamp:11879014240 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.339276: rtcpu_nvcsi_intr: tstamp:11879014240 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.339277: rtcpu_nvcsi_intr: tstamp:11879014742 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.339277: rtcpu_nvcsi_intr: tstamp:11879014742 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.339278: rtcpu_nvcsi_intr: tstamp:11879015241 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.340453: rtcpu_nvcsi_intr: tstamp:11879902028 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.340454: rtcpu_nvcsi_intr: tstamp:11879902522 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000044
kworker/4:1-71 [004] .... 358.340454: rtcpu_nvcsi_intr: tstamp:11879902522 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000044
nvargus-daemon-4802 [003] .... 387.703912: tegra_channel_close: vi-output, ov2311 10-0060
kworker/4:1-71 [004] .... 387.726371: rtcpu_isp_falcon_task_start: tstamp:4208436986 ch:0 task:HANDLE_EVENT
kworker/4:1-71 [004] .... 387.726377: rtcpu_isp_falcon_task_end: tstamp:4208437027 task:HANDLE_EVENT
kworker/4:1-71 [004] .... 393.858227: rtcpu_string: tstamp:12989014223 id:0x04010000 str:"VM0 deactivating."
v4l2-ctl-5194 [005] .... 438.621572: tegra_channel_open: vi-output, ov2311 10-0060
v4l2-ctl-5194 [005] .... 438.625819: tegra_channel_set_power: ov2311 10-0060 : 0x1
v4l2-ctl-5194 [005] .... 438.625830: camera_common_s_power: status : 0x1
v4l2-ctl-5194 [005] .... 438.926599: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-5194 [005] .... 438.926605: csi_s_power: enable : 0x1
v4l2-ctl-5194 [005] .... 438.927396: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-5194 [005] .... 438.929680: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-5194 [005] .... 438.929682: csi_s_stream: enable : 0x1
v4l2-ctl-5194 [005] .... 438.929683: tegra_channel_set_stream: ov2311 10-0060 : 0x1
v4l2-ctl-5194 [007] .... 453.246501: tegra_channel_close: vi-output, ov2311 10-0060
v4l2-ctl-5194 [007] .... 453.246509: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-5194 [007] .... 453.246511: tegra_channel_set_stream: ov2311 10-0060 : 0x0
v4l2-ctl-5194 [007] .... 453.246741: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-5194 [007] .... 453.246743: csi_s_stream: enable : 0x0
v4l2-ctl-5194 [005] .... 453.255782: tegra_channel_set_power: ov2311 10-0060 : 0x0
v4l2-ctl-5194 [005] .... 453.255796: camera_common_s_power: status : 0x0
v4l2-ctl-5194 [007] .... 453.264733: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-5194 [007] .... 453.264740: csi_s_power: enable : 0x0
What would you suggest to try next?