diff --git a/SOURCES/0001-Avoid-RADEONLeaveVT_KMS-after-we-left-the-VT.patch b/SOURCES/0001-Avoid-RADEONLeaveVT_KMS-after-we-left-the-VT.patch deleted file mode 100644 index 56ed0a5..0000000 --- a/SOURCES/0001-Avoid-RADEONLeaveVT_KMS-after-we-left-the-VT.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 779bafa175e6b47da086d84324f95cedd4dc487c Mon Sep 17 00:00:00 2001 -From: Olivier Fourdan -Date: Thu, 23 May 2019 16:26:15 +0200 -Subject: [PATCH] Avoid RADEONLeaveVT_KMS() after we left the VT - -RADEONLeaveVT_KMS() will un-reference its all-black FB in a timer, but -if we end calling RADEONLeaveVT_KMS() twice in a row, we may try to -access those after they've been just freed up, and crash. - -Return early in RADEONLeaveVT_KMS() if the VT semaphore is unset. - -Bugzilla: https://bugzilla.redhat.com/1674474 -Signed-off-by: Olivier Fourdan ---- - src/radeon_kms.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/radeon_kms.c b/src/radeon_kms.c -index ff4f8dcf..0d4d2ef4 100644 ---- a/src/radeon_kms.c -+++ b/src/radeon_kms.c -@@ -2624,6 +2624,9 @@ void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn) - xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, - "RADEONLeaveVT_KMS\n"); - -+ if (xf86ScreenToScrn(pScreen)->vtSema) -+ return; -+ - if (!info->r600_shadow_fb) { - RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); --- -2.21.0 - diff --git a/SOURCES/0001-Don-t-set-up-black-scanout-buffer-if-LeaveVT-is-call.patch b/SOURCES/0001-Don-t-set-up-black-scanout-buffer-if-LeaveVT-is-call.patch new file mode 100644 index 0000000..61676e8 --- /dev/null +++ b/SOURCES/0001-Don-t-set-up-black-scanout-buffer-if-LeaveVT-is-call.patch @@ -0,0 +1,47 @@ +From 2cbbd8648cdd27db8076565943b932ef81337053 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= +Date: Fri, 20 Sep 2019 18:47:02 +0200 +Subject: [PATCH xf86-video-ati] 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 + +(Ported from amdgpu commit 5b8bc9fc505c551dcd9b0ed5ab835a49fa4f9fda) +Reviewed-by: Alex Deucher +--- + src/radeon_kms.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/radeon_kms.c b/src/radeon_kms.c +index 777fc14e..107c1ce7 100644 +--- a/src/radeon_kms.c ++++ b/src/radeon_kms.c +@@ -2629,6 +2629,12 @@ void RADEONLeaveVT_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]; +@@ -2701,8 +2707,10 @@ void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn) + pScrn->displayWidth * 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); + + radeon_drop_drm_master(pScrn); +-- +2.21.0 + diff --git a/SPECS/xorg-x11-drv-ati.spec b/SPECS/xorg-x11-drv-ati.spec index 9c06937..5b567d9 100644 --- a/SPECS/xorg-x11-drv-ati.spec +++ b/SPECS/xorg-x11-drv-ati.spec @@ -13,7 +13,7 @@ Summary: Xorg X11 ati video driver Name: xorg-x11-drv-ati Version: 19.0.1 -Release: 2%{?gver}%{?dist} +Release: 3%{?gver}%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -24,7 +24,7 @@ Source0: https://www.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz Patch1: fix-dri-removal.patch Patch10: radeon-6.12.2-lvds-default-modes.patch Patch13: fix-default-modes.patch -Patch14: 0001-Avoid-RADEONLeaveVT_KMS-after-we-left-the-VT.patch +Patch14: 0001-Don-t-set-up-black-scanout-buffer-if-LeaveVT-is-call.patch ExcludeArch: s390 s390x @@ -77,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT%{moduledir}/multimedia/ %{_mandir}/man4/radeon.4* %changelog +* Thu Oct 10 2019 Olivier Fourdan - 19.0.1-3 +- Fix a regression with user-switching (#1755938) + * Thu May 23 2019 Olivier Fourdan - 19.0.1-2 - Avoid breakage on Xserver reset (#1674474)