From: Dave Airlie <airl...@redhat.com> this stops us trying to use the master after we've detached later.
Signed-off-by: Dave Airlie <airl...@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 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel