sna/present: Compensate for time elapsed since last swap

Graphics / X.Org / xf86-video-intel - Chris Wilson [chris-wilson.co.uk] - 11 February 2015 16:16 UTC

When computing the delay for the fake flip, compensate for any time elapsed since the last frame in order to hit the desired vblank more accurately. A side-effect of this is that we may now compute 0 delay timers which require special handling.

Testcase: present-test/accuracy

688f5e9 sna/present: Compensate for time elapsed since last swap
src/sna/sna.h | 5 ++
src/sna/sna_present.c | 87 ++++++++++++-------
test/present-test.c | 226 +++++++++++++++++++++++++++++++++++++++++++------
3 files changed, 263 insertions(+), 55 deletions(-)

Upstream: cgit.freedesktop.org


  • Share