xf86-video-amdgpu: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Sep 20 16:03:25 UTC 2019
src/amdgpu_kms.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 5b8bc9fc505c551dcd9b0ed5ab835a49fa4f9fda
Author: Michel Dänzer <mdaenzer at redhat.com>
Date: Wed Sep 18 12:55:45 2019 +0200
Don't set up black scanout buffer if LeaveVT is called from CloseScreen
Avoids a crash described in
https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/43#note_223718
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 3280972..6263bd7 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -2267,6 +2267,12 @@ void AMDGPULeaveVT_KMS(ScrnInfoPtr pScrn)
unsigned w = 0, h = 0;
int i;
+ /* If we're called from CloseScreen, trying to clear the black
+ * scanout BO will likely crash and burn
+ */
+ if (!pScreen->GCperDepth[0])
+ goto hide_cursors;
+
/* Compute maximum scanout dimensions of active CRTCs */
for (i = 0; i < xf86_config->num_crtc; i++) {
crtc = xf86_config->crtc[i];
@@ -2339,8 +2345,10 @@ void AMDGPULeaveVT_KMS(ScrnInfoPtr pScrn)
info->pixel_bytes * pScrn->virtualY);
}
- TimerSet(NULL, 0, 1000, cleanup_black_fb, pScreen);
+ if (pScreen->GCperDepth[0])
+ TimerSet(NULL, 0, 1000, cleanup_black_fb, pScreen);
+ hide_cursors:
xf86_hide_cursors(pScrn);
amdgpu_drop_drm_master(pScrn);
More information about the xorg-commit
mailing list