[PATCH 14/36] dix: attach unbound screens to protocol screen 0

Dave Airlie airlied at gmail.com
Thu Jul 5 08:21:15 PDT 2012


From: Dave Airlie <airlied at redhat.com>

This is the default attachment, unbound gpu screens get
attached to the 0 protocol screen.

detach on hotunplug.

Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 hw/xfree86/common/xf86Init.c |    3 +++
 hw/xfree86/modes/xf86Crtc.c  |    4 ++++
 2 files changed, 7 insertions(+)

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index a60cf38..54fc523 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -920,6 +920,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
 #endif
     }
 
+    for (i = 0; i < xf86NumGPUScreens; i++)
+        AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+
     xf86VGAarbiterWrapFunctions();
     xf86UnblockSIGIO(was_blocked);
 
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 62de5a0..a8dc187 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -726,6 +726,10 @@ xf86CrtcCloseScreen(ScreenPtr screen)
 
     xf86RotateCloseScreen(screen);
 
+    /* detach any providers */
+    if (config->randr_provider) {
+        DetachUnboundGPU(screen);
+    }
     for (o = 0; o < config->num_output; o++) {
         xf86OutputPtr output = config->output[o];
 
-- 
1.7.10.2



More information about the xorg-devel mailing list