Camera streams fine for a bit, then CHANSEL_NOMATCH

I am developing a driver for a sensor and having some issues getting it to stream continuously.

The camera will stream for 10-15 seconds, then fail.
The kernel trace shows successful captures during that period, then we start to see CHANSEL_NOMATCH with data:0x00000249, which I believe means it is failing to match on line start with a data type of 0x12.

This is confusing since this is the ID of our embedded rows (2 before the pixel section, 2 after), and capture of them works just fine until some time passes, so VI knows how to deal with this ID (in the right context, I guess).

The failed captures have a sane time period between FS and FE, so I believe the camera is still sending full frames. Perhaps it starts sending invalid frames, but that seems unlikely. It is difficult to debug anways as I can’t get VI to dump a raw failed frame for me to see what is going wrong with it.

I have uploaded a trace with an example of successful capture at the start and the failure mode mentioned at the end.

I have been running captures with these tweaks seen in other forum posts:

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 > /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate > /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate > /sys/kernel/debug/bpmp/debug/clk/nvcsi/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

Camera details:

  • Set up for RAW12 capture
  • 3840 x 2160
  • 30fps
  • Using 2 MIPI lanes

trace.txt (531.7 KB)

Did you confirm the sensor output embedded data and define the correct value for embedded_metadata_height in device tree?

Yes, the camera is set to output two rows before the pixel rows, and two rows after. The device tree is set to expect 4 rows.
And the trace shows that VI, before the capture starts failing, is capturing embedded data before and after the pixel rows.

Sorry to tell current don’t support embedded data after the pixel.

I am able to stream video from the camera just fine for 10-15 seconds.
Is it possible the embedded lines after the pixel lines cause the capture to fail after a period of time rather than right away?
I will try with the bottom embedded lines disabled.

Suppose it could cause unknow issue for the embedded data after the pixel data lines.

Thanks

That does not seem to have helped, unfortunately.
New trace attached, although the problem seems to be the same. Trace does show the embedded capture finishing prior to the pixel rows now.

trace-nobottomembed.txt (909.0 KB)

I disabled the extra logging shown in the bottom half of the snippet in my first post and that seems to have fixed this problem.

Seems like a very strange failure mode though…

Sorry to tell current don’t support embedded data after the pixel.

Worth noting that after the above “fix,” streaming is working fine even with the bottom embedded rows enabled.

Could you give detail of the “fix”
Does the tag:CHANSEL_NOMATCH still show in trace after your “fix”

CHANSEL_NOMATCH does not appear anymore.

By configure the sensor?

Sensor configuration was not the fix.

I just stopped using these debug tweaks:

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

Capture now works fine, regardless of if the bottom embedded rows are enabled or not.

Could you confirm the BSP version?

cat /etc/nv_tegra_release

We are using Yocto and Openembedded 4 tegra.
The version we are using is based on L4T R32.6.1.

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