summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVi0L02015-09-29 20:32:13 +0200
committerVi0L02015-09-29 20:32:13 +0200
commit1942a7429bbe768ecea8dea5e0fb587d8240689b (patch)
tree870946e0fa1702d56cd23b935b12dd91de894f7b
parent3c8ee5807f3f72f9fa6bf9610651a09c328890e9 (diff)
downloadaur-1942a7429bbe768ecea8dea5e0fb587d8240689b.tar.gz
updated to 15.9
-rw-r--r--.SRCINFO56
-rw-r--r--4.2-fglrx-has_fpu.patch20
-rw-r--r--4.2-kolasa-fpu_save_init.patch34
-rw-r--r--PKGBUILD70
-rw-r--r--a-ac-aticonfig6
-rw-r--r--a-lid-aticonfig4
-rwxr-xr-xati-powermode.sh106
-rw-r--r--atieventsd.service2
-rw-r--r--catalyst-total.install16
-rw-r--r--kolasa-3.19-get_cpu_var.patch28
-rw-r--r--kolasa_4.0-cr4-strn.patch70
-rw-r--r--kolasa_4.1_remove-IRQF_DISABLED.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
15 files changed, 420 insertions, 163 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ba93f7ed9952..81d7f9316032 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
pkgbase = catalyst-total
- pkgdesc = AMD/ATI drivers. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED
- pkgver = 15.5
- pkgrel = 1
+ 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.9
+ pkgrel = 2
url = http://www.amd.com
install = catalyst-total.install
arch = i686
arch = x86_64
license = custom
- depends = linux>=3.0
- depends = linux<4.2
- depends = linux-headers
+ depends = linux-lts>=3.0
+ depends = linux-lts<4.2
+ depends = linux-lts-headers
depends = xorg-server>=1.7.0
- depends = xorg-server<1.17.0
+ depends = xorg-server<1.18.0
depends = libxrandr
depends = libsm
depends = fontconfig
@@ -27,14 +27,14 @@ pkgbase = catalyst-total
optdepends = libxxf86vm: to run ATi Catalyst Control Center (amdcccle)
optdepends = opencl-headers: headers necessary for OpenCL development
optdepends = acpid: acpi event support / atieventsd
- optdepends = linux-lts-headers: to build the fglrx module for the linux-lts kernel
+ optdepends = procps-ng: brings pgrep used in acpi event support
provides = libgl
- provides = libatical=15.5
- provides = catalyst=15.5
- provides = catalyst-utils=15.5
- provides = catalyst-hook=15.5
- provides = catalyst-libgl=15.5
- provides = opencl-catalyst=15.5
+ 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,12 +54,15 @@ pkgbase = catalyst-total
options = libtool
options = !strip
options = !upx
- source = http://www2.ati.com/drivers/linux/amd-catalyst-omega-15.5-linux-run-installers.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
source = atieventsd.sh
source = atieventsd.service
+ source = ati-powermode.sh
+ source = a-ac-aticonfig
+ source = a-lid-aticonfig
source = catalyst.conf
source = arch-fglrx-authatieventsd_new.patch
source = hook-fglrx
@@ -77,15 +80,20 @@ pkgbase = catalyst-total
source = cold-fglrx-3.14-current_euid.patch
source = fglrx_gpl_symbol.patch
source = fglrx_3.17rc6-no_hotplug.patch
- source = kolasa-3.19-get_cpu_var.patch
- source = kolasa_4.0-cr4-strn.patch
- source = kolasa_4.1_remove-IRQF_DISABLED.patch
- md5sums = 979f9f2e0948fa6e92ff0125f5c6b575
+ 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
+ source = 4.2-kolasa-fpu_save_init.patch
+ md5sums = d2de2df6946b452c266a3c892e6e46ff
md5sums = 601d9c756571dd79d26944e54827631e
md5sums = af7fb8ee4fc96fd54c5b483e33dc71c4
md5sums = bdafe749e046bfddee2d1c5e90eabd83
md5sums = 9d9ea496eadf7e883d56723d65e96edf
- md5sums = 90a37e010f4e5f45e270cd000894d553
+ md5sums = b79e144932616221f6d01c4b05dc9306
+ md5sums = 514899437eb209a1d4670df991cdfc10
+ md5sums = 80fdfbff93d96a1dfca2c7f684be8cc1
+ md5sums = 9054786e08cf3ea2a549fe22d7f2cd92
md5sums = 3e19c2285c76f4cb92108435a1e9c302
md5sums = b3ceefeb97c609037845f65d0956c4f0
md5sums = 9126e1ef0c724f8b57d3ac0fe77efe2f
@@ -103,9 +111,11 @@ pkgbase = catalyst-total
md5sums = ba33b6ef10896d3e1b5e4cd96390b771
md5sums = ef97fc080ce7e5a275fe0c372bc2a418
md5sums = 67a22f624bae95a76638ce269392cb01
- md5sums = 3aa45013515b724a71bbd8e01f98ad99
- md5sums = dee3df1c5d3ed87363f4304da917fc00
- md5sums = 81a9e38dee025151cccb7e5db2362cfb
+ md5sums = 880d5e59554cda382f74206c202942be
+ md5sums = 982451bcc1fa1ee3da53ffa481d65581
+ md5sums = 88832af8d6769aa51fa9b266a74394e0
+ md5sums = ed7748a593d6b894269f8c7856b7ae50
+ md5sums = dd51495a1d8f2d1042f04a783bf01e08
pkgname = catalyst-total
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/4.2-kolasa-fpu_save_init.patch b/4.2-kolasa-fpu_save_init.patch
new file mode 100644
index 000000000000..6d2e4e70c0f5
--- /dev/null
+++ b/4.2-kolasa-fpu_save_init.patch
@@ -0,0 +1,34 @@
+--- 15.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-20 18:29:19.488890309 +0200
++++ 15.9b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-20 14:20:51.000000000 +0200
+@@ -6505,11 +6505,15 @@
+ struct task_struct *cur_task = get_current();
+ preempt_disable();
+ if (cur_thread->status & TS_USEDFPU)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++ copy_fpregs_to_fpstate(&cur_task->thread.fpu);
++#else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
+ KCL_fpu_save_init(cur_task);
+ #else
+ __save_init_fpu(cur_task);
+ #endif
++#endif
+ else
+ clts();
+
+@@ -6531,11 +6535,15 @@
+ #else
+ if (cur_task->thread.fpu.fpregs_active)
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++ copy_fpregs_to_fpstate(&cur_task->thread.fpu);
++#else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
+ KCL_fpu_save_init(cur_task);
+ #else
+ __save_init_fpu(cur_task);
+ #endif
++#endif
+ else
+ clts();
+ #endif
diff --git a/PKGBUILD b/PKGBUILD
index 393ed5fcb0ca..3af8887aa408 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,25 +19,27 @@
# Contributor: zoopp
# Contributor: solar (authatieventsd' patch s/-1/255)
# Contributor: Cold (current_euid patch)
-# Contributor: kolasa (3.19, 4.0 & 4.1 kernel patch)
+# Contributor: ubuntu (parts of 4.0, 4.1 and 4.2 kernel patches)
+# Contributor: kolasa (part of 4.2 kernel patches)
# 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-total
-pkgver=15.5
-pkgrel=1
-#_amdver=15.101.1001
-pkgdesc="AMD/ATI drivers. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED"
+pkgver=15.9
+pkgrel=2
+_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"
license=('custom')
options=('staticlibs' 'libtool' '!strip' '!upx')
-depends=('linux>=3.0' 'linux<4.2' 'linux-headers' 'xorg-server>=1.7.0' 'xorg-server<1.17.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama' 'mesa>=10.1.0-4')
+depends=('linux-lts>=3.0' 'linux-lts<4.2' 'linux-lts-headers' 'xorg-server>=1.7.0' 'xorg-server<1.18.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama' 'mesa>=10.1.0-4')
optdepends=('qt4: to run ATi Catalyst Control Center (amdcccle)'
'libxxf86vm: to run ATi Catalyst Control Center (amdcccle)'
'opencl-headers: headers necessary for OpenCL development'
'acpid: acpi event support / atieventsd'
- 'linux-lts-headers: to build the fglrx module for the linux-lts kernel')
+ 'procps-ng: brings pgrep used in acpi event support')
+# 'linux-lts-headers: to build the fglrx module for the linux-lts kernel')
conflicts=('libgl' 'catalyst' 'catalyst-daemon' 'catalyst-generator' 'catalyst-hook' 'catalyst-utils' 'libcl' 'catalyst-dkms' 'mesa-libgl' 'mesa-libgl-git')
provides=('libgl' "libatical=${pkgver}" "catalyst=${pkgver}" "catalyst-utils=${pkgver}" "catalyst-hook=${pkgver}" "catalyst-libgl=${pkgver}" "opencl-catalyst=${pkgver}" 'libcl' 'dri' 'libtxc_dxtn' 'mesa-libgl' 'mesa-libgl-git')
@@ -63,12 +65,15 @@ source=(
# http://www2.ati.com/drivers/beta/amd-catalyst-${pkgver}-beta-v${_betano}-linux-x86.x86_64.run.zip
# 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-${pkgver}-linux-run-installers.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
atieventsd.sh
atieventsd.service
+ ati-powermode.sh
+ a-ac-aticonfig
+ a-lid-aticonfig
catalyst.conf
arch-fglrx-authatieventsd_new.patch
hook-fglrx
@@ -86,16 +91,21 @@ source=(
cold-fglrx-3.14-current_euid.patch
fglrx_gpl_symbol.patch
fglrx_3.17rc6-no_hotplug.patch
- kolasa-3.19-get_cpu_var.patch
- kolasa_4.0-cr4-strn.patch
- kolasa_4.1_remove-IRQF_DISABLED.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
+ 4.2-kolasa-fpu_save_init.patch)
-md5sums=('979f9f2e0948fa6e92ff0125f5c6b575'
+md5sums=('d2de2df6946b452c266a3c892e6e46ff'
'601d9c756571dd79d26944e54827631e'
'af7fb8ee4fc96fd54c5b483e33dc71c4'
'bdafe749e046bfddee2d1c5e90eabd83'
'9d9ea496eadf7e883d56723d65e96edf'
- '90a37e010f4e5f45e270cd000894d553'
+ 'b79e144932616221f6d01c4b05dc9306'
+ '514899437eb209a1d4670df991cdfc10'
+ '80fdfbff93d96a1dfca2c7f684be8cc1'
+ '9054786e08cf3ea2a549fe22d7f2cd92'
'3e19c2285c76f4cb92108435a1e9c302'
'b3ceefeb97c609037845f65d0956c4f0'
'9126e1ef0c724f8b57d3ac0fe77efe2f'
@@ -113,16 +123,18 @@ md5sums=('979f9f2e0948fa6e92ff0125f5c6b575'
'ba33b6ef10896d3e1b5e4cd96390b771'
'ef97fc080ce7e5a275fe0c372bc2a418'
'67a22f624bae95a76638ce269392cb01'
- '3aa45013515b724a71bbd8e01f98ad99'
- 'dee3df1c5d3ed87363f4304da917fc00'
- '81a9e38dee025151cccb7e5db2362cfb')
+ '880d5e59554cda382f74206c202942be'
+ '982451bcc1fa1ee3da53ffa481d65581'
+ '88832af8d6769aa51fa9b266a74394e0'
+ 'ed7748a593d6b894269f8c7856b7ae50'
+ 'dd51495a1d8f2d1042f04a783bf01e08')
build() {
## Unpack archive
# /bin/sh ./fglrx-${_amdver}/amd-driver-installer-${_amdver}-x86.x86_64.run --extract archive_files
- /bin/sh ./amd-catalyst-omega-${pkgver}-linux-run-installers.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
@@ -249,9 +261,13 @@ package() {
install -m644 usr/share/applications/*.desktop ${pkgdir}/usr/share/applications
# ACPI example files
- install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh ${pkgdir}/etc/acpi
- sed -i -e "s/usr\/X11R6/usr/g" ${pkgdir}/etc/acpi/ati-powermode.sh
- install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${pkgdir}/etc/acpi/events
+# install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh ${pkgdir}/etc/acpi
+# sed -i -e "s/usr\/X11R6/usr/g" ${pkgdir}/etc/acpi/ati-powermode.sh
+# install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${pkgdir}/etc/acpi/events
+ # lets check our own files - V
+ install -m755 ${srcdir}/ati-powermode.sh ${pkgdir}/etc/acpi
+ install -m644 ${srcdir}/a-ac-aticonfig ${pkgdir}/etc/acpi/events
+ install -m644 ${srcdir}/a-lid-aticonfig ${pkgdir}/etc/acpi/events
# Add ATI Events Daemon launcher
install -m755 ${srcdir}/atieventsd.sh ${pkgdir}/etc/rc.d/atieventsd
@@ -294,15 +310,17 @@ package() {
patch -Np1 -i ../makefile_compat.patch
patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch
patch -Np1 -i ../lano1106_kcl_agp_13_4.patch
- patch -Np1 -i ../lano1106_fglrx-13.8_proc.patch
- patch -Np1 -i ../cold-fglrx-3.14-current_euid.patch
- patch -Np1 -i ../fglrx_3.17rc6-no_hotplug.patch
- patch -Np1 -i ../kolasa-3.19-get_cpu_var.patch
+# patch -Np1 -i ../lano1106_fglrx-13.8_proc.patch
+# patch -Np1 -i ../cold-fglrx-3.14-current_euid.patch
+# patch -Np1 -i ../fglrx_3.17rc6-no_hotplug.patch
# 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.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 #three 4.2 patches left for testing purposes, use simultaneously - V
+ patch -Np1 -i ../4.2-fglrx-has_fpu.patch
+ patch -Np1 -i ../4.2-kolasa-fpu_save_init.patch
# Prepare modules source files
_archdir=x86_64
diff --git a/a-ac-aticonfig b/a-ac-aticonfig
new file mode 100644
index 000000000000..753e3af063f9
--- /dev/null
+++ b/a-ac-aticonfig
@@ -0,0 +1,6 @@
+# /etc/acpi/events/ac
+# Called when the user connects ac power to us
+#
+
+event=ac_adapter
+action=/etc/acpi/ati-powermode.sh "%e"
diff --git a/a-lid-aticonfig b/a-lid-aticonfig
new file mode 100644
index 000000000000..021f834ba6dd
--- /dev/null
+++ b/a-lid-aticonfig
@@ -0,0 +1,4 @@
+# Called when the user opens/closes the laptop lid
+
+event=button/lid
+action=/etc/acpi/ati-powermode.sh "%e"
diff --git a/ati-powermode.sh b/ati-powermode.sh
new file mode 100755
index 000000000000..ded996c43057
--- /dev/null
+++ b/ati-powermode.sh
@@ -0,0 +1,106 @@
+#!/bin/bash
+
+#
+# Control script for ACPI lid state and AC adapter state
+#
+
+getXuser() {
+ user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" ) { print $1; exit; } }'`
+ if [ x"$user" = x"" ]; then
+ startx=`pgrep -n startx`
+ if [ x"$startx" != x"" ]; then
+ user=`ps -o user --no-headers $startx`
+ fi
+ fi
+ if [ x"$user" != x"" ]; then
+ userhome=`getent passwd $user | cut -d: -f6`
+ export XAUTHORITY=$userhome/.Xauthority
+ else
+ export XAUTHORITY=""
+ fi
+ export XUSER=$user
+}
+
+#Find the right XServer to be configured.
+getXserver() {
+for x in /tmp/.X11-unix/*; do
+ displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+ getXuser;
+ if [ x"$XAUTHORITY" != x"" ]; then
+ export DISPLAY=":$displaynum"
+ fi
+done
+}
+
+#If PPLIB is enabled
+checkPPLIB() {
+su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB
+if [ $? = 0 ]; then
+ echo "Has PPLIB"
+ has_pplib=1
+else
+ echo "No PPLIB"
+ has_pplib=0
+fi
+}
+
+case "$1" in
+ ac_adapter)
+ case "$2" in
+ AC|ACAD|ADP0)
+ case "$4" in
+ 00000000)
+ logger 'AC unpluged'
+ getXserver;
+ checkPPLIB;
+ if [ ${has_pplib} -eq 1 ]; then
+ su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
+ else
+ su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
+ fi
+ ;;
+ 00000001)
+ logger 'AC pluged'
+ getXserver;
+ checkPPLIB;
+ if [ ${has_pplib} -eq 1 ]; then
+ su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
+ else
+ su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
+ fi
+ ;;
+ esac
+ ;;
+ *)
+ logger "ACPI action undefined: $2"
+ ;;
+ esac
+ ;;
+ button/lid)
+ case "$3" in
+ close)
+ logger 'LID closed'
+ getXserver;
+ checkPPLIB;
+ if [ ${has_pplib} -eq 1 ]; then
+ su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
+ else
+ su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
+ fi
+ ;;
+ open)
+ logger 'LID opened'
+ getXserver;
+ checkPPLIB;
+ if [ ${has_pplib} -eq 1 ]; then
+ su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
+ else
+ su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
+ fi
+ ;;
+ *)
+ logger "ACPI action undefined: $3"
+ ;;
+ esac
+ ;;
+esac \ No newline at end of file
diff --git a/atieventsd.service b/atieventsd.service
index 3bbf25acb8f6..ff58ce7540ee 100644
--- a/atieventsd.service
+++ b/atieventsd.service
@@ -1,6 +1,6 @@
[Unit]
Description=Catalyst event Daemon
-Requires=acpid.socket
+Requires=acpid.service
[Service]
ExecStart=/usr/bin/atieventsd --nodaemon
diff --git a/catalyst-total.install b/catalyst-total.install
index 01c90889b330..4f8248167902 100644
--- a/catalyst-total.install
+++ b/catalyst-total.install
@@ -27,6 +27,22 @@ whisperer(){
echo "More info here:"
echo "https://bbs.archlinux.org/viewtopic.php?pid=1255575#p1255575"
echo -e '\E[37;44m'"\033[1m----------------------------------------------------------------\033[0m"
+ echo -e "\e[0;32m--------------------------- PXP --------------------------------\e[0m"
+ echo -e "\e[0;32m@pxp_user:\e[0m I switched GL/glx links to catalyst again..."
+ echo -e "\e[0;32m----------------------------------------------------------------\e[0m"
+ echo -e "\e[1;31m-------------------------- TTY BUG -----------------------------\e[0m"
+ echo "There's a bug in switching to VT/TTY"
+ echo "Using uvesafb is a workaround:"
+ echo "https://wiki.archlinux.org/index.php/uvesafb"
+ echo -e "\e[1;31m----------------------------------------------------------------\e[0m"
+ echo -e "\e[1;31m--------------------- NO 4.2 KERNEL SUPPORT---------------------\e[0m"
+ echo "catalyst doesn't support linux kernels >= 4.2"
+ echo "please configure bootloader to use proper kernel"
+ echo "like linux-lts in example"
+ echo ""
+ echo "sleeping now for 5 seconds as this is important..."
+ echo -e "\e[1;31m----------------------------------------------------------------\e[0m"
+ sleep 5
}
bug_whisper(){
diff --git a/kolasa-3.19-get_cpu_var.patch b/kolasa-3.19-get_cpu_var.patch
deleted file mode 100644
index 5a571da9fd96..000000000000
--- a/kolasa-3.19-get_cpu_var.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-12-11 00:15:11.000000000 +0100
-+++ 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-01-01 21:39:40.471543282 +0100
-@@ -4823,8 +4823,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;
- }
-@@ -4836,7 +4841,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/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.patch b/kolasa_4.1_remove-IRQF_DISABLED.patch
deleted file mode 100644
index f0b1b62756e9..000000000000
--- a/kolasa_4.1_remove-IRQF_DISABLED.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 15.3/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-03-06 17:44:48.000000000 +0100
-+++ 15.3/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-06-04 12:12:04.997661763 +0200
-@@ -3496,7 +3496,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_NOBALANCING) : (IRQF_SHARED)),
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
-+ ((useMSI) ? (IRQF_DISABLED | IRQF_NOBALANCING) : (IRQF_SHARED)),
-+#else
-+ ((useMSI) ? (IRQF_NOBALANCING) : (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/...."