[PATCH] present: Fix missed notify MSC computation

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 16 01:49:18 PST 2015


Only treat divisor==0 as async to immediately report the actual vblank.
If the user species a non-zero divisor, we should compute the missed
vblank properly or else we report too early.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 present/present.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/present/present.c b/present/present.c
index 1dddcc0..9a283d4 100644
--- a/present/present.c
+++ b/present/present.c
@@ -961,7 +961,7 @@ present_notify_msc(WindowPtr window,
                           0, 0,
                           NULL,
                           NULL, NULL,
-                          PresentOptionAsync,
+                          divisor == 0 ? PresentOptionAsync : 0,
                           target_msc, divisor, remainder, NULL, 0);
 }
 
-- 
2.1.4



More information about the xorg-devel mailing list