Dropped frame causing SOC to restart

The dropped frame of our camera causes the VI5 module to report errors frequently, which causes the SOC to restart. Under the harsh working environment of the device, frame loss is inevitable. What do we need to do to prevent the system from restarting when the unexpected dropped frame happens?

Why unexpected frame dropped?
Have modify below in vi5_fops.c to try. Maybe try infinite time out.

#define CAPTURE_TIMEOUT_MS	2500

minicom_20211218_0810.txt (256.7 KB)
attached file is error log, and about below information, how can i get “more Internal Decode Help”? thanks.

[ 94.315893] CPU:0, Error:RCE-NOC@0xbe00000,irq=487
[ 94.316022] **************************************
[ 94.316113] * For more Internal Decode Help
[ 94.316182] * http://nv/cbberr
[ 94.316245] * NVIDIA userID is required to access
[ 94.316320] **************************************

Looks like the sensor output signal or output package have problem to capture validate frame data cause the driver crash.

Have a check the trace log if any clue.

Enable the trace.

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 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

Get the trace after issue camera capture.

cat /sys/kernel/debug/tracing/trace

trace_1702.txt (11.5 MB)
attached file is trace file

@ ShaneCCC
what about the trace log file? Do you need more other information?

Confirm if the sensor output embedded data package to define the correct value for embedded_metadata_height in device tree.

embedded_metadata_height = “0”
in our device tree file: hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-ar0231-a00.dtsi

actually, What we are much more concerned about is that why frame dropping causes the SOC restart, maybe VI5 driver need more optimization can avoid the SOC restart. thanks.

You can try to debug the VI driver for your case.
Did you modify the timeout to try?

thanks for
#define CAPTURE_TIMEOUT_MS 2500

it’s for “no reply from camera processor”, when camera died or be pluged out, but about “discarding frame” has no effection.

then why discarding frame causes SOC restart?

Have a check below patch if able fix your problem.

drivers/media/platform/tegra/camera/vi/capture.c

the above file modification from jetpack 4.6, and has some update about rtcpu

for example head file:
#include <linux/tegra-camera-rtcpu.h>

is there some documents about the rtcpu? thanks

Sorry, don’t have document for it now.

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