CSI error - explanation


After running your command example I have error:

demo@tegra-ubuntu:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=720, height=576, framerate=30/1, format= NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v
nvbuf_utils: Could not get EGL display connection
WARNING: erroneous pipeline: could not parse caps "video/x-raw(memory:NVMM),width=720,\ height=576,\ framerate=30/1,\ format=\ NV12"

Video, which is recorder in previous post, was played by cheese application.
VLC player gives the same output (command vlc v4l2:///dev/video0).

hello dimaz,

so, you’re using cheese app to set-up camera stream, and vlc to render the output frames?

this error may due to you’re not setting-up environment variable.
please try… $ export DISPLAY=:0, and using $ xrandr to check it’s configured correctly.

here’s another approaches by using v4l standard controls. it’ll output frame-rate below the pipeline also.
for example,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

Hello JerryChang.

Results are interesting.

When I run command (v4l2-ctl -d /dev/video0 --set-fmt-video=width=720,height=576,pixelformat=UYVY --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100) first when board just booted-up, I have an errors:

[ 60.974181] tegra194-vi5 15c10000.vi: corr_err: discarding frame 2, flags: 0, err_data 131072
[ 60.994096] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 6, err_data 131072
[ 61.014174] tegra194-vi5 15c10000.vi: corr_err: discarding frame 2, flags: 6, err_data 131072
[ 61.034111] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 6, err_data 131072

After it, I run cheese and close cheese and run v4l2 command again.
And it executed without errors:

demo@tegra-ubuntu:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=720,height=576,pixelformat=UYVY --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.49 fps

I think these errors are the reason of my video issue.
How to fix them?

hello dimaz,

could you please adding some debug logs for comparison.
it might be the incorrect power-on/off sequence. you should review your sensor drivers.

Could you please advise, what additional logs do I have to share?

I’ve added

echo file vi5_fops.c +p > /sys/kernel/debug/dynamic_debug/control
echo file csi5_fops.c +p > /sys/kernel/debug/dynamic_debug/control

And got these logs:

[ 276.248253] t194-nvcsi 15a00000.nvcsi: csi5_power_on
[ 276.251299] t194-nvcsi 15a00000.nvcsi: csi5_power_off
[ 324.474056] t194-nvcsi 15a00000.nvcsi: csi5_power_on
[ 324.517746] t194-nvcsi 15a00000.nvcsi: csi5_start_streaming: csi_pt=0, st_id=0, vc_id=0, pg_mode=0
[ 324.517763] t194-nvcsi 15a00000.nvcsi: csi5_stream_set_config: stream_id=0, csi_port=0
[ 324.517778] t194-nvcsi 15a00000.nvcsi: csi5_stream_open: stream_id=0, csi_port=0
[ 324.520901] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 324.614261] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 0, err_data 131072
[ 324.628272] tegra194-vi5 15c10000.vi: corr_err: discarding frame 2, flags: 6, err_data 131072
[ 324.647864] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 6, err_data 131072
[ 324.667845] tegra194-vi5 15c10000.vi: corr_err: discarding frame 2, flags: 6, err_data 131072
[ 329.709253] t194-nvcsi 15a00000.nvcsi: csi5_stop_streaming: csi_pt=0, st_id=0, vc_id=0, pg_mode=0x
[ 329.709262] t194-nvcsi 15a00000.nvcsi: csi5_stream_close: stream_id=0, csi_port=0
[ 329.723614] t194-nvcsi 15a00000.nvcsi: csi5_power_off

This is additional log.
log.txt (373.4 KB)

hello dimaz,

I meant compare the errors between (cheese+v4l2 command) and (only v4l2 command).

here’re some analysis with your error logs.

  1. discarding frame logs it’s sometime a warning messages, due to unsuccess capture state, it’s dropping frames and issue a requeue for new buffers.
  2. those frame index should keep increasing, but those frame-id looks abnormal.
  3. note there’re two different flags:0 and flags:6 reported, which shows
    3.1. Channel encountered uncorrectable error and must be reset
    3.2 the error capture status of CSIMUX_FRAME shows an illegal data packet was encountered and dropped by CSIMUX, this error may have no effect on capture result or trigger other error if frame got corrupted.

please examine your sensor drivers according to above.


Thank you for hint.

Another one question.
Does Xavier NX Release 32.6.1 have de-interlacer?

I saw a lot of posts on this forum, and you mentioned that Release 32.6.1 doesn’t have de-interlacer.
If no, do you have patch for Xavier NX Release 32.6.1, or which Release have it?

hello dimaz,

it doesn’t support with de-interlace, I also not seeing this in the short-term public release plans.
please having implementation this by your own. thanks

Hello JerryChang.

Another one question.

I run ADV driver on Xavier NX and Nano.
Driver is the same. Device tree almost the same.

But there is a different behavior about stride parameter.

In Nano, this parameter equal to 1472 by default.
In Xavier NX this parameter equal to 1440, and I must change this value to 1472 manually in order to have nice video.

Why behavior of these platform so different?
How to set value 1472 to Xavier NX by default without external command --preferred_stride?

hello dimaz,

please follow VI’s 64 byte aligned to set the correct stride, set the width alignment to 64.
you may also check below VI driver, updating the driver for your own use-case.
for example,

static void tegra_channel_update_format(struct tegra_channel *chan,
                u32 width, u32 height, u32 fourcc,
                const struct tegra_frac *bpp,
                u32 preferred_stride)
       /* Align stride */
        if (chan->vi->fops->vi_stride_align)

        chan->format.width = width;
        chan->format.height = height;
        chan->format.pixelformat = fourcc;
        chan->format.bytesperline = preferred_stride ?: bytesperline;

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