This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Vertical tearing under high GPU load

Hi,

On the uEVM I'm seeing vertical tearing (I think) on the HDMI output. By vertical, I mean that the left and right sides of the display can be out of sync.

I'm using the 3.8.13 kernel from the GLSDK and the 1.9.0.12 SGX libs and drivers.

This looks like the GPU is not done drawing to the drm memory when the drmModePageFlip() occurs. Adding a glFinish() call seems to make no difference.

What we are trying to do is ingest YUYV data from a camera and then render it via the GPU to the HDMI (RGB) output. We read the data into a BO using gbm_bo_write() and then render it as a texture onto the display.

Tearing occurs when the output image gets large. With our current technique this requires a lot of inter-pixel interpolation, probably resulting in quite high load. It's difficult to tell, since the driver doesn't seem to ever wait for longer than the 60Hz, 16ms period. Does the driver ever hold off in eglSwapBuffers() or drmModePageFlip() if the GPU is not completely done? If not how can you measure GPU loading?

I found another forum post for a different chip here. Is it also true that you must wait 3 frames before reusing buffers on the OMAP5? I believe we are using 4 BO's to write data into, but I don't know if this is a copy operation or not. Our video data is read into the BO's from two ping-pong buffers, so they do get overwritten before 3 frames are done.

Thanks,

Nick