import xorg-x11-server-1.20.6-2.el8

This commit is contained in:
CentOS Sources 2020-01-21 16:01:53 -05:00 committed by Stepan Oksanichenko
parent e3c3c44e66
commit 8886b21e71
10 changed files with 254 additions and 231 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/xorg-server-1.20.3.tar.bz2
SOURCES/xorg-server-1.20.6.tar.bz2

View File

@ -1 +1 @@
a522cd543606b4d0509d821b8061904951171c50 SOURCES/xorg-server-1.20.3.tar.bz2
59473e72136113f3a35b1ab5a5cfcbcad955b660 SOURCES/xorg-server-1.20.6.tar.bz2

View File

@ -1,222 +0,0 @@
From 14e029d1e0d3b1b9e1981bcca84ecf765e4ed738 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 16 Nov 2018 14:36:55 -0500
Subject: [PATCH xserver] dix: ensure work queues are cleared on reset
If the server resets, most client workqueues are cleaned up as the
clients are killed.
The one exception is the server's client, which is exempt from
the killing spree.
If that client has a queued work procedure active, it won't get
cleared on reset.
This commit ensures it gets cleared too.
---
dix/dixutils.c | 13 +++++++++++++
dix/main.c | 2 ++
include/dix.h | 2 ++
3 files changed, 17 insertions(+)
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 540023cbd..a4e27fe27 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -480,60 +480,73 @@ RemoveBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler,
if (inHandler) {
handlerDeleted = TRUE;
handlers[i].deleted = TRUE;
}
else {
for (; i < numHandlers - 1; i++)
handlers[i] = handlers[i + 1];
numHandlers--;
}
break;
}
}
void
InitBlockAndWakeupHandlers(void)
{
free(handlers);
handlers = (BlockHandlerPtr) 0;
numHandlers = 0;
sizeHandlers = 0;
}
/*
* A general work queue. Perform some task before the server
* sleeps for input.
*/
WorkQueuePtr workQueue;
static WorkQueuePtr *workQueueLast = &workQueue;
+void
+ClearWorkQueue(void)
+{
+ WorkQueuePtr q, *p;
+
+ p = &workQueue;
+ while ((q = *p)) {
+ *p = q->next;
+ free(q);
+ }
+ workQueueLast = p;
+}
+
void
ProcessWorkQueue(void)
{
WorkQueuePtr q, *p;
p = &workQueue;
/*
* Scan the work queue once, calling each function. Those
* which return TRUE are removed from the queue, otherwise
* they will be called again. This must be reentrant with
* QueueWorkProc.
*/
while ((q = *p)) {
if ((*q->function) (q->client, q->closure)) {
/* remove q from the list */
*p = q->next; /* don't fetch until after func called */
free(q);
}
else {
p = &q->next; /* don't fetch until after func called */
}
}
workQueueLast = p;
}
void
ProcessWorkQueueZombies(void)
{
WorkQueuePtr q, *p;
diff --git a/dix/main.c b/dix/main.c
index f98643aa5..b228d9c28 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -315,46 +315,48 @@ dix_main(int argc, char *argv[], char *envp[])
dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
free(pScreen);
screenInfo.numGPUScreens = i;
}
for (i = screenInfo.numScreens - 1; i >= 0; i--) {
FreeScratchPixmapsForScreen(screenInfo.screens[i]);
FreeGCperDepth(i);
FreeDefaultStipple(i);
dixFreeScreenSpecificPrivates(screenInfo.screens[i]);
(*screenInfo.screens[i]->CloseScreen) (screenInfo.screens[i]);
dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN);
free(screenInfo.screens[i]);
screenInfo.numScreens = i;
}
ReleaseClientIds(serverClient);
dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT);
serverClient->devPrivates = NULL;
dixFreeRegistry();
FreeFonts();
FreeAllAtoms();
FreeAuditTimer();
DeleteCallbackManager();
+ ClearWorkQueue();
+
if (dispatchException & DE_TERMINATE) {
CloseWellKnownConnections();
}
OsCleanup((dispatchException & DE_TERMINATE) != 0);
if (dispatchException & DE_TERMINATE) {
ddxGiveUp(EXIT_NO_ERROR);
break;
}
free(ConnectionInfo);
ConnectionInfo = NULL;
}
return 0;
}
diff --git a/include/dix.h b/include/dix.h
index 476559842..b6e2bcfde 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -213,60 +213,62 @@ extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ ,
Bool /*map */ );
extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ );
extern _X_EXPORT void BlockHandler(void *timeout);
extern _X_EXPORT void WakeupHandler(int result);
void
EnableLimitedSchedulingLatency(void);
void
DisableLimitedSchedulingLatency(void);
typedef void (*ServerBlockHandlerProcPtr) (void *blockData,
void *timeout);
typedef void (*ServerWakeupHandlerProcPtr) (void *blockData,
int result);
extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler,
ServerWakeupHandlerProcPtr wakeupHandler,
void *blockData);
extern _X_EXPORT void RemoveBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler,
ServerWakeupHandlerProcPtr wakeupHandler,
void *blockData);
extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
+extern _X_EXPORT void ClearWorkQueue(void);
+
extern _X_EXPORT void ProcessWorkQueue(void);
extern _X_EXPORT void ProcessWorkQueueZombies(void);
extern _X_EXPORT Bool QueueWorkProc(Bool (*function)(ClientPtr clientUnused,
void *closure),
ClientPtr client,
void *closure);
typedef Bool (*ClientSleepProcPtr) (ClientPtr client,
void *closure);
extern _X_EXPORT Bool ClientSleep(ClientPtr client,
ClientSleepProcPtr function,
void *closure);
#ifndef ___CLIENTSIGNAL_DEFINED___
#define ___CLIENTSIGNAL_DEFINED___
extern _X_EXPORT Bool ClientSignal(ClientPtr /*client */ );
#endif /* ___CLIENTSIGNAL_DEFINED___ */
#ifndef ___CLIENTSIGNALALL_DEFINED___
#define ___CLIENTSIGNALALL_DEFINED___
#define CLIENT_SIGNAL_ANY ((void *)-1)
extern _X_EXPORT int ClientSignalAll(ClientPtr /*client*/,
ClientSleepProcPtr /*function*/,
void * /*closure*/);
#endif /* ___CLIENTSIGNALALL_DEFINED___ */
extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
--
2.17.1

