summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVi0L02015-09-16 22:31:05 +0200
committerVi0L02015-09-16 22:31:05 +0200
commit5d468a917ce3bcd2ed4cd613d833c7ab821cd83e (patch)
treeefdc3244f2632aa52024d1c8759bb554d847d615
parentab3b6697861fa0df80fb426f971bb6ff4555da04 (diff)
downloadaur-5d468a917ce3bcd2ed4cd613d833c7ab821cd83e.tar.gz
updated to 15.9
-rw-r--r--.SRCINFO30
-rw-r--r--4.2-fglrx-has_fpu.patch20
-rw-r--r--PKGBUILD32
-rw-r--r--kolasa_4.0-cr4-strn.patch70
-rw-r--r--kolasa_4.1_remove-IRQF_DISABLED-15.7.patch15
-rw-r--r--ubuntu_buildfix_kernel_4.0.patch13
-rw-r--r--ubuntu_buildfix_kernel_4.1.patch29
-rw-r--r--ubuntu_buildfix_kernel_4.2.patch114
8 files changed, 213 insertions, 110 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3cf19464ebfc..ac7db958690e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = catalyst-test
pkgdesc = AMD/ATI Catalyst drivers for linux. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED
- pkgver = 15.7
+ pkgver = 15.9
pkgrel = 1
url = http://www.amd.com
install = catalyst-test.install
@@ -29,12 +29,12 @@ pkgbase = catalyst-test
optdepends = acpid: acpi event support / atieventsd
optdepends = linux-lts-headers: to build the fglrx module for the linux-lts kernel
provides = libgl
- provides = libatical=15.7
- provides = catalyst=15.7
- provides = catalyst-utils=15.7
- provides = catalyst-hook=15.7
- provides = catalyst-libgl=15.7
- provides = opencl-catalyst=15.7
+ provides = libatical=15.9
+ provides = catalyst=15.9
+ provides = catalyst-utils=15.9
+ provides = catalyst-hook=15.9
+ provides = catalyst-libgl=15.9
+ provides = opencl-catalyst=15.9
provides = libcl
provides = dri
provides = libtxc_dxtn
@@ -54,7 +54,7 @@ pkgbase = catalyst-test
options = libtool
options = !strip
options = !upx
- source = http://www2.ati.com/drivers/linux/amd-driver-installer-15.20.1046-x86.x86_64.zip
+ source = http://www2.ati.com/drivers/linux/amd-catalyst-15.9-linux-installer-15.201.1151-x86.x86_64.zip
source = catalyst_build_module
source = lib32-catalyst.sh
source = catalyst.sh
@@ -77,9 +77,11 @@ pkgbase = catalyst-test
source = cold-fglrx-3.14-current_euid.patch
source = fglrx_gpl_symbol.patch
source = fglrx_3.17rc6-no_hotplug.patch
- source = kolasa_4.0-cr4-strn.patch
- source = kolasa_4.1_remove-IRQF_DISABLED-15.7.patch
- md5sums = 65bb3ac5ec0201ba7940ae0db151bf3d
+ source = ubuntu_buildfix_kernel_4.0.patch
+ source = ubuntu_buildfix_kernel_4.1.patch
+ source = ubuntu_buildfix_kernel_4.2.patch
+ source = 4.2-fglrx-has_fpu.patch
+ md5sums = d2de2df6946b452c266a3c892e6e46ff
md5sums = 601d9c756571dd79d26944e54827631e
md5sums = af7fb8ee4fc96fd54c5b483e33dc71c4
md5sums = bdafe749e046bfddee2d1c5e90eabd83
@@ -102,8 +104,10 @@ pkgbase = catalyst-test
md5sums = ba33b6ef10896d3e1b5e4cd96390b771
md5sums = ef97fc080ce7e5a275fe0c372bc2a418
md5sums = 67a22f624bae95a76638ce269392cb01
- md5sums = dee3df1c5d3ed87363f4304da917fc00
- md5sums = 8776efc373bcfec81355f5ac56c84d90
+ md5sums = 880d5e59554cda382f74206c202942be
+ md5sums = 982451bcc1fa1ee3da53ffa481d65581
+ md5sums = 88832af8d6769aa51fa9b266a74394e0
+ md5sums = ed7748a593d6b894269f8c7856b7ae50
pkgname = catalyst-test
diff --git a/4.2-fglrx-has_fpu.patch b/4.2-fglrx-has_fpu.patch
new file mode 100644
index 000000000000..173ec888dc74
--- /dev/null
+++ b/4.2-fglrx-has_fpu.patch
@@ -0,0 +1,20 @@
+--- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-04 16:31:23.000000000 +0200
++++ 15.7b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-21 15:26:44.860536831 +0200
+@@ -6475,6 +6475,7 @@
+ */
+ struct task_struct *cur_task = current;
+ preempt_disable();
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
+ /* The thread structure is changed with the commit below for kernel 3.3:
+ * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8
+@@ -6483,6 +6484,9 @@
+ #else
+ if (cur_task->thread.has_fpu)
+ #endif
++#else
++ if (cur_task->thread.fpu.fpregs_active)
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
+ KCL_fpu_save_init(cur_task);
+ #else
diff --git a/PKGBUILD b/PKGBUILD
index feac5279b6a9..4a7837194307 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,15 +19,15 @@
# Contributor: zoopp
# Contributor: solar (authatieventsd' patch s/-1/255)
# Contributor: Cold (current_euid patch)
-# Contributor: kolasa (4.0 & 4.1 kernel patch)
+# Contributor: ubuntu (4.1 kernel patch)
# PKGEXT='.pkg.tar.gz' # imho time to pack this pkg into tar.xz is too long, unfortunatelly yaourt got problems when ext is different from .pkg.tar.xz - V
pkgname=catalyst-test
-pkgver=15.7
+pkgver=15.9
pkgrel=1
# _betano=1.0
-_amdver=15.20.1046
+_amdver=15.201.1151
pkgdesc="AMD/ATI Catalyst drivers for linux. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED"
arch=('i686' 'x86_64')
url="http://www.amd.com"
@@ -65,7 +65,8 @@ source=(
# http://www2.ati.com/drivers/linux/amd-catalyst-${pkgver}-linux-x86.x86_64.zip
# http://www2.ati.com/drivers/linux/amd-catalyst-${pkgver/./-}-linux-x86-x86-64.zip
# http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip
- http://www2.ati.com/drivers/linux/amd-driver-installer-${_amdver}-x86.x86_64.zip
+# http://www2.ati.com/drivers/linux/amd-driver-installer-${_amdver}-x86.x86_64.zip
+ http://www2.ati.com/drivers/linux/amd-catalyst-${pkgver}-linux-installer-${_amdver}-x86.x86_64.zip
catalyst_build_module
lib32-catalyst.sh
catalyst.sh
@@ -88,10 +89,12 @@ source=(
cold-fglrx-3.14-current_euid.patch
fglrx_gpl_symbol.patch
fglrx_3.17rc6-no_hotplug.patch
- kolasa_4.0-cr4-strn.patch
- kolasa_4.1_remove-IRQF_DISABLED-15.7.patch)
+ ubuntu_buildfix_kernel_4.0.patch
+ ubuntu_buildfix_kernel_4.1.patch
+ ubuntu_buildfix_kernel_4.2.patch
+ 4.2-fglrx-has_fpu.patch)
-md5sums=('65bb3ac5ec0201ba7940ae0db151bf3d'
+md5sums=('d2de2df6946b452c266a3c892e6e46ff'
'601d9c756571dd79d26944e54827631e'
'af7fb8ee4fc96fd54c5b483e33dc71c4'
'bdafe749e046bfddee2d1c5e90eabd83'
@@ -114,14 +117,17 @@ md5sums=('65bb3ac5ec0201ba7940ae0db151bf3d'
'ba33b6ef10896d3e1b5e4cd96390b771'
'ef97fc080ce7e5a275fe0c372bc2a418'
'67a22f624bae95a76638ce269392cb01'
- 'dee3df1c5d3ed87363f4304da917fc00'
- '8776efc373bcfec81355f5ac56c84d90')
+ '880d5e59554cda382f74206c202942be'
+ '982451bcc1fa1ee3da53ffa481d65581'
+ '88832af8d6769aa51fa9b266a74394e0'
+ 'ed7748a593d6b894269f8c7856b7ae50')
+
build() {
## Unpack archive
- /bin/sh ./amd-driver-installer-${_amdver}-x86.x86_64.run --extract archive_files
+ /bin/sh ./AMD-Catalyst-${pkgver}-Linux-installer-${_amdver}-x86.x86_64.run --extract archive_files
# mkdir common
# mv etc lib usr common
# mkdir archive_files
@@ -300,8 +306,10 @@ package() {
# test "${CARCH}" = "i686" && patch -Np1 -i ../fglrx_gpl_symbol.patch
# since 3.19 not only i686 needs gpl symbol - V
patch -Np1 -i ../fglrx_gpl_symbol.patch
- patch -Np1 -i ../kolasa_4.0-cr4-strn.patch
- patch -Np1 -i ../kolasa_4.1_remove-IRQF_DISABLED-15.7.patch
+ patch -Np1 -i ../ubuntu_buildfix_kernel_4.0.patch
+ patch -Np1 -i ../ubuntu_buildfix_kernel_4.1.patch
+# patch -Np1 -i ../ubuntu_buildfix_kernel_4.2.patch #two 4.2 patches left for testing purposes, use both simultaneously - V
+# patch -Np1 -i ../4.2-fglrx-has_fpu.patch
# Prepare modules source files
_archdir=x86_64
diff --git a/kolasa_4.0-cr4-strn.patch b/kolasa_4.0-cr4-strn.patch
deleted file mode 100644
index 7bce698bad33..000000000000
--- a/kolasa_4.0-cr4-strn.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff -uNr 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c 14.12_2/common/lib/modules/fglrx/build_mod/firegl_public.c
---- 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-11-28 21:02:10.000000000 +0100
-+++ 14.12_2/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-03-08 13:30:42.565275902 +0100
-@@ -4468,8 +4468,13 @@
-
- if (cpu_has_pge)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,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)
- 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)
- 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)
- write_cr4(cr4);
-+#else
-+ __write_cr4(cr4);
-+#endif
- }
- local_irq_restore(flags);
-
-diff -uNr 14.12/common/lib/modules/fglrx/build_mod/kcl_str.c 14.12_2/common/lib/modules/fglrx/build_mod/kcl_str.c
---- 14.12/common/lib/modules/fglrx/build_mod/kcl_str.c 2014-11-28 21:02:10.000000000 +0100
-+++ 14.12_2/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-03-08 13:25:11.568396701 +0100
-@@ -169,7 +169,11 @@
- const char* s2,
- KCL_TYPE_SizeSigned count)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
- return strnicmp(s1, s2, count);
-+#else
-+ return strncasecmp(s1, s2, count);
-+#endif
- }
-
- /** \brief Locate character in string
diff --git a/kolasa_4.1_remove-IRQF_DISABLED-15.7.patch b/kolasa_4.1_remove-IRQF_DISABLED-15.7.patch
deleted file mode 100644
index 176359a94842..000000000000
--- a/kolasa_4.1_remove-IRQF_DISABLED-15.7.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-04 16:31:23.000000000 +0200
-+++ 15.7a/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-09 17:40:58.611608136 +0200
-@@ -3498,7 +3498,11 @@
- #else
- //when MSI enabled. keep irq disabled when calling the action handler,
- //exclude this IRQ from irq balancing (only on one CPU)
-- ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
-+ ((useMSI) ? (IRQF_NOBALANCING) : (IRQF_SHARED)),
-+#else
-+ ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
-+#endif
- #endif
- dev_name,
- context);
diff --git a/ubuntu_buildfix_kernel_4.0.patch b/ubuntu_buildfix_kernel_4.0.patch
new file mode 100644
index 000000000000..91ae3ea24f45
--- /dev/null
+++ b/ubuntu_buildfix_kernel_4.0.patch
@@ -0,0 +1,13 @@
+--- 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c
++++ 15.7b/common/lib/modules/fglrx/build_mod/kcl_str.c
+@@ -42,6 +42,10 @@
+ #include "kcl_type.h"
+ #include "kcl_str.h"
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
++#define strnicmp strncasecmp
++#endif
++
+ /** \brief Fill memory with a constant byte
+ * \param s Pointer to memory
+ * \param c Initializing value
diff --git a/ubuntu_buildfix_kernel_4.1.patch b/ubuntu_buildfix_kernel_4.1.patch
new file mode 100644
index 000000000000..cf3dda0bfc57
--- /dev/null
+++ b/ubuntu_buildfix_kernel_4.1.patch
@@ -0,0 +1,29 @@
+From 94631bfd9b813d9d2f1af0ea744e7121d72d25c5 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 10 Jul 2015 16:52:29 +0200
+Subject: [PATCH 1/2] Add support for Linux 4.1
+
+Drop the IRQF_DISABLED flag, as it was removed in Linux 4.1
+
+Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
+---
+ firegl_public.c | 4 +++-
+ kcl_acpi.c | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+--- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ 15.7b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -3495,10 +3495,12 @@ int ATI_API_CALL KCL_InstallInterruptHandler(
+ KCL_PUB_InterruptHandlerWrap,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+ ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)),
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
+ //when MSI enabled. keep irq disabled when calling the action handler,
+ //exclude this IRQ from irq balancing (only on one CPU)
+ ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
++#else
++ ((useMSI) ? (0x0) : (IRQF_SHARED)),
+ #endif
+ dev_name,
+ context); \ No newline at end of file
diff --git a/ubuntu_buildfix_kernel_4.2.patch b/ubuntu_buildfix_kernel_4.2.patch
new file mode 100644
index 000000000000..9aa71bb11434
--- /dev/null
+++ b/ubuntu_buildfix_kernel_4.2.patch
@@ -0,0 +1,114 @@
+From eb7beb0ea51de526e59a0c3edc76530b28ef10e7 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Tue, 14 Jul 2015 12:56:37 +0200
+Subject: [PATCH 1/1] Add support for Linux 4.2
+
+Deal with the FPU code renaming
+---
+ firegl_public.c | 38 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 38 insertions(+)
+
+--- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ 15.7b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -191,9 +191,17 @@
+ #include <linux/string.h>
+ #include <linux/gfp.h>
+ #include <linux/swap.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ #include "asm/i387.h"
++#else
++#include <asm/fpu/api.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"
+@@ -1698,6 +1706,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)
+@@ -1734,7 +1745,11 @@ unsigned long ATI_API_CALL kcl__cmpxchg(volatile void *ptr, unsigned long old,
+ unsigned long new, int size)
+ {
+ #ifndef __HAVE_ARCH_CMPXCHG
++#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,21 +6445,36 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
+ struct fpu *fpu = &tsk->thread.fpu;
+
+ if(static_cpu_has(X86_FEATURE_XSAVE)) {
++#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)) {
++#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"
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ : [fx] "=m" (fpu->state->fsave));
++#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
+@@ -6456,8 +6486,12 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
+ void ATI_API_CALL KCL_fpu_begin(void)
+ {
+ #ifdef CONFIG_X86_64
++#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();
+ struct task_struct *cur_task = get_current();
+@@ -6502,7 +6536,11 @@ void ATI_API_CALL KCL_fpu_begin(void)
+ */
+ void ATI_API_CALL KCL_fpu_end(void)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ kernel_fpu_end();
++#else
++ __kernel_fpu_end();
++#endif
+ }
+
+ /** Create new directory entry under "/proc/...."