diff options
author | Imre Deak <imre.deak@intel.com> | 2012-08-31 14:31:51 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-05 11:11:06 +0100 |
commit | 46981d01700c1159bfb6bc0aebc938ff1d447a0f (patch) | |
tree | 89e6a297c8f7f8cd3619fbb93781a2559760a3df /src | |
parent | 55cef974a5dad3fda1922648fa27bcf5bb32ea03 (diff) |
uxa: fix leakage of FB when closing the screen
Calling drmModeRmFB is only allowed in DRM master mode. Since leaving
the VT also drops master mode we need to remove the FB before calling
I830LeaveVT.
This is only a real leak in case of a server reset, otherwise the server
process will exit anyway and the kernel will clean up the FB.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel_driver.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel_driver.c b/src/intel_driver.c index 218b583d..1b2c6167 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -1136,10 +1136,6 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) I830UeventFini(scrn); #endif - if (scrn->vtSema == TRUE) { - I830LeaveVT(VT_FUNC_ARGS(0)); - } - DeleteCallback(&FlushCallback, intel_flush_callback, scrn); intel_glamor_close_screen(screen); @@ -1169,6 +1165,10 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) intel->front_buffer = NULL; } + if (scrn->vtSema == TRUE) { + I830LeaveVT(VT_FUNC_ARGS(0)); + } + intel_batch_teardown(scrn); if (INTEL_INFO(intel)->gen >= 40) |