diff --git a/.gitignore b/.gitignore index 190d5c1..cd9fee1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/xf86-video-ati-20160215.tar.xz +SOURCES/xf86-video-ati-20160928.tar.xz diff --git a/.xorg-x11-drv-ati.metadata b/.xorg-x11-drv-ati.metadata index 1623f5e..f8647d0 100644 --- a/.xorg-x11-drv-ati.metadata +++ b/.xorg-x11-drv-ati.metadata @@ -1 +1 @@ -eb4149da4dff28c449be7bdb355bf712f599cc9e SOURCES/xf86-video-ati-20160215.tar.xz +822949183a2e14747ecdc02067d4fa4d010c1ebf SOURCES/xf86-video-ati-20160928.tar.xz diff --git a/SOURCES/0001-modesetting-Validate-the-atom-for-enum-properties.patch b/SOURCES/0001-modesetting-Validate-the-atom-for-enum-properties.patch new file mode 100644 index 0000000..646b16e --- /dev/null +++ b/SOURCES/0001-modesetting-Validate-the-atom-for-enum-properties.patch @@ -0,0 +1,37 @@ +From ef95e3a3cc9189c8906fe5b4d70bfa9f1055d7ce Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 13 Jun 2017 09:32:44 -0400 +Subject: [PATCH] modesetting: Validate the atom for enum properties +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The client could have said anything here, and if what they said doesn't +actually name an atom NameForAtom() will return NULL, and strcmp() will +be unhappy about that. + +[copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc] + +Signed-off-by: Adam Jackson +Reviewed-and-Tested-by: Michel Dänzer +--- + src/drmmode_display.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/drmmode_display.c b/src/drmmode_display.c +index d0ecfa85..9deaa575 100644 +--- a/src/drmmode_display.c ++++ b/src/drmmode_display.c +@@ -1685,7 +1685,8 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, + if (value->type != XA_ATOM || value->format != 32 || value->size != 1) + return FALSE; + memcpy(&atom, value->data, 4); +- name = NameForAtom(atom); ++ if (!(name = NameForAtom(atom))) ++ return FALSE; + + /* search for matching name string, then set its value down */ + for (j = 0; j < p->mode_prop->count_enums; j++) { +-- +2.13.0 + diff --git a/SOURCES/fix-dri-removal.patch b/SOURCES/fix-dri-removal.patch new file mode 100644 index 0000000..83386fe --- /dev/null +++ b/SOURCES/fix-dri-removal.patch @@ -0,0 +1,103 @@ +diff --git a/src/drmmode_display.c b/src/drmmode_display.c +index 2258e7a..4571bf0 100644 +--- a/src/drmmode_display.c ++++ b/src/drmmode_display.c +@@ -44,7 +44,8 @@ + #include "radeon_reg.h" + + #ifdef RADEON_PIXMAP_SHARING +-#include ++#include ++#include "radeon_dri2.h" + #endif + + #include "drmmode_display.h" +@@ -2409,7 +2410,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp) + drmmode_clones_init(pScrn, drmmode, mode_res); + + #ifdef RADEON_PIXMAP_SHARING +- bus_id_string = DRICreatePCIBusID(info->PciInfo); ++ bus_id_string = radeon_dri2_create_pci_bus_id(info->PciInfo); + XNFasprintf(&provider_name, "%s @ %s", pScrn->chipset, bus_id_string); + free(bus_id_string); + xf86ProviderSetup(pScrn, NULL, provider_name); +diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c +index d0dcf89..0996425 100644 +--- a/src/radeon_dri2.c ++++ b/src/radeon_dri2.c +@@ -1563,5 +1563,18 @@ void radeon_dri2_close_screen(ScreenPtr pScreen) + drmFree(info->dri2.device_name); + } + ++/* DRI provided a function for this but DRI2 doesn't, so define here */ ++char *radeon_dri2_create_pci_bus_id(const struct pci_device *pci_dev) ++{ ++ char *bus_id; ++ ++ if (asprintf(&bus_id, "pci:%04x:%02x:%02x.%d", ++ pci_dev->domain, pci_dev->bus, pci_dev->dev, ++ pci_dev->func) == -1) ++ return NULL; ++ ++ return bus_id; ++} ++ + #endif /* DRI2 */ + +diff --git a/src/radeon_dri2.h b/src/radeon_dri2.h +index 9ba47c7..84f972d 100644 +--- a/src/radeon_dri2.h ++++ b/src/radeon_dri2.h +@@ -42,11 +42,13 @@ struct radeon_dri2 { + #include "dri2.h" + Bool radeon_dri2_screen_init(ScreenPtr pScreen); + void radeon_dri2_close_screen(ScreenPtr pScreen); ++char *radeon_dri2_create_pci_bus_id(const struct pci_device *pci_dev); + + #else + + static inline Bool radeon_dri2_screen_init(ScreenPtr pScreen) { return FALSE; } + static inline void radeon_dri2_close_screen(ScreenPtr pScreen) {} ++static inline char *radeon_dri2_create_pci_bus_id(const struct pci_device *pci_dev) {} + + #endif + +diff --git a/src/radeon_probe.c b/src/radeon_probe.c +index aaace2b..f57dd84 100644 +--- a/src/radeon_probe.c ++++ b/src/radeon_probe.c +@@ -47,8 +47,9 @@ + + #include "xf86.h" + ++#include "xf86drm.h" + #include "xf86drmMode.h" +-#include "dri.h" ++#include "dri2.h" + + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + #include +@@ -64,6 +65,8 @@ + + #include "radeon_pci_device_match_gen.h" + ++#include "radeon_dri2.h" ++ + _X_EXPORT int gRADEONEntityIndex = -1; + + /* Return the options for supported chipset 'n'; NULL otherwise */ +@@ -88,13 +91,7 @@ static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci + char *busIdString; + int ret; + +- if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) { +- xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, +- "[KMS] No DRICreatePCIBusID symbol, no kernel modesetting.\n"); +- return FALSE; +- } +- +- busIdString = DRICreatePCIBusID(pci_dev); ++ busIdString = radeon_dri2_create_pci_bus_id(pci_dev); + ret = drmCheckModesettingSupported(busIdString); + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + if (ret) { diff --git a/SPECS/xorg-x11-drv-ati.spec b/SPECS/xorg-x11-drv-ati.spec index 2ab5272..43c48a1 100644 --- a/SPECS/xorg-x11-drv-ati.spec +++ b/SPECS/xorg-x11-drv-ati.spec @@ -1,8 +1,8 @@ %global tarball xf86-video-ati %global moduledir %(pkg-config xorg-server --variable=moduledir ) %global driverdir %{moduledir}/drivers -%global gitdate 20160215 -%global gitversion d41fccc +%global gitdate 20160928 +%global gitversion 3fc839ff %undefine _hardened_build @@ -12,7 +12,7 @@ Summary: Xorg X11 ati video driver Name: xorg-x11-drv-ati -Version: 7.6.1 +Version: 7.7.1 Release: 3%{?gver}%{?dist} URL: http://www.x.org License: MIT @@ -21,8 +21,10 @@ Group: User Interface/X Hardware Support #Source0: http://www.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2 Source0: %{tarball}-%{gitdate}.tar.xz +Patch1: fix-dri-removal.patch Patch10: radeon-6.12.2-lvds-default-modes.patch Patch13: fix-default-modes.patch +Patch14: 0001-modesetting-Validate-the-atom-for-enum-properties.patch ExcludeArch: s390 s390x @@ -45,8 +47,10 @@ X.Org X11 ati video driver. %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{?!gitdate:%{version}} +%patch1 -p1 -b .fix-dri %patch10 -p1 -b .lvds %patch13 -p1 -b .def +%patch14 -p1 -b .enum %build autoreconf -iv @@ -71,11 +75,52 @@ rm -rf $RPM_BUILD_ROOT%{moduledir}/multimedia/ %{_mandir}/man4/radeon.4* %changelog -* Thu Jun 9 2016 Lyude Paul - 7.6.1-3 -- Merge F23 +* Mon Jun 19 2017 Adam Jackson - 7.7.1-3 +- Validate RANDR output property atoms -* Thu Feb 12 2015 Jérôme Glisse - 7.5.0-3 -- Drop xorg-x11-glamor dependency +* Mon Feb 20 2017 Lyude Paul 7.7.1-2 +- Fix more breakage from removing DRI1 + +* Wed Sep 28 2016 Hans de Goede 7.7.1-1 +- Update to latest git, this is the equivalent of 7.7.1 + fixes for use + with xserver-1.19 (rhbz#1325613) +- Rebuild against xserver-1.19 + +* Wed May 18 2016 Dave Airlie 7.7.0-1 +- Update to latest git. + +* Mon Feb 15 2016 Dave Airlie 7.6.1-3 +- update to latest git snapshot + +* Fri Feb 05 2016 Fedora Release Engineering - 7.6.1-2.20151116gitdfb5277 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 20 2016 Peter Hutterer +- s/define/global/ + +* Mon Nov 16 2015 Dave Airlie 7.6.1-1 +- 7.6.1 release git snapshot + +* Wed Sep 16 2015 Dave Airlie - 7.6.0-0.4.20150729git5510cd6 +- 1.18 ABI rebuild + +* Wed Jul 29 2015 Dave Airlie 7.6.0-0.3.20150729git5510cd6 +- git snapshot for new ABI + +* Wed Jul 29 2015 Dave Airlie - 7.6.0-0.2.20150709git95f5d09 +- 1.15 ABI rebuild + +* Thu Jul 09 2015 Dave Airlie 7.6.0-0.1 +- git snapshot of the day. + +* Fri Jun 19 2015 Fedora Release Engineering - 7.5.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Mar 02 2015 Dave Airlie 7.5.0-4 +- kill hardended builds harder + +* Mon Mar 02 2015 Dave Airlie 7.5.0-3 +- kill hardended builds for X.org * Wed Feb 11 2015 Hans de Goede - 7.5.0-2 - xserver 1.17 ABI rebuild