import xorg-x11-drv-ati-19.0.1-2.el8

This commit is contained in:
CentOS Sources 2020-01-21 14:13:31 -05:00 committed by Stepan Oksanichenko
parent 91be35da00
commit 0780f7b216
3 changed files with 52 additions and 36 deletions

View File

@ -1,34 +0,0 @@
From 779bafa175e6b47da086d84324f95cedd4dc487c Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
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 <ofourdan@redhat.com>
---
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

View File

@ -0,0 +1,47 @@
From 2cbbd8648cdd27db8076565943b932ef81337053 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
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 <alexander.deucher@amd.com>
---
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

View File

@ -13,7 +13,7 @@
Summary: Xorg X11 ati video driver
Name: xorg-x11-drv-ati
Version: 19.0.1
Release: 1%{?gver}%{?dist}
Release: 2%{?gver}%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@ -21,7 +21,7 @@ Group: User Interface/X Hardware Support
Source0: https://www.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
#Source0: %{tarball}-%{gitdate}.tar.xz
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
@ -62,6 +62,9 @@ find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f --
%{_datadir}/X11/xorg.conf.d/10-radeon.conf
%changelog
* Tue Nov 12 2019 Olivier Fourdan <ofourdan@redhat.com> - 19.0.1-2
- Fix a regression with user-switching (#1757864)
* Wed Jun 12 2019 Olivier Fourdan <ofourdan@redhat.com> - 19.0.1-1
- ati 19.0.1 (#1719310)