Re: [BUG REPORT] media: coda: mpeg4 decode corruption on i.MX6qp only

From: Sven Van Asbroeck
Date: Wed Feb 10 2021 - 13:44:10 EST


Found it!

The i.MX6QuadPlus has two pairs of PREs, which use the extended
section of the iRAM. The Classic does not have any PREs or extended
iRAM:

pre1: pre@21c8000 {
compatible = "fsl,imx6qp-pre";
<snip>
fsl,iram = <&ocram2>;
};

pre3: pre@21ca000 {
compatible = "fsl,imx6qp-pre";
<snip>
fsl,iram = <&ocram3>;
};

The CODA (VPU) driver uses the common section of iRAM:

vpu: vpu@2040000 {
compatible = "cnm,coda960";
<snip>
iram = <&ocram>;
};

The VPU or the PREs are overrunning their assigned iRAM area. How do I
know? Because if I change the PRE iRAM order, the problem disappears!

PRE1: ocram2 change to ocram3
PRE2: ocram2 change to ocram3
PRE3: ocram3 change to ocram2
PRE4: ocram3 change to ocram2

Sven