Sony IMX715 camera - RAW streaming works, but Gstreamer cause stall and reboot

Hi,
I made a driver for the Sony IMX715 sensor, and a simple command works:

v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=10

shows: <<<<<<<<<<

But if im specify resolution and format like this:
v4l2-ctl -d /dev/video0 --set-fmt-video=width=3864,height=2192,pixelformat=GB10 --set-ctrl bypass_mode=0 --set-ctrl sensor_mode=0 --stream-mmap --stream-count=10

Then the system hangs and reboots after a while.
In my device tree:

									active_l                 = "0";
									active_t                 = "0";
									active_w                 = "3864";
									active_h                 = "2192";

									mode_type                = "bayer";
									pixel_phase              = "gbrg";
									csi_pixel_bit_depth      = "10";
									dynamic_pixel_bit_depth  = "10";
									pixel_t					 = "bayer_gbrg";

My setup:

Platform: NVidia Jetson Orin AGX Dev kit
JetPack 6.2.2

GMSL2 camera: AXO2 Sony IMX715

GMSL2 deserializer: MAX96716A connected to MIPI 0,1 directly.

When streaming RAW data, the Serializer and Deserializer are not reporting any errors.

Maybe you have an idea how to investigate a problem, cause we can’t get any logs.

— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —

Based on the provided context, I found a similar issue discussed in the community solutions. The problem seems to be related to the device tree configuration and the GMSL link.

One possible solution is to try getting the trace info debug log when trying to capture, as suggested in the community solution from Topic #350551. This can help understand what is being received in the capture subsystem.

Additionally, you can try enabling the trace log, trying to capture, and finally printing the trace log to verify the messages from the capture subsystem, as shown in the community solution.

It’s also worth noting that the community solution from Topic #294831 mentions a similar issue with the GMSL link and suggests checking the device tree configuration and the serdes configuration.

To investigate the problem further, you can try the following steps:

  1. Enable the trace log using the commands provided in the community solution from Topic #350551.
  2. Try to capture the video stream using the v4l2-ctl command with the specified resolution and format.
  3. Print the trace log to verify the messages from the capture subsystem.
  4. Check the device tree configuration and the serdes configuration to ensure they are correct.

If you’re still unable to find the issue, you can try seeking help from the NVIDIA support team or the community forum for further assistance.

Here is the code to enable the trace log:

sudo su
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 > /sys/kernel/debug/tracing/trace
exit

And here is the code to try to capture the video stream:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=3864,height=2192,pixelformat=GB10 --set-ctrl bypass_mode=0 --set-ctrl sensor_mode=0 --stream-mmap --stream-count=10

Please note that these commands are based on the provided context and may need to be adjusted according to your specific setup.

— We support team will also look into your issue to have further suggestions soon. please stay tuned. —

I already tried “/sys/kernel/debug/tracing” method, but as I mentioned - system completely hangs and not responding on commands.

You may need have scope to probe the MIPI signal to confirm the sensor output signal.

Thanks

Command
v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=10
works fine. I see RAW frames.

But problem happens when I specify resolution and bayer pattern

The problem has been spotted.

camera_common_sensor_ops.frmfmt_table must be allocated using kmalloc_array and not using static variable