Device : i.MX6Dual
In custom platform, the payload of BUS and GPU is very high.
In this case, the time cost of using g2d_blit() will be unstable, sometimes it's more than 50ms.
But they need to use G2D to resize the resolution of video frames.
So when playing a 720P/30fps movie, we have to separate the decoding thread and rendering thread so that we can render frames under 30fps.
When gstreamer calls render function of video-sink gstreamer plugin, we will save the physical address of decoded frame, let the render function return, then in rendering thread we'll use the saved physical address to render this decoded frame ASAP.
They allocated several dma buffer to let vpu using.
They thought vpu would use these dma buffers sequentially (e.g:12345 12345 12345 12345).
So we added 6 more dma buffers for gstreamer plugin - vpudec, so we can get some more time (1000 / 30 * 6 = 200 ms) to avoid VPU using this physical address which is still being used by render thread.
But the result was not the same as we thought, vpu didn't use these dma buffers sequentially(e.g:1235 13245 134 231 2413), so our design is broken.
Please explain to us why this happened, and give us some suggestion.