diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-13 14:32:05 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-07 10:37:05 +0100 |
commit | d0e138c3f3e58ef127dad6c6aef48b1713b5ce58 (patch) | |
tree | 2400f69e22a26d94a122f32d428fc7a30430cfc7 /hw | |
parent | 4caad34c932115dc0a9fd9c2995ebb2d38b9359c (diff) |
dix: attach unbound screens to protocol screen 0 (v2)
This is the default attachment, unbound gpu screens get
attached to the 0 protocol screen.
detach on hotunplug.
v2: detach after tearing down crtc/outputs.
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 3 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index aa17a58fd..058d09f56 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(); OsReleaseSIGIO(); diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index a2cd85652..0bf14eb5c 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -736,6 +736,11 @@ xf86CrtcCloseScreen(ScreenPtr screen) crtc->randr_crtc = NULL; } + /* detach any providers */ + if (config->randr_provider) { + if (screen->current_master) + DetachUnboundGPU(screen); + } xf86RandR12CloseScreen(screen); free(config->name); |