I'm currently developing a Qt5/EGL app that runs on an iMX6-based board.
I'm using a power-save script to put the display in sleep mode. This script powers off the display and blanks the framebuffer. In case of exit of this mode, the framebuffer is woken up along with the display.
But, sometimes, when we exit the sleep mode, the display turns out to be one frame late.
It seems like Qt5/EGL current drawing frame is actually the same than the one being displayed by HDMI/framebuffer.
Then as long as Qt doesn't write a new frame, we are displaying the old one, so we are one frame late.
Do you guys know where this failed synchronization could come from ?
Thank you, have a nice day
Hi guys, I actually found what the problem was.
When the display is plugged in, the framebuffer goes in simple buffer mode. When Qt/EGL starts up, it switches the framebuffer in double buffer mode.
But, as our Qt app is rebooting the display at startup, the framebuffer goes BACK in simple buffer mode, while Qt thinks it is doubled. Then, as the FB is in simple buffer mode, the buffer swapping has absolutely no effect. In parallel, Qt still tries to write the second buffer, which will actually never be displayed.
Then, I modified the HDMI driver to make the FB always go in double buffer mode.
Thanks anyway for helping !