From 7e9456a372a83510444393af121165042a28c30c Mon Sep 17 00:00:00 2001 From: guibuilder_pel7x64builder0 Date: Fri, 5 Oct 2018 11:53:13 +0200 Subject: [PATCH] xorg-x11-drv-ati package update Signed-off-by: guibuilder_pel7x64builder0 --- SOURCES/fix-default-modes.patch | 12 + SOURCES/fix-dri-removal.patch | 97 ++++++++ .../radeon-6.12.2-lvds-default-modes.patch | 53 +++++ SPECS/xorg-x11-drv-ati.spec | 210 ++++++++++++++++++ 4 files changed, 372 insertions(+) create mode 100644 SOURCES/fix-default-modes.patch create mode 100644 SOURCES/fix-dri-removal.patch create mode 100644 SOURCES/radeon-6.12.2-lvds-default-modes.patch create mode 100644 SPECS/xorg-x11-drv-ati.spec diff --git a/SOURCES/fix-default-modes.patch b/SOURCES/fix-default-modes.patch new file mode 100644 index 0000000..02c381a --- /dev/null +++ b/SOURCES/fix-default-modes.patch @@ -0,0 +1,12 @@ +diff -up xf86-video-ati-6.12.2/src/drmmode_display.c.da xf86-video-ati-6.12.2/src/drmmode_display.c +--- xf86-video-ati-6.12.2/src/drmmode_display.c.da 2009-06-22 12:21:21.000000000 +1000 ++++ xf86-video-ati-6.12.2/src/drmmode_display.c 2009-06-22 12:21:30.000000000 +1000 +@@ -593,7 +593,7 @@ drmmode_output_get_modes(xf86OutputPtr o + max_vrefresh = max(max_vrefresh, 60.0); + max_vrefresh *= (1 + SYNC_TOLERANCE); + +- m = xf86GetDefaultModes(FALSE, FALSE); ++ m = xf86GetDefaultModes(); + + xf86ValidateModesSize(output->scrn, m, max_x, max_y, 0); + for (i = m; i; i = i->next) { diff --git a/SOURCES/fix-dri-removal.patch b/SOURCES/fix-dri-removal.patch new file mode 100644 index 0000000..8ced573 --- /dev/null +++ b/SOURCES/fix-dri-removal.patch @@ -0,0 +1,97 @@ +diff -up xf86-video-ati-7.10.0/src/drmmode_display.c.jx xf86-video-ati-7.10.0/src/drmmode_display.c +--- xf86-video-ati-7.10.0/src/drmmode_display.c.jx 2017-09-14 14:29:43.180486543 -0400 ++++ xf86-video-ati-7.10.0/src/drmmode_display.c 2017-09-14 14:30:28.008914457 -0400 +@@ -44,6 +44,8 @@ + #include "radeon_reg.h" + + #include ++#include ++#include "radeon_dri2.h" + + #include "drmmode_display.h" + +@@ -2554,7 +2556,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, + /* workout clones */ + drmmode_clones_init(pScrn, drmmode, mode_res); + +- 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 -up xf86-video-ati-7.10.0/src/radeon_dri2.c.jx xf86-video-ati-7.10.0/src/radeon_dri2.c +--- xf86-video-ati-7.10.0/src/radeon_dri2.c.jx 2017-09-08 04:09:39.000000000 -0400 ++++ xf86-video-ati-7.10.0/src/radeon_dri2.c 2017-09-14 14:29:43.181486552 -0400 +@@ -1484,5 +1484,18 @@ void radeon_dri2_close_screen(ScreenPtr + 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 -up xf86-video-ati-7.10.0/src/radeon_dri2.h.jx xf86-video-ati-7.10.0/src/radeon_dri2.h +--- xf86-video-ati-7.10.0/src/radeon_dri2.h.jx 2017-09-08 04:09:39.000000000 -0400 ++++ xf86-video-ati-7.10.0/src/radeon_dri2.h 2017-09-14 14:29:43.181486552 -0400 +@@ -41,11 +41,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 -up xf86-video-ati-7.10.0/src/radeon_probe.c.jx xf86-video-ati-7.10.0/src/radeon_probe.c +--- xf86-video-ati-7.10.0/src/radeon_probe.c.jx 2017-09-08 04:09:39.000000000 -0400 ++++ xf86-video-ati-7.10.0/src/radeon_probe.c 2017-09-14 14:31:00.583224457 -0400 +@@ -47,7 +47,9 @@ + + #include "xf86.h" + ++#include "xf86drm.h" + #include "xf86drmMode.h" ++#include "dri2.h" + + #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,19,99,1,0) + #include +@@ -69,6 +71,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 */ +@@ -93,13 +97,7 @@ static Bool radeon_kernel_mode_enabled(S + 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/SOURCES/radeon-6.12.2-lvds-default-modes.patch b/SOURCES/radeon-6.12.2-lvds-default-modes.patch new file mode 100644 index 0000000..e5a1583 --- /dev/null +++ b/SOURCES/radeon-6.12.2-lvds-default-modes.patch @@ -0,0 +1,53 @@ +diff -up xf86-video-ati-6.12.2/src/drmmode_display.c.lvds xf86-video-ati-6.12.2/src/drmmode_display.c +--- xf86-video-ati-6.12.2/src/drmmode_display.c.lvds 2009-05-07 13:13:43.000000000 -0400 ++++ xf86-video-ati-6.12.2/src/drmmode_display.c 2009-05-07 13:39:10.000000000 -0400 +@@ -568,6 +568,49 @@ drmmode_output_get_modes(xf86OutputPtr o + Modes = xf86ModesAdd(Modes, Mode); + + } ++ ++ /* ++ * LVDS can scale. If there's no EDID, or if it claims not to be ++ * continuous-freq, then add the default modes so we get 800x600 ++ * and friends. ++ */ ++ if (strstr(output->name, "LVDS")) { ++ xf86MonPtr mon = output->MonInfo; ++ if (!mon || !GTF_SUPPORTED(mon->features.msc)) { ++ DisplayModePtr m, i, p = NULL; ++ int max_x = 0, max_y = 0; ++ float max_vrefresh = 0.0; ++ ++ for (m = Modes; m; m = m->next) { ++ if (m->type & M_T_PREFERRED) ++ p = m; ++ max_x = max(max_x, m->HDisplay); ++ max_y = max(max_y, m->VDisplay); ++ max_vrefresh = max(max_vrefresh, ++ xf86ModeVRefresh(m)); ++ } ++ ++ max_vrefresh = max(max_vrefresh, 60.0); ++ max_vrefresh *= (1 + SYNC_TOLERANCE); ++ ++ m = xf86GetDefaultModes(FALSE, FALSE); ++ ++ xf86ValidateModesSize(output->scrn, m, max_x, max_y, 0); ++ for (i = m; i; i = i->next) { ++ if (xf86ModeVRefresh(i) > max_vrefresh) ++ i->status = MODE_VSYNC; ++ if (p && i->HDisplay >= p->HDisplay && ++ i->VDisplay >= p->VDisplay && ++ xf86ModeVRefresh(i) >= xf86ModeVRefresh(p)) ++ i->status = MODE_VSYNC; ++ } ++ ++ xf86PruneInvalidModes(output->scrn, &m, FALSE); ++ ++ Modes = xf86ModesAdd(Modes, m); ++ } ++ } ++ + return Modes; + } + diff --git a/SPECS/xorg-x11-drv-ati.spec b/SPECS/xorg-x11-drv-ati.spec new file mode 100644 index 0000000..a77f279 --- /dev/null +++ b/SPECS/xorg-x11-drv-ati.spec @@ -0,0 +1,210 @@ +%global tarball xf86-video-ati +%global moduledir %(pkg-config xorg-server --variable=moduledir ) +%global driverdir %{moduledir}/drivers +#global gitdate 20160928 +#global gitversion 3fc839ff + +%undefine _hardened_build + +%if 0%{?gitdate} +%global gver .%{gitdate}git%{gitversion} +%endif + +Summary: Xorg X11 ati video driver +Name: xorg-x11-drv-ati +Version: 7.10.0 +Release: 1%{?gver}%{?dist} +URL: http://www.x.org +License: MIT +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 + +ExcludeArch: s390 s390x + +BuildRequires: python +BuildRequires: xorg-x11-server-devel >= 1.17.0 +BuildRequires: mesa-libGL-devel >= 9.2-1 +BuildRequires: libdrm-devel >= 2.4.78 +BuildRequires: kernel-headers >= 3.10.0-31 +BuildRequires: automake autoconf libtool pkgconfig +BuildRequires: xorg-x11-util-macros >= 1.17-3 +BuildRequires: systemd-devel +BuildRequires: xorg-x11-glamor-devel + +Requires: Xorg %(xserver-sdk-abi-requires ansic) +Requires: Xorg %(xserver-sdk-abi-requires videodrv) +Requires: libdrm >= 2.4.47-1 + +%description +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 + +%build +autoreconf -iv +%ifarch ppc ppc64 ppc64le +%configure --disable-static --disable-glamor +%else +%configure --disable-static --enable-glamor +%endif +make %{?_smp_mflags} + +%install +%make_install +find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f -- + +# these only work in UMS, which is not supported +rm -rf $RPM_BUILD_ROOT%{moduledir}/multimedia/ + +%files +%{_datadir}/X11/xorg.conf.d/10-radeon.conf +%{driverdir}/ati_drv.so +%{driverdir}/radeon_drv.so +%{_mandir}/man4/ati.4* +%{_mandir}/man4/radeon.4* + +%changelog +* Mon Oct 09 2017 Adam Jackson - 7.10.0-1 +- ati 7.10.0 + +* Mon Jun 19 2017 Adam Jackson - 7.7.1-3 +- Validate RANDR output property atoms + +* 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 + +* Fri Oct 10 2014 Adam Jackson 7.5.0-1 +- ati 7.5.0 + +* Mon Aug 18 2014 Fedora Release Engineering - 7.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Jul 28 2014 Hans de Goede - 7.4.0-2 +- Fix FTBFS with xorg-server-1.16.0 + +* Wed Jul 2 2014 Hans de Goede - 7.4.0-1 +- Update to 7.4.0 (rhbz#907141) + +* Mon Jun 16 2014 Hans de Goede - 7.4.0-0.4.20140419git48d3dbc +- xserver 1.15.99.903 ABI rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 7.4.0-0.3.20140419git48d3dbc +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Apr 28 2014 Hans de Goede - 7.4.0-0.2.20140419git48d3dbc +- xserver 1.15.99-20140428 git snapshot ABI rebuild + +* Sat Apr 19 2014 Dave Airlie 7.4.0-0.1 +- latest upstream git snapshot + +* Mon Jan 13 2014 Adam Jackson - 7.2.0-7.20131101git3b38701 +- 1.15 ABI rebuild + +* Tue Dec 17 2013 Adam Jackson - 7.2.0-6.20131101git3b38701 +- 1.15RC4 ABI rebuild + +* Wed Nov 20 2013 Adam Jackson - 7.2.0-5.20131101git3b38701 +- 1.15RC2 ABI rebuild + +* Wed Nov 06 2013 Adam Jackson - 7.2.0-4.20131101git3b38701 +- 1.15RC1 ABI rebuild + +* Fri Nov 01 2013 Jerome Glisse - 7.2.0-3 +- Update to lastest upstream git snapshot + +* Fri Oct 25 2013 Jerome Glisse - 7.2.0-2 +- Fix gnome-shell rendering issue with radeonsi + +* Fri Oct 25 2013 Adam Jackson - 7.2.0-1 +- ABI rebuild + +* Thu Aug 29 2013 Dave Airlie 7.2.0-0 +- update to latest upstream release 7.2.0 + +* Sun Aug 04 2013 Fedora Release Engineering - 7.1.0-6.20130408git6e74aacc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Apr 11 2013 Jerome Glisse 7.1.0-5 +- No need to patch for enabling glamor with git snapshot + +* Mon Apr 08 2013 Jerome Glisse 7.1.0-4 +- Git snapshot +- Enable glamor acceleration for southern island GPU + +* Tue Mar 19 2013 Adam Jackson 7.1.0-3 +- Less RHEL customization + +* Thu Mar 07 2013 Peter Hutterer - 7.1.0-2 +- ABI rebuild + +* Tue Feb 26 2013 Adam Jackson 7.1.0-1 +- ati 7.1.0 + +* Fri Feb 15 2013 Peter Hutterer - 7.0.0-0.10.20121015gitbd9e2c064 +- ABI rebuild + +* Fri Feb 15 2013 Peter Hutterer - 7.0.0-0.9.20121015gitbd9e2c064 +- ABI rebuild + +* Thu Nov 15 2012 Jerome Glisse 7.0.0-0.8.20121015gitbd9e2c064 +- fix dri2 segfault #872536 + +* Mon Oct 15 2012 Dave Airlie 7.0.0-0.7.20121015gitbd9e2c064 +- fix issue with damage when using offload or sw cursor + +* Mon Sep 10 2012 Dave Airlie 7.0.0-0.6.20120910git7c7f27756 +- make sure driver loads on outputless GPUs