Screen-flicker when capturing images from image sensor

Me and my team use a system including a Jetson TX2 and an external image sensor. For a long time we have been running L4T 28.1 with a custom image sensor driver based directly on the ov5693.c example driver. We interface to the image sensor using iotctl and the V4L2 API. This system works very well.

We want to upgrade to L4T 28.2 to enable TensorRT. We recently upgraded the kernel on a device which also entailed updating the driver to match the ov5693.c that comes with the 28.2 packages. When we now try to capture images and display them, the entire screen flickers in random patches (even outside of the window holding the displayed image). Underneath all the flickering we can see that the image sensor is still capturing images.

The output of the tracer is included below. The error we have focused on is

arm_smmu_context_fault: Unhandled context fault: iova=0x61d88000, fsynr=0x13, cb=19, sid=4(0x4 - VI), pgd=26affe003 pud=26affe003, pmd=ea965003, pte=0

On the embedded Linux wiki, it was suggested that this error arises when the driver’s embedded_metadata_height is set to 0 or does not match the sensor’s output. We matched what we found in the data sheet but just to be sure, we cycled through several different embedded_metadata_height values and the problem still occurs.

Any help would be greatly appreciated. This is a significant blocker for us right now. Trace output below (shortened a bit, there was a lot of the same thing repeated since we are live streaming):