V4l2 cpature error GLOBAL type:STREAM_VC phy:0

Hello everyone,

I use v4l2 command to capture image
Orin can not capture by v4l2 but gstreamer can.

The trace log shows

     kworker/9:0-60      [009] ....   453.920473: rtcpu_nvcsi_intr: tstamp:14625394261 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004
     kworker/9:0-60      [009] ....   453.920474: rtcpu_nvcsi_intr: tstamp:14625394261 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004
     kworker/9:0-60      [009] ....   453.920474: rtcpu_vinotify_event: tstamp:14625394803 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:468012135264 data:0x0000000008020072
     kworker/9:0-60      [009] ....   453.920475: rtcpu_vinotify_event: tstamp:14625395432 cch:0 vi:0 tag:CSIMUX_FRAME channel:0xac frame:0 vi_tstamp:468011950912 data:0x0000000000000404
     kworker/9:0-60      [009] ....   453.920475: rtcpu_nvcsi_intr: tstamp:14625394981 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004
     kworker/9:0-60      [009] ....   453.920475: rtcpu_nvcsi_intr: tstamp:14625394981 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004
     kworker/9:0-60      [009] ....   453.920476: rtcpu_vinotify_event: tstamp:14625395568 cch:0 vi:0 tag:CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:468011950944 data:0x0000000000000200
     kworker/9:0-60      [009] ....   453.920476: rtcpu_nvcsi_intr: tstamp:14625399291 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004
     kworker/9:0-60      [009] ....   453.920477: rtcpu_nvcsi_intr: tstamp:14625399291 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004
     kworker/9:0-60      [009] ....   453.920477: rtcpu_nvcsi_intr: tstamp:14625400127 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004
     kworker/9:0-60      [009] ....   453.920477: rtcpu_nvcsi_intr: tstamp:14625400127 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004

What’s it means?

0822.txt (5.9 MB)

Hi,
It looks like the camera driver is not ready. Which camera do you use? Is it a Bayer sensor or YUV sensor?

Hi DaneLLL,
I use Orin CSI-2 without I2C from FPGA,

Orin received bayer sensor

Hi,
Please refer to sensor driver programming guide:
Camera Development — Jetson Linux<br/>Developer Guide 34.1 documentation

You would need to develop kernel driver and device tree to be able to capture RAW frames through v4l2-ctl command first. And then go through Argus stack to use hardware ISP engine.

Hi DaneLLL,
The attachment are kernel driver & device tree which I modified.
I had removed read i2c function.
The Device Tree I changed resolution from 3840x2160 to 2592x1944.

Do I lose some steps make Orin can not use * v4l2-ctl command* to capture?

Screenshot from 2022-08-24 09-18-51

nv_imx274.c (33.7 KB)
tegra234-camera-imx274-dual.dtsi (7.9 KB)

Hi DaneLLL
Same problem, same imx274.c, same device tree. Using v4l2 command to capture image:

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=ov5693.raw

The ov5693.raw is an empty file. dmesg dump:

[  734.901967] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  734.902245] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  734.902992] (NULL device *): vi_capture_control_message: NULL VI channel received
[  734.903203] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=4, csi_port=4
[  734.903491] (NULL device *): vi_capture_control_message: NULL VI channel received
[  734.903701] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 4 vc- 0
[  734.904151] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

Here is my questions.

  1. Looks like capture channel is not reset right. NULL VI channel received, CSI stream fail to reopen. But the dmesg then said “Successfully reset the capture channel”. Is this the normal?
  2. I tried to set timed out to 10 sec, but it’s still facing the same question. Why would vi capture request and vi capture status timed out?
    Is there any solution?

Thank you.

The trace log tell pixel short line that means the output size don’t as expect. (tag:CHANSEL_FAULT)
And “STREAM_VC phy:0 cil:0 st:4 vc:0 status:0x00000004” tell the payload data crc error.

https://elinux.org/Jetson/l4t/Camera_BringUp

Hi @ShaneCCC ,
According to link, I saw

But I use AGX Xavier to received same data, Xavier can work, without failed by v4l2 command or gstreamer.
So I think data is normal.
Should Orin modify other files to received data?

Have boost clocks by below command to try.

sudo su
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

Hi @ShaneCCC ,

I use v4l2 command to capture first, then use dmesg to see some msg.
Then I boost clock and do v4l2 capture again.

The trace log is showing nothing.
Screenshot from 2022-08-31 13-30-27

The dmesg show at first

[ 1066.733244] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[ 1066.766503] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 1066.783139] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072

After boosting clock, it shows different

[ 1090.498602] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 262144
[ 1093.087665] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 1093.087952] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1093.089138] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 1093.097686] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 262144
[ 1095.647634] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms

It looks worse…

cat the /sys/kernel/debug/tracing/trace after v4l2 capture.

Hi @ShaneCCC ,
Yes I did it.
But I got nothing except blank.
After I boost clock, I can not get some trace log…

That’s weird. Boost clocks shouldn’t impact that.

Hi FelixHsieh1004
I am able to get tracing log after following [here @ 3rd reply]