summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-06-27 18:13:05 +0900
committerMichel Dänzer <michel.daenzer@amd.com>2017-06-27 18:13:05 +0900
commite90721ba654d70db5eeb1cf552308c73151530ee (patch)
tree3289d7b191a0ef5f1f801dbe1e1ad9ee9e7c5685
parent1b6ff5fd9933c00ec1ec90dfc62e0b531927749b (diff)
Only call drmmode_scanout_free for non-GPU screens in LeaveVT
Destroying the scanout buffers of GPU screens resulted in a crash when switching back to the Xorg VT. Fixes: b10ecdbd89b0 ("Use drmmode_crtc_scanout_* helpers for RandR 1.4 scanout pixmaps") (Ported from radeon commit c9dd28cb0c9c3de676eadac61e727732510f6b9b) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/amdgpu_kms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 143294a..b625250 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1975,7 +1975,8 @@ void AMDGPULeaveVT_KMS(VT_FUNC_ARGS_DECL)
amdgpu_drop_drm_master(pScrn);
xf86RotateFreeShadow(pScrn);
- drmmode_scanout_free(pScrn);
+ if (!pScrn->is_gpu)
+ drmmode_scanout_free(pScrn);
xf86_hide_cursors(pScrn);