[packages/xorg-driver-video-fglrx] - up to 15.9

baggins baggins at pld-linux.org
Sun Sep 27 20:16:40 CEST 2015


commit 7cfd090d13fdff9e5decb286ee38b9c6e8f93d28
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Sep 27 20:16:23 2015 +0200

    - up to 15.9

 linux-3.18.18.patch          |  23 ++----
 linux-3.19.patch             |  28 -------
 linux-4.0.patch              |  56 --------------
 linux-4.1.patch              |   4 +-
 linux-4.2.patch              | 174 +++++++++++++++++++++++++++++++++++++++++++
 xorg-driver-video-fglrx.spec |  25 +++----
 6 files changed, 196 insertions(+), 114 deletions(-)
---
diff --git a/xorg-driver-video-fglrx.spec b/xorg-driver-video-fglrx.spec
index df2d5b9..1a6ad66 100644
--- a/xorg-driver-video-fglrx.spec
+++ b/xorg-driver-video-fglrx.spec
@@ -27,24 +27,24 @@ exit 1
 %define		arch_dir	x86_64
 %endif
 
-%define		intver		14.501.1003
+%define		intver		15.201.1151
 %define		betaver		1.0
 #define		rel		0.beta%{betaver}.3
 
-%define		rel		5
+%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.5
+Version:	15.9
 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-omega-%{version}-linux-run-installers.zip
-# Source0-md5:	979f9f2e0948fa6e92ff0125f5c6b575
+Source0:	amd-catalyst-%{version}-linux-installer-%{intver}-x86.x86_64.zip
+# Source0-md5:	d2de2df6946b452c266a3c892e6e46ff
 %define		vver	%(echo %{version} | tr . -)
 #Source0:	amd-catalyst-%{vver}-linux-x86-x86-64.zip
 Source1:	atieventsd.init
@@ -60,16 +60,16 @@ Patch4:		%{pname}-nofinger.patch
 Patch5:		%{pname}-GPL-only.patch
 Patch6:		%{pname}-intel_iommu.patch
 Patch7:		linux-3.18.18.patch
-Patch8:		linux-3.19.patch
-Patch9:		linux-4.0.patch
-Patch10:	linux-4.1.patch
+Patch8:		linux-4.0.patch
+Patch9:		linux-4.1.patch
+Patch10:	linux-4.2.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}}
 BuildRequires:	rpmbuild(macros) >= 1.701
 BuildRequires:	sed >= 4.0
 Requires:	%{pname}-libs = %{epoch}:%{version}-%{rel}
 Requires:	xorg-xserver-server
-Requires:	xorg-xserver-server(videodrv-abi) <= 18.0
+Requires:	xorg-xserver-server(videodrv-abi) <= 19.0
 Requires:	xorg-xserver-server(videodrv-abi) >= 2.0
 Suggests:	kernel-video-firegl
 Provides:	xorg-driver-video
@@ -214,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-omega-%{version}-linux-run-installers.run --extract .
+sh ./AMD-Catalyst-%{version}-Linux-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
@@ -230,8 +230,8 @@ EOF
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-%patch8 -p1
-%patch9 -p2
+%patch8 -p2
+%patch9 -p1
 %patch10 -p1
 
 install -d common{%{_prefix}/{%{_lib},bin,sbin},/etc}
@@ -372,7 +372,6 @@ fi
 %attr(755,root,root) %ghost %{_libdir}/fglrx/libXvBAW.so.1
 %{_libdir}/fglrx/libAMDXvBA.cap
 %attr(755,root,root) %{_libdir}/fglrx/libamdocl*.so
-%attr(755,root,root) %{_libdir}/fglrx/libamdhsasc*.so
 %attr(755,root,root) %{_libdir}/fglrx/libatiadlxx.so
 %attr(755,root,root) %{_libdir}/fglrx/libaticalcl.so
 %attr(755,root,root) %{_libdir}/fglrx/libaticaldd.so
