Why can the camera produce pictures first, but then cannot produce pictures later? Please help me find out

Hi All:
Why can the camera produce pictures first, but then cannot produce pictures later? Please help me find out.

test cmd:

v4l2-ctl -d /dev/video0 --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-count=1 --stream-poll --stream-to=-|ffmpeg -loglevel quiet -f rawvideo -s 1920x1536 -pix_fmt yuyv422 -i - video_output.jpeg

Functional Block Diagram:

software version:

robot@tegra:~$ cat /etc/nv_tegra_release
# R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug  1 19:57:35 UTC 2023
sudo su
cd /sys/kernel/debug/dynamic_debug/
echo file csi5_fops.c +p > control

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 30720 > /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
echo > /sys/kernel/debug/tracing/trace
cat /sys/kernel/debug/tracing/trace

trace log:
video0-error.txt (22.0 KB)

dts:

pix_clk_hz = "115500000";
serdes_pix_clk_hz = "312500000";  

pixel_clk_hz = 2200 × 1750× 30 = 115500000
serdes_pix_clk_hz = 2500000000 * 2 / 16 = 312500000

dts.txt (448.3 KB)

dmesg:
dmesg.txt (136.1 KB)

hardware info:

Sensor: ISX031
Sensor Size: 1/2.42”
Pixel size: 3.0um
ISP: Chip bring
Resolution: 1920*1536(30fps)
Output format YUV422 8 bit(UYVY)
Lens structure 2G4P+IR
FOV: H:195±3 V:154±3
Serializer: MAX9295A
Connector: FAKRA male type Z
Voltage: 8V~16V
Current <100mA(@12V)
Power
consumption <1.2W
Water proof IP69K
Operation
Temp -40℃~+85℃
Storage Temp -40℃~+95℃
Size: L30*W30*H34.71
Weight: <60g

actual output size:
2200 x 1750

It could be the incorrect embedded_data_height in device tree cause the error. Or the incorrect virtual channel data send to the bus.

     kworker/4:0-3336    [004] ....  1134.700065: rtcpu_vinotify_event: tstamp:36159224424 cch:-1 vi:0 tag:CHANSEL_NOMATCH channel:0x41 frame:0 vi_tstamp:1157088704448 data:0x00000000000003c9

Hi:
It shouldn’t be a problem with vi.

robot@tegra:~$ v4l2-ctl -d /dev/video7 --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-count=1 --stream-poll --stream-to=-|ffmpeg -loglevel quiet -f rawvideo -s 1920x1536 -pix_fmt yuyv422 -i - video_output.jpeg
<<<<
robot@tegra:~$ v4l2-ctl -d /dev/video7 --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-count=1 --stream-poll --stream-to=-|ffmpeg -loglevel quiet -f rawvideo -s 1920x1536 -pix_fmt yuyv422 -i - video_output.jpeg
<<<<
robot@tegra:~$ v4l2-ctl -d /dev/video7 --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-count=1 --stream-poll --stream-to=-|ffmpeg -loglevel quiet -f rawvideo -s 1920x1536 -pix_fmt yuyv422 -i - video_output.jpeg
<<<<
       ---------------> The same camera, video7, can produce pictures here, as follows:
robot@tegra:~$ v4l2-ctl -d /dev/video7 --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-count=1 --stream-poll --stream-to=-|ffmpeg -loglevel quiet -f rawvideo -s 1920x1536 -pix_fmt yuyv422 -i - video_output.jpeg
select timeout
       ---------------> The same camera, video7, can no longer produce pictures.

Why does the same command show pictures sometimes and not pictures sometimes?

trace.log:
trace-video07.txt (83.9 KB)

Can you help me find out what’s going on? If the vc is wrong, theoretically, the picture should not be able to be produced even once.
Compared to 4LAN running two ISX031, the picture can be produced. I only modified the number of serdes_pix_clk_hz and LAN, and left the others unchanged. It should not be a problem with vc.

From the trace log looks like NVCSI/VI didn’t receive any validate data from the MIPI bus. Suppose it could be output signal problem.

Thanks

Hi:
Why is there data for a while and no data for a while? Do you have any doubts here?

I don’t know. Maybe you can configurate max9296 to output test pattern to narrow down.

I look up the max9296 uniler myself, thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.