Dynamic algorithm for managing Weston's repaint scheduling
Submitted by Pekka Paalanen
Assigned to Pekka Paalanen
Inspired by Alexander's comment and my reply in http://ppaalanen.blogspot.fi/2015/02/weston-repaint-scheduling.html I had the following on #dri-devel:
< pq> if I have a compositor running on DRM/KMS and EGL/GBM (yes, weston), is there any way I could find the margin between the final framebuffer becoming ready for a pageflip and the pageflip actually happening?
< pq> some kind of fence thing that would give me a timestamp?
< danvet> pq, we don't have that readymade
< danvet> you could grab a timestamp right before the eglswap with a gl query
< danvet> the clocks aren't the same though, so you need to convert yourself and correct for different baseline&drift
< danvet> gl has a synchronous query too iirc
< danvet> then compare with the timestamp for flips
< danvet> once we have generic async atomic in the helpers we could put a tracepoint in there
Measuring the margin would allow developing a dynamically adjusted repaint delay.
This bug is about investigating that idea of finding out the margin and developing a dynamic delay algorithm.