[packages/xorg-driver-video-fglrx] - updated to crimson 15.12 driver, added linux-4.3.patch for lack of mtrr_ symbols in new kernels,

mguevara mguevara at pld-linux.org
Thu Mar 31 01:26:48 CEST 2016


commit ae6b536b5216d976d8fb66a747c7b86627d36ce0
Author: Marek Guevara Braun <mguevara at pld-linux.org>
Date:   Thu Mar 31 01:21:21 2016 +0200

    - updated to crimson 15.12 driver, added linux-4.3.patch for lack
      of mtrr_ symbols in new kernels, works with 4.4.6-1

 linux-4.2.patch                       | 147 +++-------------------------------
 linux-4.3.patch                       |  24 ++++++
 linux-4.4.patch                       |  12 +--
 xorg-driver-video-fglrx-desktop.patch |  18 +++--
 xorg-driver-video-fglrx.spec          |  33 ++++----
 5 files changed, 65 insertions(+), 169 deletions(-)
---
diff --git a/xorg-driver-video-fglrx.spec b/xorg-driver-video-fglrx.spec
index c4fd927..65eb7a8 100644
--- a/xorg-driver-video-fglrx.spec
+++ b/xorg-driver-video-fglrx.spec
@@ -27,26 +27,27 @@ exit 1
 %define		arch_dir	x86_64
 %endif
 
-%define		intver		15.201.1151
+%define		intver		15.302
+%define		sver		151217a-297685e
 %define		betaver		1.0
 #define		rel		0.beta%{betaver}.3
 
-%define		rel		3
+%define		rel		1
 %define		pname		xorg-driver-video-fglrx
 Summary:	Linux Drivers for AMD/ATI graphics accelerators
 Summary(pl.UTF-8):	Sterowniki do akceleratorów graficznych AMD/ATI
 Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version:	15.9
