Update to 1.19.0-rc2
- Fix (hopefully) various crashes in FlushAllOutput() (rhbz#1382444) - Fix Xwayland crashing in glamor on non glamor capable hw (rhbz#1390018)
This commit is contained in:
parent
0af4a5b7d3
commit
7084842c1c
@ -1,50 +0,0 @@
|
||||
From 8c99f657824e483c59745cc4c0c93240ad9fe24a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
|
||||
Date: Mon, 17 Oct 2016 18:48:44 +0900
|
||||
Subject: [PATCH xserver v2 1/7] DRI2: Sync radeonsi_pci_ids.h from Mesa
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes DRI2 client driver name mapping for newer AMD GPUs with the
|
||||
modesetting driver, allowing the DRI2 extension to initialize.
|
||||
|
||||
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
||||
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h b/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
|
||||
index 4df8e9d..20c1583 100644
|
||||
--- a/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
|
||||
+++ b/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
|
||||
@@ -184,12 +184,24 @@ CHIPSET(0x7300, FIJI_, FIJI)
|
||||
|
||||
CHIPSET(0x67E0, POLARIS11_, POLARIS11)
|
||||
CHIPSET(0x67E1, POLARIS11_, POLARIS11)
|
||||
+CHIPSET(0x67E3, POLARIS11_, POLARIS11)
|
||||
+CHIPSET(0x67E7, POLARIS11_, POLARIS11)
|
||||
CHIPSET(0x67E8, POLARIS11_, POLARIS11)
|
||||
CHIPSET(0x67E9, POLARIS11_, POLARIS11)
|
||||
CHIPSET(0x67EB, POLARIS11_, POLARIS11)
|
||||
+CHIPSET(0x67EF, POLARIS11_, POLARIS11)
|
||||
CHIPSET(0x67FF, POLARIS11_, POLARIS11)
|
||||
|
||||
CHIPSET(0x67C0, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67C1, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67C2, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67C4, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67C7, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67C8, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67C9, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67CA, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67CC, POLARIS10_, POLARIS10)
|
||||
+CHIPSET(0x67CF, POLARIS10_, POLARIS10)
|
||||
CHIPSET(0x67DF, POLARIS10_, POLARIS10)
|
||||
|
||||
CHIPSET(0x98E4, STONEY_, STONEY)
|
||||
--
|
||||
2.9.3
|
||||
|
54
0001-xwayland-shm-block-signals-during-fallocate.patch
Normal file
54
0001-xwayland-shm-block-signals-during-fallocate.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 4cfee398726adf89db4b632ade7d6cab8b78282e Mon Sep 17 00:00:00 2001
|
||||
From: Ian Ray <ian.ray@ge.com>
|
||||
Date: Wed, 25 May 2016 10:41:53 +0300
|
||||
Subject: [PATCH xserver v2 1/7] xwayland-shm: block signals during fallocate
|
||||
|
||||
posix_fallocate() does an explicit rollback if it gets EINTR, and
|
||||
this is a problem on slow systems because when the allocation size
|
||||
is sufficiently large posix_fallocate() will always be interrupted
|
||||
by the smart scheduler's SIGALRM.
|
||||
|
||||
Changes since v1 - big comment in the code to explain what is going on
|
||||
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Signed-off-by: Ian Ray <ian.ray@ge.com>
|
||||
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
|
||||
Acked-by: Daniel Stone <daniels@collabora.com>
|
||||
---
|
||||
hw/xwayland/xwayland-shm.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/hw/xwayland/xwayland-shm.c b/hw/xwayland/xwayland-shm.c
|
||||
index daf6148..452d1f5 100644
|
||||
--- a/hw/xwayland/xwayland-shm.c
|
||||
+++ b/hw/xwayland/xwayland-shm.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
+#include "os.h"
|
||||
+
|
||||
#include "xwayland.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
@@ -139,9 +141,17 @@ os_create_anonymous_file(off_t size)
|
||||
return -1;
|
||||
|
||||
#ifdef HAVE_POSIX_FALLOCATE
|
||||
+ /*
|
||||
+ * posix_fallocate does an explicit rollback if it gets EINTR.
|
||||
+ * Temporarily block signals to allow the call to succeed on
|
||||
+ * slow systems where the smart scheduler's SIGALRM prevents
|
||||
+ * large allocation attempts from ever succeeding.
|
||||
+ */
|
||||
+ OsBlockSignals();
|
||||
do {
|
||||
ret = posix_fallocate(fd, 0, size);
|
||||
} while (ret == EINTR);
|
||||
+ OsReleaseSignals();
|
||||
|
||||
if (ret != 0) {
|
||||
close(fd);
|
||||
--
|
||||
2.9.3
|
||||
|
88
0002-dri2-Sync-i965_pci_ids.h-from-mesa.patch
Normal file
88
0002-dri2-Sync-i965_pci_ids.h-from-mesa.patch
Normal file
@ -0,0 +1,88 @@
|
||||
From 7513da40a656317ad3aa101651d29373de99c798 Mon Sep 17 00:00:00 2001
|
||||
From: Timo Aaltonen <tjaalton@ubuntu.com>
|
||||
Date: Wed, 2 Nov 2016 17:18:11 +0200
|
||||
Subject: [PATCH xserver v2 2/7] dri2: Sync i965_pci_ids.h from mesa
|
||||
|
||||
Import changes from these mesa commits:
|
||||
85ea8deb26da420 i965: Removing PCI IDs that are no longer listed as Kabylake.
|
||||
bdff2e554735ed9 i956: Add more Kabylake PCI IDs.
|
||||
f1fa8b4a1ca73fa i965/bxt: Add 2x6 variant
|
||||
d1ab544bb883d04 i965/chv: Display proper branding
|
||||
20e8ee36627f874 i965/skl: Update Skylake renderer strings
|
||||
644c8a515192d28 i965/skl: Add two missing device IDs
|
||||
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Signed-off-by: Timo Aaltonen <tjaalton@ubuntu.com>
|
||||
---
|
||||
hw/xfree86/dri2/pci_ids/i965_pci_ids.h | 32 +++++++++++++++++---------------
|
||||
1 file changed, 17 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
|
||||
index 5139e27..1566afd 100644
|
||||
--- a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
|
||||
+++ b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
|
||||
@@ -112,6 +112,7 @@ CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3")
|
||||
CHIPSET(0x1902, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
|
||||
CHIPSET(0x1906, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
|
||||
CHIPSET(0x190A, skl_gt1, "Intel(R) Skylake GT1")
|
||||
+CHIPSET(0x190B, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
|
||||
CHIPSET(0x190E, skl_gt1, "Intel(R) Skylake GT1")
|
||||
CHIPSET(0x1912, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)")
|
||||
CHIPSET(0x1913, skl_gt2, "Intel(R) Skylake GT2f")
|
||||
@@ -122,19 +123,21 @@ CHIPSET(0x191A, skl_gt2, "Intel(R) Skylake GT2")
|
||||
CHIPSET(0x191B, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)")
|
||||
CHIPSET(0x191D, skl_gt2, "Intel(R) HD Graphics P530 (Skylake GT2)")
|
||||
CHIPSET(0x191E, skl_gt2, "Intel(R) HD Graphics 515 (Skylake GT2)")
|
||||
-CHIPSET(0x1921, skl_gt2, "Intel(R) Skylake GT2")
|
||||
-CHIPSET(0x1923, skl_gt3, "Intel(R) Iris Graphics 540 (Skylake GT3e)")
|
||||
-CHIPSET(0x1926, skl_gt3, "Intel(R) HD Graphics 535 (Skylake GT3)")
|
||||
+CHIPSET(0x1921, skl_gt2, "Intel(R) HD Graphics 520 (Skylake GT2)")
|
||||
+CHIPSET(0x1923, skl_gt3, "Intel(R) Skylake GT3e")
|
||||
+CHIPSET(0x1926, skl_gt3, "Intel(R) Iris Graphics 540 (Skylake GT3e)")
|
||||
CHIPSET(0x1927, skl_gt3, "Intel(R) Iris Graphics 550 (Skylake GT3e)")
|
||||
CHIPSET(0x192A, skl_gt4, "Intel(R) Skylake GT4")
|
||||
-CHIPSET(0x192B, skl_gt3, "Intel(R) Iris Graphics (Skylake GT3fe)")
|
||||
-CHIPSET(0x1932, skl_gt4, "Intel(R) Skylake GT4")
|
||||
-CHIPSET(0x193A, skl_gt4, "Intel(R) Skylake GT4")
|
||||
-CHIPSET(0x193B, skl_gt4, "Intel(R) Skylake GT4")
|
||||
-CHIPSET(0x193D, skl_gt4, "Intel(R) Skylake GT4")
|
||||
+CHIPSET(0x192B, skl_gt3, "Intel(R) Iris Graphics 555 (Skylake GT3e)")
|
||||
+CHIPSET(0x192D, skl_gt3, "Intel(R) Iris Graphics P555 (Skylake GT3e)")
|
||||
+CHIPSET(0x1932, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)")
|
||||
+CHIPSET(0x193A, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)")
|
||||
+CHIPSET(0x193B, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)")
|
||||
+CHIPSET(0x193D, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)")
|
||||
CHIPSET(0x5902, kbl_gt1, "Intel(R) Kabylake GT1")
|
||||
CHIPSET(0x5906, kbl_gt1, "Intel(R) Kabylake GT1")
|
||||
CHIPSET(0x590A, kbl_gt1, "Intel(R) Kabylake GT1")
|
||||
+CHIPSET(0x5908, kbl_gt1, "Intel(R) Kabylake GT1")
|
||||
CHIPSET(0x590B, kbl_gt1, "Intel(R) Kabylake GT1")
|
||||
CHIPSET(0x590E, kbl_gt1, "Intel(R) Kabylake GT1")
|
||||
CHIPSET(0x5913, kbl_gt1_5, "Intel(R) Kabylake GT1.5")
|
||||
@@ -147,17 +150,16 @@ CHIPSET(0x591B, kbl_gt2, "Intel(R) Kabylake GT2")
|
||||
CHIPSET(0x591D, kbl_gt2, "Intel(R) Kabylake GT2")
|
||||
CHIPSET(0x591E, kbl_gt2, "Intel(R) Kabylake GT2")
|
||||
CHIPSET(0x5921, kbl_gt2, "Intel(R) Kabylake GT2F")
|
||||
+CHIPSET(0x5923, kbl_gt3, "Intel(R) Kabylake GT3")
|
||||
CHIPSET(0x5926, kbl_gt3, "Intel(R) Kabylake GT3")
|
||||
-CHIPSET(0x592A, kbl_gt3, "Intel(R) Kabylake GT3")
|
||||
-CHIPSET(0x592B, kbl_gt3, "Intel(R) Kabylake GT3")
|
||||
-CHIPSET(0x5932, kbl_gt4, "Intel(R) Kabylake GT4")
|
||||
-CHIPSET(0x593A, kbl_gt4, "Intel(R) Kabylake GT4")
|
||||
+CHIPSET(0x5927, kbl_gt3, "Intel(R) Kabylake GT3")
|
||||
CHIPSET(0x593B, kbl_gt4, "Intel(R) Kabylake GT4")
|
||||
-CHIPSET(0x593D, kbl_gt4, "Intel(R) Kabylake GT4")
|
||||
-CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherryview)")
|
||||
-CHIPSET(0x22B1, chv, "Intel(R) HD Graphics (Cherryview)")
|
||||
+CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherrytrail)")
|
||||
+CHIPSET(0x22B1, chv, "Intel(R) HD Graphics XXX (Braswell)") /* Overridden in brw_get_renderer_string */
|
||||
CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)")
|
||||
CHIPSET(0x22B3, chv, "Intel(R) HD Graphics (Cherryview)")
|
||||
CHIPSET(0x0A84, bxt, "Intel(R) HD Graphics (Broxton)")
|
||||
CHIPSET(0x1A84, bxt, "Intel(R) HD Graphics (Broxton)")
|
||||
+CHIPSET(0x1A85, bxt_2x6, "Intel(R) HD Graphics (Broxton 2x6)")
|
||||
CHIPSET(0x5A84, bxt, "Intel(R) HD Graphics (Broxton)")
|
||||
+CHIPSET(0x5A85, bxt_2x6, "Intel(R) HD Graphics (Broxton 2x6)")
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 227734be9cbd9934e51a345ccb6b28524c784584 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 18 Oct 2016 16:10:19 +0200
|
||||
Subject: [PATCH xserver v2 2/7] xfree86: Xorg.wrap: Do not require root rights
|
||||
for cards with 0 outputs
|
||||
|
||||
Prior to this commit the Xorg.wrap code to detect if root rights
|
||||
are necessary checked for DRM_IOCTL_MODE_GETRESOURCES succeeding *and*
|
||||
reporting more then 0 output connectors.
|
||||
|
||||
DRM_IOCTL_MODE_GETRESOURCES succeeding alone is enough to differentiate
|
||||
between old drm only cards (which need ums and thus root) and kms capable
|
||||
cards.
|
||||
|
||||
Some hybrid gfx laptops have 0 output connectors on one of their 2 GPUs,
|
||||
resulting in Xorg needlessly running as root. This commits removes the
|
||||
res.count_connectors > 0 check, fixing this.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
---
|
||||
hw/xfree86/xorg-wrapper.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
|
||||
index d930962..a25e6ff 100644
|
||||
--- a/hw/xfree86/xorg-wrapper.c
|
||||
+++ b/hw/xfree86/xorg-wrapper.c
|
||||
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
memset(&res, 0, sizeof(struct drm_mode_card_res));
|
||||
r = ioctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res);
|
||||
- if (r == 0 && res.count_connectors > 0)
|
||||
+ if (r == 0)
|
||||
kms_cards++;
|
||||
|
||||
close(fd);
|
||||
--
|
||||
2.9.3
|
||||
|
@ -0,0 +1,60 @@
|
||||
From 717cfd417b7b4be50d73c684b028a20ddcbb568e Mon Sep 17 00:00:00 2001
|
||||
From: Keith Packard <keithp@keithp.com>
|
||||
Date: Wed, 2 Nov 2016 13:39:50 -0700
|
||||
Subject: [PATCH xserver v2 3/7] dix: Make sure client is not in output_pending
|
||||
chain after closed (RH 1382444)
|
||||
|
||||
I think it is possible that output could get queued to a client during
|
||||
CloseDownClient. After it is removed from the pending queue, active
|
||||
grabs are released, the client is awoken if sleeping and any work
|
||||
queue entries related to the client are processed.
|
||||
|
||||
To fix this, move the call removing it from the output_pending chain
|
||||
until after clientGone has been set and then check clientGone in
|
||||
output_pending_mark.
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1382444
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
dix/dispatch.c | 2 +-
|
||||
include/dixstruct.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dix/dispatch.c b/dix/dispatch.c
|
||||
index e111377..3d0fe26 100644
|
||||
--- a/dix/dispatch.c
|
||||
+++ b/dix/dispatch.c
|
||||
@@ -3406,7 +3406,6 @@ CloseDownClient(ClientPtr client)
|
||||
UngrabServer(client);
|
||||
}
|
||||
mark_client_not_ready(client);
|
||||
- xorg_list_del(&client->output_pending);
|
||||
BITCLEAR(grabWaiters, client->index);
|
||||
DeleteClientFromAnySelections(client);
|
||||
ReleaseActiveGrabs(client);
|
||||
@@ -3435,6 +3434,7 @@ CloseDownClient(ClientPtr client)
|
||||
if (ClientIsAsleep(client))
|
||||
ClientSignal(client);
|
||||
ProcessWorkQueueZombies();
|
||||
+ output_pending_clear(client);
|
||||
CloseDownConnection(client);
|
||||
|
||||
/* If the client made it to the Running stage, nClients has
|
||||
diff --git a/include/dixstruct.h b/include/dixstruct.h
|
||||
index 3b578f8..d71b0ac 100644
|
||||
--- a/include/dixstruct.h
|
||||
+++ b/include/dixstruct.h
|
||||
@@ -159,7 +159,7 @@ extern struct xorg_list output_pending_clients;
|
||||
static inline void
|
||||
output_pending_mark(ClientPtr client)
|
||||
{
|
||||
- if (xorg_list_is_empty(&client->output_pending))
|
||||
+ if (!client->clientGone && xorg_list_is_empty(&client->output_pending))
|
||||
xorg_list_append(&client->output_pending, &output_pending_clients);
|
||||
}
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,50 +0,0 @@
|
||||
From f0429ee0a57f2cee8ca5e5bfc60fe43152c0f236 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Tue, 25 Oct 2016 19:24:49 +0200
|
||||
Subject: [PATCH xserver v2 3/7] xwayland: Transform pointer enter event
|
||||
coordinates
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Pointer enter event coordinates are surface relative and we need them
|
||||
to be screen relative for pScreen->SetCursorPosition().
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=758283
|
||||
|
||||
Signed-off-by: Rui Matos <tiagomatos@gmail.com>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
hw/xwayland/xwayland-input.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
|
||||
index 4d447a5..1991076 100644
|
||||
--- a/hw/xwayland/xwayland-input.c
|
||||
+++ b/hw/xwayland/xwayland-input.c
|
||||
@@ -298,6 +298,7 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
|
||||
int i;
|
||||
int sx = wl_fixed_to_int(sx_w);
|
||||
int sy = wl_fixed_to_int(sy_w);
|
||||
+ int dx, dy;
|
||||
ScreenPtr pScreen = xwl_seat->xwl_screen->screen;
|
||||
ValuatorMask mask;
|
||||
|
||||
@@ -314,9 +315,11 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
|
||||
xwl_seat->pointer_enter_serial = serial;
|
||||
|
||||
xwl_seat->focus_window = wl_surface_get_user_data(surface);
|
||||
+ dx = xwl_seat->focus_window->window->drawable.x;
|
||||
+ dy = xwl_seat->focus_window->window->drawable.y;
|
||||
|
||||
master = GetMaster(dev, POINTER_OR_FLOAT);
|
||||
- (*pScreen->SetCursorPosition) (dev, pScreen, sx, sy, TRUE);
|
||||
+ (*pScreen->SetCursorPosition) (dev, pScreen, dx + sx, dy + sy, TRUE);
|
||||
|
||||
miPointerInvalidateSprite(master);
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
82
0004-glamor-restore-vfunc-handlers-on-init-failure.patch
Normal file
82
0004-glamor-restore-vfunc-handlers-on-init-failure.patch
Normal file
@ -0,0 +1,82 @@
|
||||
From 57e7f3bbba2d6a38d31ed0c32b9cf47affc12ddd Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Thu, 3 Nov 2016 09:59:30 +0100
|
||||
Subject: [PATCH xserver v2 4/7] glamor: restore vfunc handlers on init failure
|
||||
|
||||
In glamor_init(), if the minimum requirements are not met, glamor may
|
||||
fail after setting up its own CloseScreen() and DestroyPixmap()
|
||||
routines, leading to a crash when either of the two routines is called
|
||||
if glamor failed to complete its initialization, e.g:
|
||||
|
||||
(EE) Backtrace:
|
||||
(EE) 0: Xwayland (OsSigHandler+0x29)
|
||||
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0)
|
||||
(EE) 2: Xwayland (glamor_sync_close+0x2a)
|
||||
(EE) 3: Xwayland (glamor_close_screen+0x52)
|
||||
(EE) 4: Xwayland (CursorCloseScreen+0x88)
|
||||
(EE) 5: Xwayland (AnimCurCloseScreen+0xa4)
|
||||
(EE) 6: Xwayland (present_close_screen+0x42)
|
||||
(EE) 7: Xwayland (dix_main+0x4f9)
|
||||
(EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf1)
|
||||
(EE) 9: Xwayland (_start+0x2a)
|
||||
|
||||
Restore the previous CloseScreen() and DestroyPixmap() vfunc handlers in
|
||||
case of failure when checking for the minimum requirements, so that if
|
||||
any of the requirement is not met we don't leave the CloseScreen() and
|
||||
DestroyPixmap() from glamor handlers in place.
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1390018
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
glamor/glamor.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/glamor/glamor.c b/glamor/glamor.c
|
||||
index b771832..c54cf3b 100644
|
||||
--- a/glamor/glamor.c
|
||||
+++ b/glamor/glamor.c
|
||||
@@ -470,7 +470,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
||||
LogMessage(X_WARNING,
|
||||
"glamor%d: Failed to allocate screen private\n",
|
||||
screen->myNum);
|
||||
- goto fail;
|
||||
+ goto free_glamor_private;
|
||||
}
|
||||
|
||||
glamor_set_screen_private(screen, glamor_priv);
|
||||
@@ -480,7 +480,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
||||
LogMessage(X_WARNING,
|
||||
"glamor%d: Failed to allocate pixmap private\n",
|
||||
screen->myNum);
|
||||
- goto fail;
|
||||
+ goto free_glamor_private;
|
||||
}
|
||||
|
||||
if (!dixRegisterPrivateKey(&glamor_gc_private_key, PRIVATE_GC,
|
||||
@@ -488,7 +488,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
||||
LogMessage(X_WARNING,
|
||||
"glamor%d: Failed to allocate gc private\n",
|
||||
screen->myNum);
|
||||
- goto fail;
|
||||
+ goto free_glamor_private;
|
||||
}
|
||||
|
||||
glamor_priv->saved_procs.close_screen = screen->CloseScreen;
|
||||
@@ -731,6 +731,11 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
||||
return TRUE;
|
||||
|
||||
fail:
|
||||
+ /* Restore default CloseScreen and DestroyPixmap handlers */
|
||||
+ screen->CloseScreen = glamor_priv->saved_procs.close_screen;
|
||||
+ screen->DestroyPixmap = glamor_priv->saved_procs.destroy_pixmap;
|
||||
+
|
||||
+ free_glamor_private:
|
||||
free(glamor_priv);
|
||||
glamor_set_screen_private(screen, NULL);
|
||||
return FALSE;
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 886a3a8bba89134c16661ba81256735d7933ec7b Mon Sep 17 00:00:00 2001
|
||||
From c17e544b271ced65483692103d39ed1188d4ca25 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 27 Sep 2016 14:30:10 +0200
|
||||
Subject: [PATCH xserver v2 4/7] xfree86: Remove redundant ServerIsNotSeat0
|
||||
Subject: [PATCH xserver v2 5/7] xfree86: Remove redundant ServerIsNotSeat0
|
||||
check from xf86CallDriverProbe
|
||||
|
||||
If foundScreen is TRUE, then all the code below the removed if
|
@ -1,7 +1,7 @@
|
||||
From 54fb5e9e6ed76ae4eef3ea61b1784ac9d52e1689 Mon Sep 17 00:00:00 2001
|
||||
From 74bc0fff3a6ca233e56b3fb2971bca97b5a4f8b5 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 30 Sep 2016 11:59:04 +0200
|
||||
Subject: [PATCH xserver v2 5/7] xfree86: Make adding unclaimed devices as GPU
|
||||
Subject: [PATCH xserver v2 6/7] xfree86: Make adding unclaimed devices as GPU
|
||||
devices a separate step
|
||||
|
||||
This is primarily a preparation patch for fixing the xserver exiting with
|
@ -1,41 +0,0 @@
|
||||
From bd4c8cb4db6e3a1905998f8b848e9f4624f51d52 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 18 Oct 2016 14:13:47 +1000
|
||||
Subject: [PATCH xserver v2 7/7] inputthread: On Linux leave the main thread's
|
||||
name as-is
|
||||
|
||||
On Linux, setting the main thread's name changes the program name
|
||||
(/proc/self/comm). Setting it to MainThread breaks scripts that rely on
|
||||
the command name, e.g. ps -C Xorg.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
Changes in v2 (hdegoede):
|
||||
-Only leave the main thread as-is in Linux, naming it is not an issue on
|
||||
other platforms
|
||||
---
|
||||
os/inputthread.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/os/inputthread.c b/os/inputthread.c
|
||||
index ddafa7f..8e7f2ed 100644
|
||||
--- a/os/inputthread.c
|
||||
+++ b/os/inputthread.c
|
||||
@@ -431,11 +431,13 @@ InputThreadPreInit(void)
|
||||
}
|
||||
hotplugPipeWrite = hotplugPipe[1];
|
||||
|
||||
+#ifndef __linux__ /* Linux does not deal well with renaming the main thread */
|
||||
#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)
|
||||
pthread_setname_np (pthread_self(), "MainThread");
|
||||
#elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID)
|
||||
pthread_setname_np ("MainThread");
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
}
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 5f6ac38e569369b39c34e7b0095f237cc30b51b5 Mon Sep 17 00:00:00 2001
|
||||
From 02bcb6f189c4ad8b2e73ce99cfa3c10f0c244a88 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 30 Sep 2016 12:29:09 +0200
|
||||
Subject: [PATCH xserver v2 6/7] xfree86: Try harder to find atleast 1 non GPU
|
||||
Subject: [PATCH xserver v2 7/7] xfree86: Try harder to find atleast 1 non GPU
|
||||
Screen
|
||||
|
||||
If we did not find any non GPU Screens, try again ignoring the notion
|
@ -1,34 +0,0 @@
|
||||
From 675ba81ffe268fdfeb2ec2820369cfd2d4c768c9 Mon Sep 17 00:00:00 2001
|
||||
From: agoins <agoins@nvidia.com>
|
||||
Date: Mon, 24 Oct 2016 15:25:53 -0700
|
||||
Subject: [PATCH xserver v2] ramdac: Check sPriv != NULL in xf86CheckHWCursor()
|
||||
|
||||
xf86CheckHWCursor() would dereference sPriv without NULL checking it. If Option
|
||||
"SWCursor" is specified, sPriv == NULL. In this case we should assume that HW
|
||||
cursors are not supported.
|
||||
|
||||
Signed-off-by: Alex Goins <agoins@nvidia.com>
|
||||
Reviewed-by: Andy Ritger <aritger@nvidia.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
hw/xfree86/ramdac/xf86HWCurs.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
|
||||
index da2b181..5e99526 100644
|
||||
--- a/hw/xfree86/ramdac/xf86HWCurs.c
|
||||
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
|
||||
@@ -148,7 +148,8 @@ xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr
|
||||
continue;
|
||||
|
||||
sPriv = dixLookupPrivate(&pSlave->devPrivates, xf86CursorScreenKey);
|
||||
- if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr))
|
||||
+ if (!sPriv ||
|
||||
+ !xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,69 +0,0 @@
|
||||
From e912742c1e26ef853064ddf672d990e1db254492 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Fri, 21 Oct 2016 10:11:45 +0200
|
||||
Subject: [PATCH xserver v2] xwayland: Activate and enable touch devices
|
||||
|
||||
On some random condition, a touch event may trigger a crash in Xwayland
|
||||
in GetTouchEvents().
|
||||
|
||||
The (simplified) backtrace goes as follow:
|
||||
|
||||
(gdb) bt
|
||||
#0 GetTouchEvents() at getevents.c:1892
|
||||
#1 QueueTouchEvents() at getevents.c:1866
|
||||
#2 xwl_touch_send_event() at xwayland-input.c:652
|
||||
#5 wl_closure_invoke() from libwayland-client.so.0
|
||||
#6 dispatch_event() from libwayland-client.so.0
|
||||
#7 wl_display_dispatch_queue_pending() from libwayland-client.so.0
|
||||
#8 xwl_read_events() at xwayland.c:483
|
||||
#9 ospoll_wait() at ospoll.c:412
|
||||
#10 WaitForSomething() at WaitFor.c:222
|
||||
#11 Dispatch() at dispatch.c:412
|
||||
#12 dix_main() at main.c:287
|
||||
#13 __libc_start_main() at libc-start.c:289
|
||||
#14 _start ()
|
||||
|
||||
The crash occurs when trying to access the sprite associated with the
|
||||
touch device, which appears to be NULL. Reason being the device itself
|
||||
is more a keyboard device than a touch device.
|
||||
|
||||
Moreover, it appears the device is neither enabled nor activated
|
||||
(inited=0, enabled=0) which doesn't seem right, but matches the code in
|
||||
init_touch() from xwayland-input.c which would enable the device if it
|
||||
was previously existing and otherwise would create the device but not
|
||||
activate it.
|
||||
|
||||
Make sure we do activate and enable touch devices just like we do for
|
||||
other input devices such as keyboard and pointer.
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
hw/xwayland/xwayland-input.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
|
||||
index 1991076..7ec3b1a 100644
|
||||
--- a/hw/xwayland/xwayland-input.c
|
||||
+++ b/hw/xwayland/xwayland-input.c
|
||||
@@ -1059,12 +1059,13 @@ init_touch(struct xwl_seat *xwl_seat)
|
||||
wl_touch_add_listener(xwl_seat->wl_touch,
|
||||
&touch_listener, xwl_seat);
|
||||
|
||||
- if (xwl_seat->touch)
|
||||
- EnableDevice(xwl_seat->touch, TRUE);
|
||||
- else {
|
||||
+ if (xwl_seat->touch == NULL) {
|
||||
xwl_seat->touch =
|
||||
add_device(xwl_seat, "xwayland-touch", xwl_touch_proc);
|
||||
+ ActivateDevice(xwl_seat->touch, TRUE);
|
||||
}
|
||||
+ EnableDevice(xwl_seat->touch, TRUE);
|
||||
+
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.9.3
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
0c24ed612ba0a0327be167f0178bfac9 xorg-server-20161026.tar.xz
|
||||
7547e58c87d18d6d0e157f5d2d04c7c7 xorg-server-1.18.99.902.tar.bz2
|
||||
|
@ -11,7 +11,7 @@
|
||||
# X.org requires lazy relocations to work.
|
||||
%undefine _hardened_build
|
||||
|
||||
%global gitdate 20161026
|
||||
#global gitdate 20161026
|
||||
%global stable_abi 1
|
||||
|
||||
%if !0%{?gitdate} || %{stable_abi}
|
||||
@ -45,7 +45,7 @@
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.19.0
|
||||
Release: 0.6%{?gitdate:.%{gitdate}}%{dist}
|
||||
Release: 0.7.rc2%{?gitdate:.%{gitdate}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -59,7 +59,8 @@ Source0: xorg-server-%{gitdate}.tar.xz
|
||||
Source1: make-git-snapshot.sh
|
||||
Source2: commitid
|
||||
%else
|
||||
Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2
|
||||
Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-1.18.99.902.tar.bz2
|
||||
#Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2
|
||||
Source1: gitignore
|
||||
%endif
|
||||
|
||||
@ -78,15 +79,13 @@ Source31: xserver-sdk-abi-requires.git
|
||||
Source40: driver-abi-rebuild.sh
|
||||
|
||||
# Various fixes pending upstream
|
||||
Patch1: 0001-DRI2-Sync-radeonsi_pci_ids.h-from-Mesa.patch
|
||||
Patch2: 0002-xfree86-Xorg.wrap-Do-not-require-root-rights-for-car.patch
|
||||
Patch3: 0003-xwayland-Transform-pointer-enter-event-coordinates.patch
|
||||
Patch4: 0004-xfree86-Remove-redundant-ServerIsNotSeat0-check-from.patch
|
||||
Patch5: 0005-xfree86-Make-adding-unclaimed-devices-as-GPU-devices.patch
|
||||
Patch6: 0006-xfree86-Try-harder-to-find-atleast-1-non-GPU-Screen.patch
|
||||
Patch7: 0007-inputthread-On-Linux-leave-the-main-thread-s-name-as.patch
|
||||
Patch8: 0008-ramdac-Check-sPriv-NULL-in-xf86CheckHWCursor.patch
|
||||
Patch9: 0009-xwayland-Activate-and-enable-touch-devices.patch
|
||||
Patch1: 0001-xwayland-shm-block-signals-during-fallocate.patch
|
||||
Patch2: 0002-dri2-Sync-i965_pci_ids.h-from-mesa.patch
|
||||
Patch3: 0003-dix-Make-sure-client-is-not-in-output_pending-chain-.patch
|
||||
Patch4: 0004-glamor-restore-vfunc-handlers-on-init-failure.patch
|
||||
Patch5: 0005-xfree86-Remove-redundant-ServerIsNotSeat0-check-from.patch
|
||||
Patch6: 0006-xfree86-Make-adding-unclaimed-devices-as-GPU-devices.patch
|
||||
Patch7: 0007-xfree86-Try-harder-to-find-atleast-1-non-GPU-Screen.patch
|
||||
Patch10: 0001-Fix-segfault-if-xorg.conf.d-is-absent.patch
|
||||
|
||||
#Patch6044: xserver-1.6.99-hush-prerelease-warning.patch
|
||||
@ -334,7 +333,8 @@ Xserver source code needed to build VNC server (Xvnc)
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
|
||||
#autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
|
||||
%autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:1.18.99.902}
|
||||
rm -rf .git
|
||||
cp %{SOURCE1} .gitignore
|
||||
# ick
|
||||
@ -592,6 +592,11 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 3 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-0.7.rc2
|
||||
- Update to 1.19.0-rc2
|
||||
- Fix (hopefully) various crashes in FlushAllOutput() (rhbz#1382444)
|
||||
- Fix Xwayland crashing in glamor on non glamor capable hw (rhbz#1390018)
|
||||
|
||||
* Tue Nov 1 2016 Ben Crocker <bcrocker@redhat.com> - 1.19.0-0.6.20161028
|
||||
- Fix Config record allocation during startup: if xorg.conf.d directory
|
||||
- was absent, a segfault resulted.
|
||||
|
Loading…
Reference in New Issue
Block a user