diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-29 16:01:58 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-29 16:42:28 +0100 |
commit | a873f6d354ebbc52265e686b614027f537a6363a (patch) | |
tree | 345063e73c52debc056f904dc6fb2d6f430a30f1 /src/sna/sna_driver.c | |
parent | a192f8cbc238d84e058b01b7682abe7ef09d3508 (diff) |
sna: Release the front buffer and drop DRM master early during shutdown
If we delay the dropping of DRM master we may complete a VT switch
before we are ready and so prevent a second X server from reacquiring
master, and dying.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55446
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r-- | src/sna/sna_driver.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 462d9aca..1b7e817f 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -736,6 +736,7 @@ static Bool sna_early_close_screen(CLOSE_SCREEN_ARGS_DECL) DBG(("%s\n", __FUNCTION__)); + xf86_hide_cursors(scrn); sna_uevent_fini(scrn); /* drain the event queues */ @@ -747,7 +748,12 @@ static Bool sna_early_close_screen(CLOSE_SCREEN_ARGS_DECL) sna->dri_open = false; } - xf86_hide_cursors(scrn); + if (sna->front) { + screen->DestroyPixmap(sna->front); + sna->front = NULL; + } + + drmDropMaster(sna->kgem.fd); scrn->vtSema = FALSE; xf86_cursors_fini(screen); @@ -764,13 +770,7 @@ static Bool sna_late_close_screen(CLOSE_SCREEN_ARGS_DECL) DBG(("%s\n", __FUNCTION__)); - if (sna->front) { - screen->DestroyPixmap(sna->front); - sna->front = NULL; - } - sna_accel_close(sna); - drmDropMaster(sna->kgem.fd); depths = screen->allowedDepths; for (d = 0; d < screen->numDepths; d++) |