diff --git a/linux-3.18.18.patch b/linux-3.18.18.patch
index 3dcc892..c64ebcc 100644
--- a/linux-3.18.18.patch
+++ b/linux-3.18.18.patch
@@ -1,18 +1,11 @@
-diff -uNr 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c
---- 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2014-09-09 16:10:17.000000000 +0200
-+++ 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2014-09-26 18:57:27.000000000 +0200
-@@ -863,7 +863,13 @@
+--- xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c~	2015-09-09 00:57:14.000000000 +0200
++++ xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2015-09-27 20:07:48.178933429 +0200
+@@ -868,7 +868,7 @@
  #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
      if(pdev)
      {
--       pci_ignore_hotplug(pdev);
-+//	pci_ignore_hotplug(pdev);
-+	struct pci_dev *bridge = pdev->bus->self;
-+
-+	pdev->ignore_hotplug = 1;
-+	/* Propagate the "ignore hotplug" setting to the parent bridge. */
-+	if (bridge)
-+		bridge->ignore_hotplug = 1;
-     }
- #endif
- }
+-#if (UTS_UBUNTU_RELEASE_ABI < 0 && LINUX_VERSION_CODE < KERNEL_VERSION(4,1,3)) || (UTS_UBUNTU_RELEASE_ABI >= 0 && UTS_UBUNTU_RELEASE_ABI < 26 && LINUX_VERSION_CODE <= KERNEL_VERSION(3,19,8))
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,18)
+        pci_ignore_hotplug(pdev);
+ #else
+        pdev->ignore_hotplug = 1;
diff --git a/linux-3.19.patch b/linux-3.19.patch
deleted file mode 100644
index 9f2ccbe..0000000
--- a/linux-3.19.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c.orig	2015-03-30 21:42:57.000000000 +0200
-+++ fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-03-30 21:47:52.302266695 +0200
-@@ -4816,8 +4816,13 @@
- {
-     unsigned long orig_level;
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
-+    orig_level = __this_cpu_read(kasExecutionLevel);
-+    __this_cpu_write(kasExecutionLevel, level);
-+#else
-     orig_level = __get_cpu_var(kasExecutionLevel);
-     __get_cpu_var(kasExecutionLevel) = level;
-+#endif
- 
-     return orig_level;
- }
-@@ -4829,7 +4834,11 @@
-  */
- static unsigned long kas_GetExecutionLevel(void)
- {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
-+    return __this_cpu_read(kasExecutionLevel);
-+#else
-     return __get_cpu_var(kasExecutionLevel);
-+#endif
- }
- 
- /** \brief Type definition for kas_spin_lock() parameter */
diff --git a/linux-4.0.patch b/linux-4.0.patch
index ae410d1..262f518 100644
--- a/linux-4.0.patch
+++ b/linux-4.0.patch
@@ -1,59 +1,3 @@
-diff -ur xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c
---- xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-04-19 13:36:55.029786519 +0200
-+++ xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-04-19 13:40:08.266446369 +0200
-@@ -4468,8 +4468,13 @@
- 
-     if (cpu_has_pge)
-     {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) || ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,17)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)))
-+        cr4 = __read_cr4();
-+        __write_cr4(cr4 & ~X86_CR4_PGE);
-+#else
-         cr4 = read_cr4();
-         write_cr4(cr4 & ~X86_CR4_PGE);
-+#endif
-     }
-      __flush_tlb();
- 
-@@ -4482,7 +4487,11 @@
-     write_cr0(cr0 & 0xbfffffff);
-     if (cpu_has_pge)
-     {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) || ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,17)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)))
-+        __write_cr4(cr4);
-+#else
-         write_cr4(cr4);
-+#endif
-     }
-     local_irq_restore(flags);
- 
-@@ -4509,8 +4518,13 @@
- 
-     if (cpu_has_pge)
-     {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) || ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,17)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)))
-+        cr4 = __read_cr4();
-+        __write_cr4(cr4 & ~X86_CR4_PGE);
-+#else
-         cr4 = read_cr4();
-         write_cr4(cr4 & ~X86_CR4_PGE);
-+#endif
-     }
-      __flush_tlb();
-   
-@@ -4522,7 +4536,11 @@
-     write_cr0(cr0 & 0xbfffffff);
-     if (cpu_has_pge)
-     {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) || ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,17)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)))
-+        __write_cr4(cr4);
-+#else
-         write_cr4(cr4);
-+#endif
-     }
-     local_irq_restore(flags);
- 
-Only in xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod: firegl_public.c~
 diff -ur xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c
 --- xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c	2014-11-28 21:02:10.000000000 +0100
 +++ xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c	2015-04-19 13:40:41.303111870 +0200
