Hello,
When I try and capture a frame of video, I get the following error:
# v4l2-ctl -d /dev/video0 --stream-count=1 --stream-mmap --stream-to=frame-1080p60.raw --verbose --set-fmt-video=width=1920,height=1080,pixelformat=1
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 1920/1080
Pixel Format : 'UYVY' (UYVY 4:2:2)
Field : None
Bytes per Line : 3840
Size Image : 4147200
Colorspace : SMPTE 170M
Transfer Function : Default (maps to Rec. 709)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
New timings found
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
^C
From my previous notes, I try and boost the clocks and enable debugging :
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
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/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
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 60720 > /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 1 > /sys/kernel/debug/tracing/events/camera_common/enable
The trace looks like this :
cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 27/27 #P:6
#
# _-------=> irqs-off
# / _------=> need-resched
# | / _-----=> need-resched-lazy
# || / _----=> hardirq/softirq
# ||| / _---=> preempt-depth
# |||| / _--=> preempt-lazy-depth
# ||||| / _-=> migrate-disable
# |||||| / delay
# TASK-PID CPU# ||||||| TIMESTAMP FUNCTION
# | | | ||||||| | |
v4l2-ctl-4173 [000] ....... 9786.562120: tegra_channel_open: vi-output, tc358743 10-000f
v4l2-ctl-4173 [002] ....... 9786.588696: tegra_channel_set_power: tc358743 10-000f : 0x1
v4l2-ctl-4173 [002] ....... 9786.588712: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-4173 [002] ....... 9786.588716: csi_s_power: enable : 0x1
v4l2-ctl-4173 [002] ....... 9786.589277: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
vi-output, tc35-4174 [004] ....... 9786.597481: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [004] ....... 9786.597490: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [004] ....... 9786.597492: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [004] ....... 9786.597493: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
v4l2-ctl-4173 [001] ....... 9786.597501: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-4173 [001] ....... 9786.598706: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-4173 [001] ....... 9786.598711: csi_s_stream: enable : 0x1
v4l2-ctl-4173 [001] ....... 9786.599166: tegra_channel_set_stream: tc358743 10-000f : 0x1
vi-output, tc35-4175 [000] ....... 9789.138299: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
vi-output, tc35-4174 [002] ....... 9789.138918: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [002] ....... 9789.138927: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [002] ....... 9789.138929: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [002] ....... 9789.138930: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4175 [004] ....... 9791.698244: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
vi-output, tc35-4174 [000] ....... 9791.698641: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [000] ....... 9791.698649: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [000] ....... 9791.698650: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [000] ....... 9791.698651: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4175 [004] ....... 9794.258049: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
vi-output, tc35-4174 [000] ....... 9794.258318: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [000] ....... 9794.258328: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [000] ....... 9794.258329: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
vi-output, tc35-4174 [000] ....... 9794.258329: vi_task_submit: class_id:48 ch:0 syncpt_id:25 syncpt_thresh:6 pid:4174 tid:4174
v4l2-ctl-4173 [003] ....... 9794.959240: tegra_channel_close: vi-output, tc358743 10-000f
vi-output, tc35-4175 [002] ....... 9796.786024: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
v4l2-ctl-4173 [005] ....... 9796.786286: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-4173 [005] ....... 9796.786289: tegra_channel_set_stream: tc358743 10-000f : 0x0
v4l2-ctl-4173 [005] ....... 9796.787278: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-4173 [005] ....... 9796.787281: csi_s_stream: enable : 0x0
v4l2-ctl-4173 [005] ....... 9796.788969: tegra_channel_set_power: tc358743 10-000f : 0x0
v4l2-ctl-4173 [005] ....... 9796.788973: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-4173 [005] ....... 9796.788975: csi_s_power: enable : 0x0
But I can not figure out why the request is timing out. Can you provide any insight or area to further investigate ?
Thank you.