From ad576683abc5feca6130f0c4d8588dffde7c1fa3 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 7 Aug 2014 18:54:44 +0200 Subject: [PATCH 1/6] Fix xwayland conditionals to allow building on F-20 (rhbz#1127351) --- xorg-x11-server.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index efc00c3..12db821 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.16.0 -Release: 1%{?gitdate:.%{gitdate}}%{dist} +Release: 2%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -141,7 +141,7 @@ BuildRequires: libXinerama-devel libXi-devel BuildRequires: libXt-devel libdmx-devel libXmu-devel libXrender-devel BuildRequires: libXi-devel libXpm-devel libXaw-devel libXfixes-devel -%if !0%{?rhel} +%if 0%{?fedora} > 20 BuildRequires: wayland-devel pkgconfig(wayland-client) pkgconfig(epoxy) BuildRequires: pkgconfig(xshmfence) >= 1.1 %endif @@ -314,7 +314,7 @@ X protocol, and therefore supports the newer X extensions like Render and Composite. -%if !0%{?rhel} || 0%{?fedora} > 20 +%if 0%{?fedora} > 20 %package Xwayland Summary: Wayland X Sserver. Group: User Interface/X @@ -612,7 +612,7 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %{_bindir}/Xephyr %{_mandir}/man1/Xephyr.1* -%if !0%{?rhel} || 0%{?fedora} < 21 +%if 0%{?fedora} > 20 %files Xwayland %{_bindir}/Xwayland %endif @@ -633,6 +633,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Thu Aug 7 2014 Hans de Goede - 1.16.0-2 +- Fix xwayland conditionals to allow building on F-20 (rhbz#1127351) + * Mon Jul 28 2014 Hans de Goede - 1.16.0-1 - Update to 1.16.0 From a9ad36eddda53e59ae67636c38369af205b6da62 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 8 Aug 2014 08:47:58 +0200 Subject: [PATCH 2/6] Really fix conditionals to allow building on F-20 (rhbz#1127351) --- xorg-x11-server.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 12db821..7c14539 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.16.0 -Release: 2%{?gitdate:.%{gitdate}}%{dist} +Release: 3%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -143,6 +143,8 @@ BuildRequires: libXi-devel libXpm-devel libXaw-devel libXfixes-devel %if 0%{?fedora} > 20 BuildRequires: wayland-devel pkgconfig(wayland-client) pkgconfig(epoxy) +%endif +%if !0%{?rhel} BuildRequires: pkgconfig(xshmfence) >= 1.1 %endif BuildRequires: libXv-devel @@ -633,6 +635,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Fri Aug 8 2014 Hans de Goede - 1.16.0-3 +- Really fix conditionals to allow building on F-20 (rhbz#1127351) + * Thu Aug 7 2014 Hans de Goede - 1.16.0-2 - Fix xwayland conditionals to allow building on F-20 (rhbz#1127351) From 404ee1b8307bbc62c3e81908edfd8b51a0b84aff Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 10:44:03 +0000 Subject: [PATCH 3/6] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- xorg-x11-server.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 7c14539..8e2b74a 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.16.0 -Release: 3%{?gitdate:.%{gitdate}}%{dist} +Release: 4%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -635,6 +635,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 1.16.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Aug 8 2014 Hans de Goede - 1.16.0-3 - Really fix conditionals to allow building on F-20 (rhbz#1127351) From 5556cee4a9c3875f5aa947fbca789116a5fa122f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 26 Aug 2014 20:27:18 +0100 Subject: [PATCH 4/6] re-add support for non pci platform devices --- xorg-non-pci.patch | 136 +++++++++++++++++++++++++++++++++++++++++++ xorg-x11-server.spec | 11 +++- 2 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 xorg-non-pci.patch diff --git a/xorg-non-pci.patch b/xorg-non-pci.patch new file mode 100644 index 0000000..8aa474a --- /dev/null +++ b/xorg-non-pci.patch @@ -0,0 +1,136 @@ +From: Peter Robinson + +--- xorg-server-1.16.0/hw/xfree86/common/xf86Init.c.orig 2014-08-26 19:29:26.802470808 +0100 ++++ xorg-server-1.16.0/hw/xfree86/common/xf86Init.c 2014-08-26 19:31:21.495368739 +0100 +@@ -546,10 +546,18 @@ + if (xf86DriverList[i]->Identify != NULL) + xf86DriverList[i]->Identify(0); + +- if (xf86DriverList[i]->driverFunc) ++ if (xf86DriverList[i]->driverFunc) { + xf86DriverList[i]->driverFunc(NULL, + GET_REQUIRED_HW_INTERFACES, + &flags); ++ /* also let the driver know that it is safe to ++ * allow platformProbe() to claim the device ++ * if it is a non-pci platform device: ++ */ ++ xf86DriverList[i]->driverFunc(NULL, ++ SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS, ++ NULL); ++ } + + if (NEED_IO_ENABLED(flags)) + want_hw_access = TRUE; +--- xorg-server-1.16.0/hw/xfree86/common/xf86str.h.orig 2014-08-26 19:29:39.158675241 +0100 ++++ xorg-server-1.16.0/hw/xfree86/common/xf86str.h 2014-08-26 19:31:21.495368739 +0100 +@@ -258,6 +258,7 @@ + RR_GET_MODE_MM, + GET_REQUIRED_HW_INTERFACES = 10, + SUPPORTS_SERVER_FDS = 11, ++ SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12, + } xorgDriverFuncOp; + + typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *); +--- xorg-server-1.16.0/hw/xfree86/common/xf86platformBus.c.orig 2014-07-16 19:57:12.000000000 +0100 ++++ xorg-server-1.16.0/hw/xfree86/common/xf86platformBus.c 2014-08-26 19:31:26.483451297 +0100 +@@ -275,6 +275,41 @@ + return i; + } + ++static int ++find_non_pci_driver(const char *busid, char *returnList[], int returnListMax) ++{ ++ /* Add more entries here if we ever return more than 4 drivers for ++ any device */ ++ const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; ++ int i = 0; ++ char *p, *s; ++ ++ s = xstrdup(busid); ++ p = strtok(s, ":"); ++ ++ if (strcmp(p, "platform")) ++ goto out; ++ ++ /* extract device name: */ ++ p = strtok(NULL, ":"); ++ ++ /* check for special cases where DDX driver name does not match busid: */ ++ if (!strcmp(p, "mdp")) { ++ driverList[i++] = "freedreno"; ++ } ++ ++ /* add name derived from busid last: */ ++ driverList[i++] = p; ++ ++ for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) { ++ returnList[i] = xnfstrdup(driverList[i]); ++ } ++ ++out: ++ free(s); ++ return i; /* Number of entries added */ ++} ++ + /** + * @return The numbers of found devices that match with the current system + * drivers. +@@ -305,6 +340,9 @@ + + if ((info != NULL) && (j < nmatches)) { + j += xf86VideoPtrToDriverList(info, &(matches[j]), nmatches - j); ++ } else if (j < nmatches) { ++ char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); ++ j += find_non_pci_driver(busid, &(matches[j]), nmatches - j); + } + } + } +@@ -323,6 +361,9 @@ + pci = FALSE; + } + ++ /* First pass, look for PCI devices. If we find a suitable ++ * PCI device that takes priority. ++ */ + for (i = 0; i < xf86_num_platform_devices; i++) { + char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); + +@@ -330,6 +371,24 @@ + platform_find_pci_info(&xf86_platform_devices[i], busid); + } + } ++ ++ /* if we found something, we are done: */ ++ if (primaryBus.type != BUS_NONE) ++ return 0; ++ ++ /* Second pass, look for real platform devices (ie. in the linux- ++ * kernel sense of platform device.. something that is not pci) ++ */ ++ for (i = 0; i < xf86_num_platform_devices; i++) { ++ char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); ++ ++ if (strncmp(busid, "platform:", 9) == 0) { ++ primaryBus.type = BUS_PLATFORM; ++ primaryBus.id.plat = &xf86_platform_devices[i]; ++ break; ++ } ++ } ++ + return 0; + } + +@@ -476,10 +535,8 @@ + /* for non-seat0 servers assume first device is the master */ + if (ServerIsNotSeat0()) + break; +- if (xf86_platform_devices[j].pdev) { +- if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) +- break; +- } ++ if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) ++ break; + } + } + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 8e2b74a..860ee81 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.16.0 -Release: 4%{?gitdate:.%{gitdate}}%{dist} +Release: 5%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -99,6 +99,12 @@ Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch # submitted http://lists.x.org/archives/xorg-devel/2014-July/042936.html Patch10200: 0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch +# submitted http://lists.x.org/archives/xorg-devel/2014-June/042826.html +# needed to allow X to start on arm and other devices without video on pci buses +# There's a slight variant upstream but it doesn't build against 1.16.0 atm +# rebase of Rob Clark's patches +Patch10300: xorg-non-pci.patch + %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri %global sdkdir %{_includedir}/xorg @@ -635,6 +641,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Mon Aug 26 2014 Peter Robinson 1.16.0-5 +- re-add support for non pci platform devices + * Mon Aug 18 2014 Fedora Release Engineering - 1.16.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 410f73f8b4bcae881b9d9df816c0be1c00a1acd9 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 28 Aug 2014 22:38:14 +0200 Subject: [PATCH 5/6] drop no longer valid configure arguments (rhbz#1133350) --- xorg-x11-server.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 860ee81..f6f6e2f 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.16.0 -Release: 5%{?gitdate:.%{gitdate}}%{dist} +Release: 6%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -415,7 +415,7 @@ test `getminor extension` == %{extension_minor} %global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" %if %{with_hw_servers} -%global dri_flags --with-dri-driver-path=%{drimoduledir} --enable-dri2 %{?!rhel:--enable-dri3} --enable-suid-wrapper --enable-glamor +%global dri_flags --enable-dri2 %{?!rhel:--enable-dri3} --enable-suid-wrapper --enable-glamor %else %global dri_flags --disable-dri %endif @@ -439,7 +439,7 @@ autoreconf -f -v --install || exit 1 # export CFLAGS="${RPM_OPT_FLAGS}" # XXX without dtrace -%configure --enable-maintainer-mode %{xservers} \ +%configure %{xservers} \ --disable-static \ --with-pic \ %{?no_int10} --with-int10=x86emu \ @@ -641,7 +641,10 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog -* Mon Aug 26 2014 Peter Robinson 1.16.0-5 +* Thu Aug 28 2014 Hans de Goede - 1.16.0-6 +- drop no longer valid configure arguments (rhbz#1133350) + +* Mon Aug 25 2014 Peter Robinson 1.16.0-5 - re-add support for non pci platform devices * Mon Aug 18 2014 Fedora Release Engineering - 1.16.0-4 From ccee9531467c0cfbc219dff619d3da4b523c4154 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 6 Sep 2014 10:09:28 +0200 Subject: [PATCH 6/6] Drop Fedora specific xorg-non-pci.patch, replace with solution from upstream --- ...-to-first-platform-device-as-primary.patch | 74 ++++++++++ ...e86-Allow-non-PCI-devices-as-primary.patch | 37 +++++ xorg-non-pci.patch | 136 ------------------ xorg-x11-server.spec | 13 +- 4 files changed, 119 insertions(+), 141 deletions(-) create mode 100644 0001-xfree86-Fallback-to-first-platform-device-as-primary.patch create mode 100644 0002-xfree86-Allow-non-PCI-devices-as-primary.patch delete mode 100644 xorg-non-pci.patch diff --git a/0001-xfree86-Fallback-to-first-platform-device-as-primary.patch b/0001-xfree86-Fallback-to-first-platform-device-as-primary.patch new file mode 100644 index 0000000..d435466 --- /dev/null +++ b/0001-xfree86-Fallback-to-first-platform-device-as-primary.patch @@ -0,0 +1,74 @@ +From 5823527cf87c781df10620048c984d52fa529647 Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Thu, 13 Feb 2014 13:31:31 +0100 +Subject: [PATCH v2 1/2] xfree86: Fallback to first platform device as primary + +When neither of the various bus implementations was able to find a +primary bus and device, fallback to using the platform bus as primary +bus and the first platform device as primary device. + +Signed-off-by: Thierry Reding +Reviewed-by: Rob Clark +Tested-by: Rob Clark +Signed-off-by: Keith Packard +--- + hw/xfree86/common/xf86Bus.c | 3 +++ + hw/xfree86/common/xf86platformBus.c | 15 +++++++++++++++ + hw/xfree86/common/xf86platformBus.h | 1 + + 3 files changed, 19 insertions(+) + +diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c +index b3b3f8c..bd3e4e3 100644 +--- a/hw/xfree86/common/xf86Bus.c ++++ b/hw/xfree86/common/xf86Bus.c +@@ -210,6 +210,9 @@ xf86BusProbe(void) + #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) + xf86SbusProbe(); + #endif ++#ifdef XSERVER_PLATFORM_BUS ++ xf86platformPrimary(); ++#endif + } + + /* +diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c +index eb1a3fb..74d63c2 100644 +--- a/hw/xfree86/common/xf86platformBus.c ++++ b/hw/xfree86/common/xf86platformBus.c +@@ -635,4 +635,21 @@ void xf86platformVTProbe(void) + xf86PlatformReprobeDevice(i, xf86_platform_devices[i].attribs); + } + } ++ ++void xf86platformPrimary(void) ++{ ++ /* use the first platform device as a fallback */ ++ if (primaryBus.type == BUS_NONE) { ++ xf86Msg(X_INFO, "no primary bus or device found\n"); ++ ++ if (xf86_num_platform_devices > 0) { ++ char *syspath = xf86_get_platform_attrib(0, ODEV_ATTRIB_SYSPATH); ++ ++ primaryBus.id.plat = &xf86_platform_devices[0]; ++ primaryBus.type = BUS_PLATFORM; ++ ++ xf86Msg(X_NONE, "\tfalling back to %s\n", syspath); ++ } ++ } ++} + #endif +diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h +index 5dee4e0..dec1956 100644 +--- a/hw/xfree86/common/xf86platformBus.h ++++ b/hw/xfree86/common/xf86platformBus.h +@@ -77,6 +77,7 @@ extern _X_EXPORT int + xf86PlatformMatchDriver(char *matches[], int nmatches); + + extern void xf86platformVTProbe(void); ++extern void xf86platformPrimary(void); + #endif + + #endif +-- +2.1.0 + diff --git a/0002-xfree86-Allow-non-PCI-devices-as-primary.patch b/0002-xfree86-Allow-non-PCI-devices-as-primary.patch new file mode 100644 index 0000000..b8897be --- /dev/null +++ b/0002-xfree86-Allow-non-PCI-devices-as-primary.patch @@ -0,0 +1,37 @@ +From 570ce9d0e7cfc06cd8892a5aab471768aaa9b2f1 Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Thu, 13 Feb 2014 13:36:12 +0100 +Subject: [PATCH v2 2/2] xfree86: Allow non-PCI devices as primary + +On platforms that don't support PCI or have no GPU attached to the PCI +bus, there can still be a primary device on a non-PCI bus. + +Signed-off-by: Thierry Reding +Reviewed-by: Rob Clark +Tested-by: Rob Clark +Signed-off-by: Keith Packard +--- + hw/xfree86/common/xf86platformBus.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c +index 74d63c2..fe0880e 100644 +--- a/hw/xfree86/common/xf86platformBus.c ++++ b/hw/xfree86/common/xf86platformBus.c +@@ -476,10 +476,9 @@ xf86platformProbeDev(DriverPtr drvp) + /* for non-seat0 servers assume first device is the master */ + if (ServerIsNotSeat0()) + break; +- if (xf86_platform_devices[j].pdev) { +- if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) +- break; +- } ++ ++ if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) ++ break; + } + } + +-- +2.1.0 + diff --git a/xorg-non-pci.patch b/xorg-non-pci.patch deleted file mode 100644 index 8aa474a..0000000 --- a/xorg-non-pci.patch +++ /dev/null @@ -1,136 +0,0 @@ -From: Peter Robinson - ---- xorg-server-1.16.0/hw/xfree86/common/xf86Init.c.orig 2014-08-26 19:29:26.802470808 +0100 -+++ xorg-server-1.16.0/hw/xfree86/common/xf86Init.c 2014-08-26 19:31:21.495368739 +0100 -@@ -546,10 +546,18 @@ - if (xf86DriverList[i]->Identify != NULL) - xf86DriverList[i]->Identify(0); - -- if (xf86DriverList[i]->driverFunc) -+ if (xf86DriverList[i]->driverFunc) { - xf86DriverList[i]->driverFunc(NULL, - GET_REQUIRED_HW_INTERFACES, - &flags); -+ /* also let the driver know that it is safe to -+ * allow platformProbe() to claim the device -+ * if it is a non-pci platform device: -+ */ -+ xf86DriverList[i]->driverFunc(NULL, -+ SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS, -+ NULL); -+ } - - if (NEED_IO_ENABLED(flags)) - want_hw_access = TRUE; ---- xorg-server-1.16.0/hw/xfree86/common/xf86str.h.orig 2014-08-26 19:29:39.158675241 +0100 -+++ xorg-server-1.16.0/hw/xfree86/common/xf86str.h 2014-08-26 19:31:21.495368739 +0100 -@@ -258,6 +258,7 @@ - RR_GET_MODE_MM, - GET_REQUIRED_HW_INTERFACES = 10, - SUPPORTS_SERVER_FDS = 11, -+ SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12, - } xorgDriverFuncOp; - - typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *); ---- xorg-server-1.16.0/hw/xfree86/common/xf86platformBus.c.orig 2014-07-16 19:57:12.000000000 +0100 -+++ xorg-server-1.16.0/hw/xfree86/common/xf86platformBus.c 2014-08-26 19:31:26.483451297 +0100 -@@ -275,6 +275,41 @@ - return i; - } - -+static int -+find_non_pci_driver(const char *busid, char *returnList[], int returnListMax) -+{ -+ /* Add more entries here if we ever return more than 4 drivers for -+ any device */ -+ const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; -+ int i = 0; -+ char *p, *s; -+ -+ s = xstrdup(busid); -+ p = strtok(s, ":"); -+ -+ if (strcmp(p, "platform")) -+ goto out; -+ -+ /* extract device name: */ -+ p = strtok(NULL, ":"); -+ -+ /* check for special cases where DDX driver name does not match busid: */ -+ if (!strcmp(p, "mdp")) { -+ driverList[i++] = "freedreno"; -+ } -+ -+ /* add name derived from busid last: */ -+ driverList[i++] = p; -+ -+ for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) { -+ returnList[i] = xnfstrdup(driverList[i]); -+ } -+ -+out: -+ free(s); -+ return i; /* Number of entries added */ -+} -+ - /** - * @return The numbers of found devices that match with the current system - * drivers. -@@ -305,6 +340,9 @@ - - if ((info != NULL) && (j < nmatches)) { - j += xf86VideoPtrToDriverList(info, &(matches[j]), nmatches - j); -+ } else if (j < nmatches) { -+ char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); -+ j += find_non_pci_driver(busid, &(matches[j]), nmatches - j); - } - } - } -@@ -323,6 +361,9 @@ - pci = FALSE; - } - -+ /* First pass, look for PCI devices. If we find a suitable -+ * PCI device that takes priority. -+ */ - for (i = 0; i < xf86_num_platform_devices; i++) { - char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); - -@@ -330,6 +371,24 @@ - platform_find_pci_info(&xf86_platform_devices[i], busid); - } - } -+ -+ /* if we found something, we are done: */ -+ if (primaryBus.type != BUS_NONE) -+ return 0; -+ -+ /* Second pass, look for real platform devices (ie. in the linux- -+ * kernel sense of platform device.. something that is not pci) -+ */ -+ for (i = 0; i < xf86_num_platform_devices; i++) { -+ char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); -+ -+ if (strncmp(busid, "platform:", 9) == 0) { -+ primaryBus.type = BUS_PLATFORM; -+ primaryBus.id.plat = &xf86_platform_devices[i]; -+ break; -+ } -+ } -+ - return 0; - } - -@@ -476,10 +535,8 @@ - /* for non-seat0 servers assume first device is the master */ - if (ServerIsNotSeat0()) - break; -- if (xf86_platform_devices[j].pdev) { -- if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) -- break; -- } -+ if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) -+ break; - } - } - diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index f6f6e2f..9f4e6b5 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.16.0 -Release: 6%{?gitdate:.%{gitdate}}%{dist} +Release: 7%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -99,11 +99,10 @@ Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch # submitted http://lists.x.org/archives/xorg-devel/2014-July/042936.html Patch10200: 0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch -# submitted http://lists.x.org/archives/xorg-devel/2014-June/042826.html +# cherry picked from upstream # needed to allow X to start on arm and other devices without video on pci buses -# There's a slight variant upstream but it doesn't build against 1.16.0 atm -# rebase of Rob Clark's patches -Patch10300: xorg-non-pci.patch +Patch10301: 0001-xfree86-Fallback-to-first-platform-device-as-primary.patch +Patch10302: 0002-xfree86-Allow-non-PCI-devices-as-primary.patch %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri @@ -641,6 +640,10 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Tue Sep 2 2014 Hans de Goede - 1.16.0-7 +- Drop Fedora specific xorg-non-pci.patch, replace with solution from + upstream + * Thu Aug 28 2014 Hans de Goede - 1.16.0-6 - drop no longer valid configure arguments (rhbz#1133350)