+Version:	15.12
 Release:	%{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
 Epoch:		1
 License:	AMD Binary (parts are GPL)
 Group:		X11
-# http://support.amd.com/ click through "download drivers", desktop -> radeon hd -> 7xxx -> linux
-#Source0:	http://www2.ati.com/drivers/linux/amd-catalyst-omega-%{version}-linux-run-installers.zip
-Source0:	amd-catalyst-%{version}-linux-installer-%{intver}-x86.x86_64.zip
-# Source0-md5:	d2de2df6946b452c266a3c892e6e46ff
+# http://support.amd.com/en-us/download/linux -> Linux
+# wget --referer=http://support.amd.com/ https://www2.ati.com/drivers/linux/radeon-crimson-15.12-15.302-151217a-297685e.zip
+#Source0:	https://www2.ati.com/drivers/linux/radeon-crimson-15.12-15.302-151217a-297685e.zip
+Source0:	radeon-crimson-%{version}-%{intver}-%{sver}.zip
+# Source0-md5:	39808c8a9bcc9041f1305e3531b60622
 %define		vver	%(echo %{version} | tr . -)
-#Source0:	amd-catalyst-%{vver}-linux-x86-x86-64.zip
 Source1:	atieventsd.init
 Source2:	atieventsd.sysconfig
 Source3:	gl.pc.in
@@ -61,8 +62,8 @@ Patch5:		%{pname}-GPL-only.patch
 Patch6:		%{pname}-intel_iommu.patch
 Patch7:		linux-3.18.18.patch
 Patch8:		linux-4.0.patch
-Patch9:		linux-4.1.patch
-Patch10:	linux-4.2.patch
+Patch9:		linux-4.2.patch
+Patch10:	linux-4.3.patch
 Patch11:	linux-4.4.patch
 URL:		http://ati.amd.com/support/drivers/linux/linux-radeon.html
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -90,15 +91,13 @@ BuildRoot:	%{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
 
 %description
 AMD display driver which allows for hardware accelerated rendering
-with ATI Mobility, FireGL and Desktop GPUs. Some of the Desktop and
-Mobility GPUs supported are the Radeon HD 5xxx series to the
-Radeon HD 7xxx series.
+with Radeon R9 Fury, R9 300, R7 300, R9 200, R7 200, HD 7000, HD 6000,
+HD 5000, and ATI Mobility Radeon.
 
 %description -l pl.UTF-8
 Sterownik AMD umożliwiający sprzętowo akcelerowany rendering do kart
-graficznych ATI Mobility, FireGL i Desktopowych. Niektóre ze
-wspieranych Desktopowych i Mobilnych kart to Radeon HD 5xxx do
-Radeon HD 7xxx.
+graficznych Radeon R9 Fury, R9 300, R7 300, R9 200, R7 200, HD 7000, 
+HD 6000, HD 5000 oraz ATI Mobility Radeon.
 
 %package libs
 Summary:	OpenGL (GL and GLX) ATI/AMD libraries
@@ -215,7 +214,7 @@ cp -pf common/lib/modules/fglrx/build_mod/2.6.x/Makefile common/lib/modules/fglr
 
 %prep
 %setup -q -c
-sh ./AMD-Catalyst-%{version}-Linux-installer-%{intver}-x86.x86_64.run --extract .
+sh ./fglrx-%{intver}/amd-driver-installer-%{intver}-x86.x86_64.run --extract .
 
 cp -p arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/
 cat >>common/lib/modules/fglrx/build_mod/2.6.x/Makefile <<EOF
diff --git a/linux-4.2.patch b/linux-4.2.patch
index 0c68026..96a7b0b 100644
--- a/linux-4.2.patch
+++ b/linux-4.2.patch
@@ -1,25 +1,6 @@
 diff -ur xorg-driver-video-fglrx-15.9.orig/common/lib/modules/fglrx/build_mod/firegl_public.c xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/firegl_public.c
 --- xorg-driver-video-fglrx-15.9.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-27 20:53:27.340395813 +0200
 +++ xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-27 20:54:13.834346677 +0200
-@@ -188,10 +188,18 @@
- #include <linux/string.h>
- #include <linux/gfp.h>
- #include <linux/swap.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+#include <asm/fpu/api.h>
-+#else
- #include "asm/i387.h"
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+#include <asm/fpu/internal.h>
-+#else
- #include <asm/fpu-internal.h>
- #endif
-+#endif
- 
- #include "firegl_public.h"
- #include "kcl_osconfig.h"
 @@ -620,8 +628,13 @@
  
      len = snprintf(buf, request, "%d\n", major);
@@ -44,19 +25,6 @@ diff -ur xorg-driver-video-fglrx-15.9.orig/common/lib/modules/fglrx/build_mod/fi
  static inline 
  unsigned long __fgl_cmpxchg(volatile void *ptr, unsigned long old,            
                          unsigned long new, int size)                      
-@@ -1739,7 +1755,11 @@
-          unsigned long new, int size)
- {
- #ifndef __HAVE_ARCH_CMPXCHG
--    return __fgl_cmpxchg(ptr,old,new,size);
-+#if defined(__i386__)
-+     return __fgl_cmpxchg(ptr,old,new,size);
-+#elif defined(__x86_64__)
-+    return cmpxchg((unsigned long*)ptr,old,new);
-+#endif
- #else
-     /* On kernel version 2.6.34 passing a variable or unsupported size
-      * argument to the __cmpxchg macro causes the default-clause of a
 @@ -6422,6 +6442,48 @@
      return i;
  }
@@ -106,111 +74,14 @@ diff -ur xorg-driver-video-fglrx-15.9.orig/common/lib/modules/fglrx/build_mod/fi
  /** \brief Generate UUID
   *  \param buf pointer to the generated UUID
   *  \return None
-@@ -6437,21 +6499,36 @@
-    struct fpu *fpu = &tsk->thread.fpu;
- 
-    if(static_cpu_has(X86_FEATURE_XSAVE)) {
--      fpu_xsave(fpu);
--      if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
--	 return 1;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-+       fpu_xsave(fpu);
-+       if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
-+#else
-+      _copy_xregs_to_kernel(&fpu->state.xsave);
-+      if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
-+#endif
-+	return 1;
-    } else if (static_cpu_has(X86_FEATURE_FXSR)) {
--	 fpu_fxsave(fpu);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-+         fpu_fxsave(fpu);
-+#else
-+     copy_fxregs_to_kernel(fpu);
-+#endif
-    } else {
--	 asm volatile("fnsave %[fx]; fwait"
-+	asm volatile("fnsave %[fx]; fwait"
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-                   : [fx] "=m" (fpu->state->fsave));
--	 return 0;
-+#else
-+                  : [fx] "=m" (fpu->state.fsave));
-+#endif
-+	return 0;
-    }
- 
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-    if (unlikely(fpu->state->fxsave.swd & X87_FSW_ES)) {
- 	asm volatile("fnclex");
- 	return 0;
-    }
-+#endif
-    return 1;
- }
- #endif
-@@ -6463,7 +6540,11 @@
- void ATI_API_CALL KCL_fpu_begin(void)
- {
- #ifdef CONFIG_X86_64
--    kernel_fpu_begin();
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-+     kernel_fpu_begin();
-+#else
-+    __kernel_fpu_begin();
-+#endif
- #else
- #ifdef TS_USEDFPU
-     struct thread_info *cur_thread = current_thread_info();
-@@ -6473,8 +6554,12 @@
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
-          KCL_fpu_save_init(cur_task);
- #else
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+         copy_fpregs_to_fpstate(&cur_task->thread.fpu);
-+#else
-          __save_init_fpu(cur_task);
- #endif
-+#endif
-     else
-          clts();
- 
-@@ -6488,15 +6573,24 @@
-     /* The thread structure is changed with the commit below for kernel 3.3:
-      * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8
-      */
--    if (cur_task->thread.fpu.has_fpu)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+	if (cur_task->thread.fpu.fpregs_active)
-+#else
-+	if (cur_task->thread.fpu.has_fpu)
-+#endif
-+
- #else
-     if (cur_task->thread.has_fpu)
- #endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
-         KCL_fpu_save_init(cur_task);
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-03-30 23:11:47.406938094 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-03-30 23:35:12.447181546 +0200
+@@ -6501,7 +6501,7 @@
+       fpu_xsave(fpu);
+       if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
  #else
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+        copy_fpregs_to_fpstate(&cur_task->thread.fpu);
-+#else
-         __save_init_fpu(cur_task);
+-	  copy_xregs_to_kernel(&fpu->state.xsave);
++	  _copy_xregs_to_kernel(&fpu->state.xsave);
+       if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
  #endif
-+#endif
-     else
-          clts();
- #endif
-@@ -6509,7 +6603,11 @@
-  */
- void ATI_API_CALL KCL_fpu_end(void)
- {
--    kernel_fpu_end();
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-+     kernel_fpu_end();
-+#else
-+    __kernel_fpu_end();
-+#endif
- }
- 
- /** Create new directory entry under "/proc/...."
+          return 1;
diff --git a/linux-4.3.patch b/linux-4.3.patch
new file mode 100644
index 0000000..5ae4ddc
--- /dev/null
+++ b/linux-4.3.patch
@@ -0,0 +1,24 @@
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-03-30 23:56:14.715694577 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-03-31 01:06:16.005480115 +0200
+@@ -133,6 +133,9 @@
+ #include <asm/processor.h>
+ #include <asm/tlbflush.h> // for flush_tlb_page
+ #include <asm/cpufeature.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++#undef CONFIG_MTRR
++#endif
+ #ifdef CONFIG_MTRR
+ #include <asm/mtrr.h>
+ #endif
+--- a/common/lib/modules/fglrx/build_mod/drmP.h	2015-12-18 19:47:41.000000000 +0100
++++ b/common/lib/modules/fglrx/build_mod/drmP.h	2016-03-31 01:04:39.860408168 +0200
+@@ -65,6 +65,9 @@
+ #include <asm/io.h>
+ #include <asm/mman.h>
+ #include <asm/uaccess.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++#undef CONFIG_MTRR
++#endif
+ #ifdef CONFIG_MTRR
+ #include <asm/mtrr.h>
+ #endif
diff --git a/linux-4.4.patch b/linux-4.4.patch
index 91078e4..541eaf6 100644
--- a/linux-4.4.patch
+++ b/linux-4.4.patch
@@ -1,14 +1,14 @@
---- xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/firegl_public.c~	2016-01-25 00:43:16.000000000 +0100
-+++ xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-01-25 00:45:05.769641394 +0100
-@@ -6504,7 +6504,11 @@
-        if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+--- xorg-driver-video-radeon-crimson-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c.b	2016-03-30 21:53:04.123817514 +0200
++++ xorg-driver-video-radeon-crimson-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-03-30 21:54:42.922113915 +0200
+@@ -6452,7 +6452,11 @@
+       if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
  #else
-       _copy_xregs_to_kernel(&fpu->state.xsave);
+ 	  _copy_xregs_to_kernel(&fpu->state.xsave);
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)
        if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
 +#else
 +      if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP))
 +#endif
  #endif
- 	return 1;
+          return 1;
     } else if (static_cpu_has(X86_FEATURE_FXSR)) {
diff --git a/xorg-driver-video-fglrx-desktop.patch b/xorg-driver-video-fglrx-desktop.patch
index c782043..41de880 100644
--- a/xorg-driver-video-fglrx-desktop.patch
+++ b/xorg-driver-video-fglrx-desktop.patch
@@ -1,5 +1,6 @@
---- xorg-driver-video-fglrx-10.6/common/usr/share/applications/amdcccle.desktop~	2010-06-03 16:23:55.000000000 +0200
-+++ xorg-driver-video-fglrx-10.6/common/usr/share/applications/amdcccle.desktop	2010-07-17 16:11:07.402132883 +0200
+diff -ru --minimal xorg-driver-video-radeon-crimson-15.12.orig/common/usr/share/applications/amdcccle.desktop xorg-driver-video-radeon-crimson-15.12/common/usr/share/applications/amdcccle.desktop
+--- xorg-driver-video-radeon-crimson-15.12.orig/common/usr/share/applications/amdcccle.desktop	2015-12-18 19:47:41.000000000 +0100
++++ xorg-driver-video-radeon-crimson-15.12/common/usr/share/applications/amdcccle.desktop	2016-03-30 20:00:13.956159567 +0200
 @@ -3,9 +3,8 @@
  Type=Application
  Exec=amdcccle
@@ -9,11 +10,12 @@
 -
 +Terminal=false
 +Categories=Qt;HardwareSettings;Settings;
- Name=AMD Catalyst Control Center
+ Name=AMD Control Center
  Comment=Allows the configuration of the AMD graphics hardware settings.
- Name[cs]=AMD Catalyst Control Center
---- xorg-driver-video-fglrx-10.6/common/usr/share/applications/amdccclesu.desktop~	2010-06-03 16:23:55.000000000 +0200
-+++ xorg-driver-video-fglrx-10.6/common/usr/share/applications/amdccclesu.desktop	2010-07-17 16:11:32.434382244 +0200
+ Name[cs]=AMD Control Center
+diff -ru --minimal xorg-driver-video-radeon-crimson-15.12.orig/common/usr/share/applications/amdccclesu.desktop xorg-driver-video-radeon-crimson-15.12/common/usr/share/applications/amdccclesu.desktop
+--- xorg-driver-video-radeon-crimson-15.12.orig/common/usr/share/applications/amdccclesu.desktop	2015-12-18 19:47:41.000000000 +0100
++++ xorg-driver-video-radeon-crimson-15.12/common/usr/share/applications/amdccclesu.desktop	2016-03-30 19:59:02.468312469 +0200
 @@ -2,9 +2,9 @@
  Encoding=UTF-8
  Type=Application
@@ -23,6 +25,6 @@
  Icon=ccc_large
 -
 +Terminal=false
- Name=AMD Catalyst Control Center (Administrative)
+ Name=AMD Control Center (Administrative)
  Comment=Allows the configuration of the AMD graphics hardware settings that requires administrative access.
- Name[cs]=AMD Catalyst Control Center (správce)
+ Name[cs]=AMD Control Center (správce)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-fglrx.git/commitdiff/ae6b536b5216d976d8fb66a747c7b86627d36ce0



More information about the pld-cvs-commit mailing list