[PATCH 29/29] xf86crtc: detach scanout pixmap before randr tries

Dave Airlie airlied at gmail.com
Thu Jul 5 13:30:36 PDT 2012


From: Dave Airlie <airlied at redhat.com>

this stops us trying to use the master after we've detached later.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 hw/xfree86/modes/xf86Crtc.c |   23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index e5f58e7..aebf67b 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -726,6 +726,19 @@ xf86CrtcCloseScreen(ScreenPtr screen)
 
     xf86RotateCloseScreen(screen);
 
+    for (o = 0; o < config->num_output; o++) {
+        xf86OutputPtr output = config->output[o];
+
+        output->randr_output = NULL;
+    }
+    for (c = 0; c < config->num_crtc; c++) {
+        xf86CrtcPtr crtc = config->crtc[c];
+
+        if (crtc->randr_crtc->scanout_pixmap)
+            RRCrtcDetachScanoutPixmap(crtc->randr_crtc);
+
+        crtc->randr_crtc = NULL;
+    }
     /* detach any providers */
     if (config->randr_provider) {
         if (config->randr_provider->offload_sink) {
@@ -737,16 +750,6 @@ xf86CrtcCloseScreen(ScreenPtr screen)
         } else
             DetachUnboundGPU(screen);
     }
-    for (o = 0; o < config->num_output; o++) {
-        xf86OutputPtr output = config->output[o];
-
-        output->randr_output = NULL;
-    }
-    for (c = 0; c < config->num_crtc; c++) {
-        xf86CrtcPtr crtc = config->crtc[c];
-
-        crtc->randr_crtc = NULL;
-    }
     xf86RandR12CloseScreen(screen);
 
     return screen->CloseScreen(screen);
-- 
1.7.10.2



More information about the xorg-devel mailing list