[PATCH 2/3] present: Query the Window's CRTC every time

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 6 00:25:43 PST 2015


As the Window may flip between CRTC's between frames, we need to recheck
which CRTC to use every frame or else attempt to flip on an invalid
CRTC.

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

diff --git a/present/present.c b/present/present.c
index 8c50664..1ce587e 100644
--- a/present/present.c
+++ b/present/present.c
@@ -724,15 +724,8 @@ present_pixmap(WindowPtr window,
 
     if (!screen_priv || !screen_priv->info)
         target_crtc = NULL;
-    else if (!target_crtc) {
-        /* Update the CRTC if we have a pixmap or we don't have a CRTC
-         */
-        if (!pixmap)
-            target_crtc = window_priv->crtc;
-
-        if (!target_crtc || target_crtc == PresentCrtcNeverSet)
-            target_crtc = present_get_crtc(window);
-    }
+    else if (!target_crtc)
+	target_crtc = present_get_crtc(window);
 
     present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc);
 
-- 
2.1.4



More information about the xorg-devel mailing list