diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-25 18:35:45 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-25 18:36:59 +0100 |
commit | 98feba417c87dce020df6a6ed157e3546591d8e7 (patch) | |
tree | 7870f98070ce7da798e6a66eb7dadf28612ec1b3 /src | |
parent | febfd388235fbe566a505d7d83733305cf344850 (diff) |
sna: Drop master when closing the screen
As we reacquire master when initialisation the next gen of the server,
to keep the reference counting consistent we need to release our master
reference on CloseScreen.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel_device.c | 4 | ||||
-rw-r--r-- | src/sna/sna_driver.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index 74c9301b..1880a9bb 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -196,8 +196,10 @@ int intel_put_master(ScrnInfoPtr scrn) ret = 0; assert(dev->master_count); - if (--dev->master_count == 0) + if (--dev->master_count == 0) { + assert(ioctl(dev->fd, DRM_IOCTL_SET_MASTER) == 0); ret = ioctl(dev->fd, DRM_IOCTL_DROP_MASTER); + } return ret; } diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index e2037174..3428d5b1 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -773,6 +773,7 @@ static Bool sna_late_close_screen(CLOSE_SCREEN_ARGS_DECL) free(depths); free(screen->visuals); + intel_put_master(xf86ScreenToScrn(screen)); return TRUE; } |