IPU YUYV->NV12 calls back too early causing image tearing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IPU YUYV->NV12 calls back too early causing image tearing

704 Views
davemcmordie
Contributor III

We have a system with 4 simultaneous video streams ( 2 YUYV + 2 GREY) flowing via MIPI from our FPGA to the i.mx6q (linux 3.14.38+).  On the two YUYV channels (which are captured to NV12) we occasionally observe torn imaging in the lower half of the image, as though a cache line is bad, or a DMA operation is in progress.  When we insert a delay after capture, the problem disappears.  It looks to me like ipu_csi_enc is simply getting a callback before the entire IDMAC conversion (YUYV -> NV21) is complete, but I don't have deep enough knowledge of the IPU to know what to look at.  I did try forcing cache invalidates after capture and that did nothing.

Can anyone suggest a theory as to what could be going wrong and how to correct it (a sleep after frame capture is not acceptable).  What I am looking for is how to verify whether the IPU's interrupt logic is set up to fire at the correct time.

Here is a sample showing the kind of vsync/hsync jumping that I am calling tearing:

pastedImage_1.png

Thanks!


Dave

Labels (4)
0 Kudos
1 Reply

572 Views
joanxie
NXP TechSupport
NXP TechSupport

pls refer to the patch for surround view solution for imx6q 4xmipi on 3.14.38

https://community.nxp.com/docs/DOC-328548 

0 Kudos