Updated L4T kernel 35.4.1 patches

This is the third version of my patches fixing bugs in the kernel: patches-20240624.tar.gz (11.7 KB) Most of them are related to MIPI cameras, but there are a few other bugs I found and fixed.

Before these patches, I observed various errors, kernel memory corruption (memory access violations etc), and failure to recover from errors. With these patches, I left a board streaming from multiple cameras overnight with a script that randomly turns off one camera to run the error handling code, and in the morning it was still working.

To avoid any doubt, I am releasing these patches under the terms of the GPL, just like the code they apply to (as required by the GPL), with full support from my employer (and previous employers when I have published earlier versions of these patches). I would appreciate if NVIDIA could merge these fixes so me and other people don’t have to continually rebase them with every new release from NVIDIA.

This is a rebased and slightly updated version of my patches from L4T kernel 35.4.1 patches. The functional changes are:

  • One of the fixes only worked correctly on CONFIG_PREEMPT_RT, so I used a different approach
  • I added the last patch which fixes a bug with the display driver

My TODO comment in “Avoid using TEMP_CHANNEL_ID for transactions with responses” should be easily addressed by somebody more familiar with the rest of that code.

The dce change may not be desirable if you want to keep it in a workqueue instead of a separate thread, but there are still race conditions that need to be fixed. They can be solved using the workqueue function return values, same as I did for the kthread version.

1 Like

Hi,
Thanks for the sharing. We will review the patches and see if certain commits can be merged. And would be great if you can share the cameras(brands and model ID) you are using.

I don’t see how camera models are relevant here. I’ve encountered these problems with four different cameras, some directly connected and some connected via two different serializer/deserializer pairings. If you look at the incoming links on this forum (to this version and previous versions), you can find other customers who have encountered these problems with additional camera models.

Hi @brian199

I’ve tested patches-20240624.tar.gz

After merged your patches, the kernel panic issue I’ve reported in Kernel panic when closing a stuck camera seems to be fixed.

However, I found there is a new problem when using your patches:

  • When I intentionally unplug a streaming camera, the camera driver tries to restart in a endless loop and cannot be stopped. The only way to stop it is to turn off the power.

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