View File

@ -0,0 +1,45 @@
From b6e18eb57f3dd104704d0a5ec3d2f051645b9068 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 19 Jun 2019 14:23:56 -0400
Subject: [PATCH xserver] linux: Fix platform device PCI detection for complex
bus topologies
Suppose you're in a Hyper-V guest and are trying to use PCI passthrough.
The ID_PATH that udev will construct for that looks something like
"acpi-VMBUS:00-pci-b8c8:00:00.0", and obviously looking for "pci-" in
the first four characters of that is going to not work.
Instead, strstr. I suppose it's possible you could have _multiple_ PCI
buses in the path, in which case you'd want strrstr, if that were a
thing.
---
config/udev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/config/udev.c b/config/udev.c
index 314acba6ce..6e11aa3b88 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -474,7 +474,7 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path
config_odev_probe_proc_ptr probe_callback)
{
struct OdevAttributes *attribs = config_odev_allocate_attributes();
- const char *value;
+ const char *value, *str;
attribs->path = XNFstrdup(path);
attribs->syspath = XNFstrdup(syspath);
@@ -482,8 +482,8 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path
attribs->minor = minor;
value = udev_device_get_property_value(udev_device, "ID_PATH");
- if (value && !strncmp(value, "pci-", 4)) {
- attribs->busid = XNFstrdup(value);
+ if (value && (str = strstr(value, "pci-"))) {
+ attribs->busid = XNFstrdup(str);
attribs->busid[3] = ':';
}
--
2.21.0

View File

@ -0,0 +1,59 @@
From 58d357db299116657b468db9565c0e431bb7ea29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
Date: Tue, 26 Nov 2019 17:14:46 +0100
Subject: [PATCH xserver 1/3] modesetting: Call glamor_finish from
drmmode_crtc_set_mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This makes sure any pending drawing to a new scanout buffer will be
visible from the start.
This makes the finish call in drmmode_copy_fb superfluous, so remove it.
Reviewed-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit c66c548eabf06835cb0cb906598fb87c7bb30cf4)
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 336f7686e..8786d13a3 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -754,6 +754,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
+ ScreenPtr screen = crtc->scrn->pScreen;
drmModeModeInfo kmode;
int output_count = 0;
uint32_t *output_ids = NULL;
@@ -764,6 +765,12 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y))
return 1;
+#ifdef GLAMOR_HAS_GBM
+ /* Make sure any pending drawing will be visible in a new scanout buffer */
+ if (drmmode->glamor)
+ glamor_finish(screen);
+#endif
+
if (ms->atomic_modeset) {
drmModeAtomicReq *req = drmModeAtomicAlloc();
Bool active;
@@ -1452,8 +1459,6 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
FreeScratchGC(gc);
- glamor_finish(pScreen);
-
pScreen->canDoBGNoneRoot = TRUE;
if (drmmode->fbcon_pixmap)
--
2.24.0

View File

@ -0,0 +1,28 @@
From efb4bc5b3da511d128144840d7eb3cf3c7cfa0ae Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 3 Sep 2019 12:10:37 -0400
Subject: [PATCH] mustard: Add DRI2 fallback driver mappings for i965 and
radeonsi
---
hw/xfree86/dri2/pci_ids/pci_id_driver_map.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
index 689a570..3825f52 100644
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
@@ -45,8 +45,10 @@ static const struct {
int num_chips_ids;
} driver_map[] = {
{ 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
+ { 0x8086, "i965", "va_gl", NULL, -1 },
{ 0x1002, "r600","r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
{ 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) },
+ { 0x1002, "radeonsi", "radeonsi", NULL, -1 },
{ 0x10de, "nouveau", "nouveau", NULL, -1 },
{ 0x1af4, "virtio_gpu", "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) },
{ 0x15ad, "vmwgfx", "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },
--
2.23.0

View File

@ -24,7 +24,7 @@ index 8158c2b62..78d1c947d 100644
@@ -1190,6 +1191,25 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
int idx = 0;
#ifdef __linux__
#if defined(__linux__) || defined(__NetBSD__)
+ char busid[32];
+ int fd;
+

View File

@ -0,0 +1,37 @@
From 532f1618a0600e8601fd42f40eb628e4794300b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
Date: Tue, 26 Nov 2019 17:16:37 +0100
Subject: [PATCH xserver 2/3] xfree86/modes: Call xf86RotateRedisplay from
xf86CrtcRotate
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If a new rotate buffer was allocated. This makes sure the new buffer
has valid transformed contents when it starts being displayed.
Reviewed-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit 327df450ffcf5bda5b4254db0208d355860d1010)
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
---
hw/xfree86/modes/xf86Rotate.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index a8f1e615c..05944cfcb 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -485,6 +485,9 @@ xf86CrtcRotate(xf86CrtcPtr crtc)
if (damage)
xf86CrtcDamageShadow(crtc);
+ else if (crtc->rotatedData && !crtc->rotatedPixmap)
+ /* Make sure the new rotate buffer has valid transformed contents */
+ xf86RotateRedisplay(pScreen);
/* All done */
return TRUE;
--
2.24.0

View File

@ -0,0 +1,55 @@
From 5489029ff6508b37d71d47d905d744c436a49563 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
Date: Tue, 26 Nov 2019 17:17:12 +0100
Subject: [PATCH xserver 3/3] modesetting: Clear new screen pixmap storage on
RandR resize
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes random garbage being visible intermittently.
Reviewed-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit 9ba13bac9dd076f166ff0d063fc144b904a40d12)
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 8786d13a3..eca058258 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1795,6 +1795,19 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
&drmmode_crtc->prime_pixmap);
}
+static void
+drmmode_clear_pixmap(PixmapPtr pixmap)
+{
+ ScreenPtr screen = pixmap->drawable.pScreen;
+ GCPtr gc;
+
+ gc = GetScratchGC(pixmap->drawable.depth, screen);
+ if (gc) {
+ miClearDrawable(&pixmap->drawable, gc);
+ FreeScratchGC(gc);
+ }
+}
+
static void *
drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
{
@@ -3179,6 +3192,8 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (!drmmode_glamor_handle_new_screen_pixmap(drmmode))
goto fail;
+ drmmode_clear_pixmap(ppix);
+
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
--
2.24.0

View File

@ -45,8 +45,8 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.20.3
Release: 5.2%{?gitdate:.%{gitdate}}%{?dist}
Version: 1.20.6
Release: 2%{?gitdate:.%{gitdate}}%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@ -91,6 +91,7 @@ Patch6: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
# RHEL mustard
Patch10: 0001-mustard-Don-t-probe-for-drivers-not-shipped-in-RHEL8.patch
Patch11: 0001-mustard-Add-DRI2-fallback-driver-mappings-for-i965-a.patch
#Patch11: 0001-Enable-PAM-support.patch
Patch12: 0001-link-with-z-now.patch
Patch13: 0001-modesetting-Hide-atomic-behind-Option-Atomic-boolean.patch
@ -101,13 +102,17 @@ Patch17: 0001-xwayland-Disable-Present-support.patch
Patch18: 0001-mustard-Work-around-broken-fbdev-headers.patch
# fix to be upstreamed
Patch20: 0001-dix-ensure-work-queues-are-cleared-on-reset.patch
Patch100: 0001-linux-Make-platform-device-probe-less-fragile.patch
Patch102: 0001-xfree86-ensure-the-readlink-buffer-is-null-terminate.patch
# fix already upstream
Patch200: 0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch
Patch201: 0001-linux-Fix-platform-device-PCI-detection-for-complex-.patch
# 1738670 - Graphical artifacts when modesetting
Patch300: 0001-modesetting-Call-glamor_finish-from-drmmode_crtc_set.patch
Patch301: 0002-xfree86-modes-Call-xf86RotateRedisplay-from-xf86Crtc.patch
Patch302: 0003-modesetting-Clear-new-screen-pixmap-storage-on-RandR.patch
BuildRequires: systemtap-sdt-devel
BuildRequires: git
@ -551,10 +556,26 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
%changelog
* Wed Apr 10 2019 Adam Jackson <ajax@redhat.com> - 1.20.3-5.2
* Wed Dec 11 2019 Michel Dänzer <mdaenzer@redhat.com> - 1.20.6-2
- Add fixes for intermittent modesetting artifacts
Resolves: #1738670
* Mon Dec 9 2019 Olivier Fourdan <ofourdan@redhat.com> - 1.20.6-1
- xserver 1.20.6
* Tue Sep 03 2019 Adam Jackson <ajax@redhat.com> - 1.20.3-11
- Add DRI2 fallback driver mappings for i965 and radeonsi
* Mon Aug 19 2019 Adam Jackson <ajax@redhat.com> - 1.20.3-10
- Backport glvnd vendor selection for prime render offloading
* Fri Jul 12 2019 Adam Jackson <ajax@redhat.com> - 1.20.3-8
- Fix platform device PCI detection for complex bus topologies
* Wed Apr 10 2019 Adam Jackson <ajax@redhat.com> - 1.20.3-7
- Don't require fbdev on s390x, where it doesn't exist
* Wed Apr 03 2019 Adam Jackson <ajax@redhat.com> - 1.20.3-5.1
* Wed Apr 03 2019 Adam Jackson <ajax@redhat.com> - 1.20.3-6
- Add Requires: fbdev (and on x86_64, vesa) to Xorg subpackage
* Mon Jan 14 2019 Ben Crocker <bcrocker@redhat.com> - 1.20.3-5