I am getting access denied errors with half of my original post, so I am adding the second half here:
Since I am not certain where the problem comes from, I have tried many configs for the different frequencies: CPU clocked faster than DDR, DDR clocked faster than CPU, CPU and DDR clocked at the same frequency, GLCD clocked at various values... I even tried playing with the DDR Arbiter settings, giving more bandwidth to the GPU/GLCD Targets 3/4, and reducing it from the other Targets (0 for CPU and 1/2 for DMA). Nothing of this seems to get rid of the artifacts though. There is only one case that has been somewhat helpful: lowering the pixel clock coming out from the GLCD towards the panel. However, this then has quite a visible shutter effect on the LCD because the frames get updated too slow, so although helpful, it doesn't solve my problem.
Also, I have tried disabling the GPU and using just the CPU for rendering, and this seems to remove the artifacts but makes the GUI a lot slower (which is obvious, since drawing things FAST is the whole purpose of the GPU).
GUI is nothing special, a background image on one layer and some buttons with images on other layers. I have written my own version of a knob-style slider into the library by having all the images preloaded and switching the one being drawn, and this also works without a problem.
I have uploaded a video so you can see what I am talking about (you can watch it here: https://youtu.be/fUdd2Jk2jB4
). In it you can see me navigating through some of the menu screens. All images are preprocessed as RAW for direct blit in DDR, that's why I am waiting for it to "load" on the presentation screen (see the blue progress bar shown on the lowest side of the screen). The issue is not touch-screen related since I have tried switching screens through code and the same thing happens.
My belief on this issue is that it is some kind of bus contention problem when the GLCD/GPU read from/write to the DDR. Although this is also not clear since this shouldn't be visible when using double buffering and VSync swap (which I am). TLDR:
whenever PIC32MZ DA GPU renders something into DDR I get great amount of artifacts on screen using GLCD.
Sorry for the very long post. Any amount of help will be greatly appreciated.
Thank you in advance. Regards,