Timo Aaltonen pushed to branch debian-unstable at X Strike Force / xserver / xorg-server
Commits:
-
9c140c1c
by Timo Aaltonen at 2020-09-24T12:18:33+03:00
-
750ecee0
by Timo Aaltonen at 2020-09-24T12:19:27+03:00
6 changed files:
- debian/changelog
- + debian/patches/0001-Revert-linux-Fix-platform-device-PCI-detection-for-c.patch
- + debian/patches/0001-Revert-linux-Fix-platform-device-probe-for-DT-based-.patch
- + debian/patches/0001-Revert-linux-Make-platform-device-probe-less-fragile.patch
- − debian/patches/fix-pci-probing-segfault.diff
- debian/patches/series
Changes:
1 |
+xorg-server (2:1.20.9-2) unstable; urgency=medium
|
|
2 |
+ |
|
3 |
+ * fix-pci-probing-segfault.diff: Dropped and revert three commits
|
|
4 |
+ instead. (Closes: #969739)
|
|
5 |
+ |
|
6 |
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 24 Sep 2020 12:19:06 +0300
|
|
7 |
+ |
|
1 | 8 |
xorg-server (2:1.20.9-1) unstable; urgency=medium
|
2 | 9 |
|
3 | 10 |
* New upstream release.
|
1 |
+From 39cb95e959fab97a7e255dda1a1599b096fb0f7e Mon Sep 17 00:00:00 2001
|
|
2 |
+From: Olivier Fourdan <ofourdan@redhat.com>
|
|
3 |
+Date: Tue, 8 Sep 2020 10:03:11 +0200
|
|
4 |
+Subject: [PATCH] Revert "linux: Fix platform device PCI detection for complex
|
|
5 |
+ bus topologies"
|
|
6 |
+ |
|
7 |
+This reverts commit 5c96eb5f44e62a4cfe835023cde304eb5795b8fd.
|
|
8 |
+ |
|
9 |
+https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068
|
|
10 |
+---
|
|
11 |
+ config/udev.c | 6 +++---
|
|
12 |
+ 1 file changed, 3 insertions(+), 3 deletions(-)
|
|
13 |
+ |
|
14 |
+diff --git a/config/udev.c b/config/udev.c
|
|
15 |
+index 14409549b..8c6c4b666 100644
|
|
16 |
+--- a/config/udev.c
|
|
17 |
++++ b/config/udev.c
|
|
18 |
+@@ -470,7 +470,7 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path
|
|
19 |
+ config_odev_probe_proc_ptr probe_callback)
|
|
20 |
+ {
|
|
21 |
+ struct OdevAttributes *attribs = config_odev_allocate_attributes();
|
|
22 |
+- const char *value, *str;
|
|
23 |
++ const char *value;
|
|
24 |
+
|
|
25 |
+ attribs->path = XNFstrdup(path);
|
|
26 |
+ attribs->syspath = XNFstrdup(syspath);
|
|
27 |
+@@ -478,8 +478,8 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path
|
|
28 |
+ attribs->minor = minor;
|
|
29 |
+
|
|
30 |
+ value = udev_device_get_property_value(udev_device, "ID_PATH");
|
|
31 |
+- if (value && (str = strstr(value, "pci-"))) {
|
|
32 |
+- attribs->busid = XNFstrdup(str);
|
|
33 |
++ if (value && !strncmp(value, "pci-", 4)) {
|
|
34 |
++ attribs->busid = XNFstrdup(value);
|
|
35 |
+ attribs->busid[3] = ':';
|
|
36 |
+ }
|
|
37 |
+
|
|
38 |
+--
|
|
39 |
+2.27.0
|
|
40 |
+ |
1 |
+From 4b6fce5975c2f931a0478cf4deeec97529b05eb6 Mon Sep 17 00:00:00 2001
|
|
2 |
+From: Olivier Fourdan <ofourdan@redhat.com>
|
|
3 |
+Date: Tue, 8 Sep 2020 10:01:55 +0200
|
|
4 |
+Subject: [PATCH] Revert "linux: Fix platform device probe for DT-based PCI"
|
|
5 |
+ |
|
6 |
+This reverts commit 249a12c54a9316b089bd22683c011519348496df.
|
|
7 |
+ |
|
8 |
+https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068
|
|
9 |
+---
|
|
10 |
+ config/udev.c | 27 +--------------------------
|
|
11 |
+ 1 file changed, 1 insertion(+), 26 deletions(-)
|
|
12 |
+ |
|
13 |
+diff --git a/config/udev.c b/config/udev.c
|
|
14 |
+index b00d90237..14409549b 100644
|
|
15 |
+--- a/config/udev.c
|
|
16 |
++++ b/config/udev.c
|
|
17 |
+@@ -464,31 +464,6 @@ config_udev_fini(void)
|
|
18 |
+
|
|
19 |
+ #ifdef CONFIG_UDEV_KMS
|
|
20 |
+
|
|
21 |
+-/* Find the last occurrence of the needle in haystack */
|
|
22 |
+-static char *strrstr(const char *haystack, const char *needle)
|
|
23 |
+-{
|
|
24 |
+- char *prev, *last, *tmp;
|
|
25 |
+-
|
|
26 |
+- prev = strstr(haystack, needle);
|
|
27 |
+- if (!prev)
|
|
28 |
+- return NULL;
|
|
29 |
+-
|
|
30 |
+- last = prev;
|
|
31 |
+- tmp = prev + 1;
|
|
32 |
+-
|
|
33 |
+- while (tmp) {
|
|
34 |
+- last = strstr(tmp, needle);
|
|
35 |
+- if (!last)
|
|
36 |
+- return prev;
|
|
37 |
+- else {
|
|
38 |
+- prev = last;
|
|
39 |
+- tmp = prev + 1;
|
|
40 |
+- }
|
|
41 |
+- }
|
|
42 |
+-
|
|
43 |
+- return last;
|
|
44 |
+-}
|
|
45 |
+-
|
|
46 |
+ static void
|
|
47 |
+ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath,
|
|
48 |
+ int major, int minor,
|
|
49 |
+@@ -503,7 +478,7 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path
|
|
50 |
+ attribs->minor = minor;
|
|
51 |
+
|
|
52 |
+ value = udev_device_get_property_value(udev_device, "ID_PATH");
|
|
53 |
+- if (value && (str = strrstr(value, "pci-"))) {
|
|
54 |
++ if (value && (str = strstr(value, "pci-"))) {
|
|
55 |
+ attribs->busid = XNFstrdup(str);
|
|
56 |
+ attribs->busid[3] = ':';
|
|
57 |
+ }
|
|
58 |
+--
|
|
59 |
+2.27.0
|
|
60 |
+ |
1 |
+From af4c84ce8855e84c0ad89b929bc972e884f0b8e3 Mon Sep 17 00:00:00 2001
|
|
2 |
+From: Olivier Fourdan <ofourdan@redhat.com>
|
|
3 |
+Date: Tue, 8 Sep 2020 10:03:33 +0200
|
|
4 |
+Subject: [PATCH] Revert "linux: Make platform device probe less fragile"
|
|
5 |
+ |
|
6 |
+This reverts commit 74b7427c41b4e4104af7abf70a996c086d3d7628.
|
|
7 |
+ |
|
8 |
+https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068
|
|
9 |
+---
|
|
10 |
+ config/udev.c | 17 +++++------------
|
|
11 |
+ hw/xfree86/os-support/linux/lnx_platform.c | 20 ++++++++++++++++++--
|
|
12 |
+ 2 files changed, 23 insertions(+), 14 deletions(-)
|
|
13 |
+ |
|
14 |
+diff --git a/config/udev.c b/config/udev.c
|
|
15 |
+index 8c6c4b666..3a73189e2 100644
|
|
16 |
+--- a/config/udev.c
|
|
17 |
++++ b/config/udev.c
|
|
18 |
+@@ -56,7 +56,7 @@ static struct udev_monitor *udev_monitor;
|
|
19 |
+
|
|
20 |
+ #ifdef CONFIG_UDEV_KMS
|
|
21 |
+ static void
|
|
22 |
+-config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath,
|
|
23 |
++config_udev_odev_setup_attribs(const char *path, const char *syspath,
|
|
24 |
+ int major, int minor,
|
|
25 |
+ config_odev_probe_proc_ptr probe_callback);
|
|
26 |
+ #endif
|
|
27 |
+@@ -128,7 +128,7 @@ device_added(struct udev_device *udev_device)
|
|
28 |
+
|
|
29 |
+ LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path);
|
|
30 |
+
|
|
31 |
+- config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum),
|
|
32 |
++ config_udev_odev_setup_attribs(path, syspath, major(devnum),
|
|
33 |
+ minor(devnum), NewGPUDeviceRequest);
|
|
34 |
+ return;
|
|
35 |
+ }
|
|
36 |
+@@ -322,7 +322,7 @@ device_removed(struct udev_device *device)
|
|
37 |
+
|
|
38 |
+ LogMessage(X_INFO, "config/udev: removing GPU device %s %s\n",
|
|
39 |
+ syspath, path);
|
|
40 |
+- config_udev_odev_setup_attribs(device, path, syspath, major(devnum),
|
|
41 |
++ config_udev_odev_setup_attribs(path, syspath, major(devnum),
|
|
42 |
+ minor(devnum), DeleteGPUDeviceRequest);
|
|
43 |
+ /* Retry vtenter after a drm node removal */
|
|
44 |
+ systemd_logind_vtenter();
|
|
45 |
+@@ -465,24 +465,17 @@ config_udev_fini(void)
|
|
46 |
+ #ifdef CONFIG_UDEV_KMS
|
|
47 |
+
|
|
48 |
+ static void
|
|
49 |
+-config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath,
|
|
50 |
++config_udev_odev_setup_attribs(const char *path, const char *syspath,
|
|
51 |
+ int major, int minor,
|
|
52 |
+ config_odev_probe_proc_ptr probe_callback)
|
|
53 |
+ {
|
|
54 |
+ struct OdevAttributes *attribs = config_odev_allocate_attributes();
|
|
55 |
+- const char *value;
|
|
56 |
+
|
|
57 |
+ attribs->path = XNFstrdup(path);
|
|
58 |
+ attribs->syspath = XNFstrdup(syspath);
|
|
59 |
+ attribs->major = major;
|
|
60 |
+ attribs->minor = minor;
|
|
61 |
+
|
|
62 |
+- value = udev_device_get_property_value(udev_device, "ID_PATH");
|
|
63 |
+- if (value && !strncmp(value, "pci-", 4)) {
|
|
64 |
+- attribs->busid = XNFstrdup(value);
|
|
65 |
+- attribs->busid[3] = ':';
|
|
66 |
+- }
|
|
67 |
+-
|
|
68 |
+ /* ownership of attribs is passed to probe layer */
|
|
69 |
+ probe_callback(attribs);
|
|
70 |
+ }
|
|
71 |
+@@ -523,7 +516,7 @@ config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback)
|
|
72 |
+ else if (!check_seat(udev_device))
|
|
73 |
+ goto no_probe;
|
|
74 |
+
|
|
75 |
+- config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum),
|
|
76 |
++ config_udev_odev_setup_attribs(path, syspath, major(devnum),
|
|
77 |
+ minor(devnum), probe_callback);
|
|
78 |
+ no_probe:
|
|
79 |
+ udev_device_unref(udev_device);
|
|
80 |
+diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c
|
|
81 |
+index e62306219..70374ace8 100644
|
|
82 |
+--- a/hw/xfree86/os-support/linux/lnx_platform.c
|
|
83 |
++++ b/hw/xfree86/os-support/linux/lnx_platform.c
|
|
84 |
+@@ -23,13 +23,13 @@
|
|
85 |
+ static Bool
|
|
86 |
+ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
|
|
87 |
+ {
|
|
88 |
++ drmSetVersion sv;
|
|
89 |
+ drmVersionPtr v;
|
|
90 |
++ char *buf;
|
|
91 |
+ int fd;
|
|
92 |
+ int err = 0;
|
|
93 |
+ Bool paused, server_fd = FALSE;
|
|
94 |
+
|
|
95 |
+- LogMessage(X_INFO, "Platform probe for %s\n", attribs->syspath);
|
|
96 |
+-
|
|
97 |
+ fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, &paused);
|
|
98 |
+ if (fd != -1) {
|
|
99 |
+ if (paused) {
|
|
100 |
+@@ -48,6 +48,18 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
|
|
101 |
+ if (fd == -1)
|
|
102 |
+ return FALSE;
|
|
103 |
+
|
|
104 |
++ sv.drm_di_major = 1;
|
|
105 |
++ sv.drm_di_minor = 4;
|
|
106 |
++ sv.drm_dd_major = -1; /* Don't care */
|
|
107 |
++ sv.drm_dd_minor = -1; /* Don't care */
|
|
108 |
++
|
|
109 |
++ err = drmSetInterfaceVersion(fd, &sv);
|
|
110 |
++ if (err) {
|
|
111 |
++ xf86Msg(X_ERROR, "%s: failed to set DRM interface version 1.4: %s\n",
|
|
112 |
++ path, strerror(-err));
|
|
113 |
++ goto out;
|
|
114 |
++ }
|
|
115 |
++
|
|
116 |
+ /* for a delayed probe we've already added the device */
|
|
117 |
+ if (delayed_index == -1) {
|
|
118 |
+ xf86_add_platform_device(attribs, FALSE);
|
|
119 |
+@@ -57,6 +69,10 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
|
|
120 |
+ if (server_fd)
|
|
121 |
+ xf86_platform_devices[delayed_index].flags |= XF86_PDEV_SERVER_FD;
|
|
122 |
+
|
|
123 |
++ buf = drmGetBusid(fd);
|
|
124 |
++ xf86_platform_odev_attributes(delayed_index)->busid = XNFstrdup(buf);
|
|
125 |
++ drmFreeBusid(buf);
|
|
126 |
++
|
|
127 |
+ v = drmGetVersion(fd);
|
|
128 |
+ if (!v) {
|
|
129 |
+ xf86Msg(X_ERROR, "%s: failed to query DRM version\n", path);
|
|
130 |
+--
|
|
131 |
+2.27.0
|
|
132 |
+ |
1 |
-commit e50c85f4ebf559a3bac4817b41074c43d4691779
|
|
2 |
-Author: Eric Anholt <eric@anholt.net>
|
|
3 |
-Date: Fri Oct 26 17:47:30 2018 -0700
|
|
4 |
- |
|
5 |
- Fix segfault on probing a non-PCI platform device on a system with PCI.
|
|
6 |
-
|
|
7 |
- Some Broadcom set-top-box boards have PCI busses, but the GPU is still
|
|
8 |
- probed through DT. We would dereference a null busid here in that
|
|
9 |
- case.
|
|
10 |
-
|
|
11 |
- Signed-off-by: Eric Anholt <eric@anholt.net>
|
|
12 |
- |
|
13 |
-diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
|
14 |
-index cef47da03..dadbac6c8 100644
|
|
15 |
---- a/hw/xfree86/common/xf86platformBus.c
|
|
16 |
-+++ b/hw/xfree86/common/xf86platformBus.c
|
|
17 |
-@@ -289,7 +289,7 @@ xf86platformProbe(void)
|
|
18 |
- for (i = 0; i < xf86_num_platform_devices; i++) {
|
|
19 |
- char *busid = xf86_platform_odev_attributes(i)->busid;
|
|
20 |
-
|
|
21 |
-- if (pci && (strncmp(busid, "pci:", 4) == 0)) {
|
|
22 |
-+ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
|
|
23 |
- platform_find_pci_info(&xf86_platform_devices[i], busid);
|
|
24 |
- }
|
|
25 |
-
|
... | ... | @@ -6,6 +6,8 @@ |
6 | 6 |
05_Revert-Unload-submodules.diff
|
7 | 7 |
06_use-intel-only-on-pre-gen4.diff
|
8 | 8 |
07_use-modesetting-driver-by-default-on-GeForce.diff
|
9 |
-fix-pci-probing-segfault.diff
|
|
10 | 9 |
revert-hw-xfree86-avoid-cursor-use-after-free.diff
|
11 | 10 |
revert-disabling-xss-for-rootless-xwayland.diff
|
11 |
+0001-Revert-linux-Fix-platform-device-probe-for-DT-based-.patch
|
|
12 |
+0001-Revert-linux-Fix-platform-device-PCI-detection-for-c.patch
|
|
13 |
+0001-Revert-linux-Make-platform-device-probe-less-fragile.patch
|