Tim has already conveyed my apprehensions regarding using CPU for manipulating the framebuffer. It is simply not fast enough. We need to do this via HDL. For using CPU to repaint framebuffer everytime using `
crop_service `, you would also be blocking other services since that function will take a lot of time to return.
Now, as for the behaviour you are seeing, my guess is that you are only manipulating one framebuffer, whereas, the HDMI inputs have 2 (or 3? I not looked at the design in quite a while) framebuffers. So, you may be writing to only one framebuffer, whereas the other framebuffer is untouched. Now, the HDL design is such as it uses both framebuffers for displaying the output (i.e, 1st region for sometime, and then 2nd region for the sometime, and back to 1st region...this goes on.) Since you are manipulating only 1st framebuffer, you are only getting correct output when the hardware fetches the pixels from the 1st region, and when it fetches pixels from 2nd region, you get full image. The reason why you don't see this issue when using pattern as input source is because the pattern has only one framebuffer (at this stage you should know the reason why pattern has only 1 frambuffer, whereas the HDMI inputs need 2-3 or more framebuffers, if not, then please read this
https://en.wikipedia.org/wiki/Multiple_buffering ). This is all an informed, best-guess hypothesis though.
Coming back to HDL vs CPU. While you might get this issue fixed, you are currently attempting in incorrect direction as Tim said in the previous mail. We need to modify the HDL (especially the DMA section to achieve this in practical way).