diff --git a/linux-4.1.patch b/linux-4.1.patch
index 89986a9..d1607d4 100644
--- a/linux-4.1.patch
+++ b/linux-4.1.patch
@@ -5,9 +5,9 @@
          //when MSI enabled. keep irq disabled when calling the action handler,
          //exclude this IRQ from irq balancing (only on one CPU) 
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
-         ((useMSI) ? (IRQF_DISABLED | IRQF_NOBALANCING) : (IRQF_SHARED)),    
+         ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),    
 +#else
-+        ((useMSI) ? (IRQF_NOBALANCING) : (IRQF_SHARED)),    
++        ((useMSI) ? (0) : (IRQF_SHARED)),    
 +#endif
  #endif
          dev_name,
diff --git a/linux-4.2.patch b/linux-4.2.patch
new file mode 100644
index 0000000..ab62137
--- /dev/null
+++ b/linux-4.2.patch
@@ -0,0 +1,174 @@
+--- xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/firegl_public.c~	2015-09-27 19:27:01.000000000 +0200
++++ xorg-driver-video-fglrx-15.9/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-27 19:27:28.792515882 +0200
+@@ -191,10 +191,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"
+@@ -623,8 +631,13 @@ static int firegl_major_proc_read(struct seq_file *m, void* data)
+ 
+     len = snprintf(buf, request, "%d\n", major);
+ #else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++    seq_printf(m, "%d\n", major);
++    len = 0;
++#else
+     len = seq_printf(m, "%d\n", major);
+ #endif
++#endif
+ 
+     KCL_DEBUG1(FN_FIREGL_PROC, "return len=%i\n",len);
+ 
+@@ -1706,6 +1719,9 @@ void ATI_API_CALL KCL_SetCurrentProcessState(KCL_ENUM_ProcessState state)
+ 
+ #if defined(__i386__) 
+ #ifndef __HAVE_ARCH_CMPXCHG
++#ifndef __xg
++#define __xg(x) ((volatile long *)(x))
++#endif
+ static inline 
+ unsigned long __fgl_cmpxchg(volatile void *ptr, unsigned long old,            
+                         unsigned long new, int size)                      
+@@ -1742,7 +1758,11 @@ unsigned long ATI_API_CALL kcl__cmpxchg(volatile void *ptr, unsigned long old,
+          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
+@@ -6430,27 +6454,42 @@ void ATI_API_CALL KCL_create_uuid(void *buf)
+     generate_random_uuid((char *)buf);
+ }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
+ static int KCL_fpu_save_init(struct task_struct *tsk)
+ {
+    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
+@@ -6462,7 +6501,11 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
+ 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();
+@@ -6475,8 +6475,12 @@ void ATI_API_CALL KCL_fpu_begin(void)
+ #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();
+ 
+@@ -6487,7 +6530,12 @@ void ATI_API_CALL KCL_fpu_begin(void)
+     /* 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
+@@ -6508,8 +6556,12 @@ void ATI_API_CALL KCL_fpu_begin(void)
+ #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();
+ #endif
+@@ -6542,8 +6546,12 @@ void ATI_API_CALL KCL_fpu_begin(void)
+  */
+ 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/...."
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list