summaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-13.12.ebuild5
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild5
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-14.4.ebuild7
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch72
4 files changed, 88 insertions, 1 deletions
diff --git a/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild
index 5af335c3..b6e549f9 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild
@@ -156,6 +156,11 @@ src_prepare() {
# Linux 3.13 support
epatch "${FILESDIR}/buildfix_kernel_3.13.patch"
+ # Linux 4.0 support
+ if kernel_is ge 4 0; then
+ epatch "${FILESDIR}/${PN}-linux-4.0.patch"
+ fi
+
# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
diff --git a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild b/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
index 168b39e8..b351099a 100644
--- a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
@@ -167,6 +167,11 @@ src_prepare() {
# Linux 3.19 support
epatch "${FILESDIR}/${P}-linux-3.19.patch"
+ # Linux 4.0 support
+ if kernel_is ge 4 0; then
+ epatch "${FILESDIR}/${PN}-linux-4.0.patch"
+ fi
+
cd "${MODULE_DIR}"
# bugged fglrx build system, this file should be copied by hand
cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
diff --git a/x11-drivers/ati-drivers/ati-drivers-14.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-14.4.ebuild
index 9892b7c8..afc92344 100644
--- a/x11-drivers/ati-drivers/ati-drivers-14.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-14.4.ebuild
@@ -154,12 +154,17 @@ src_prepare() {
# Fix #483400
epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
- # Sabayon 3.9 kernels are versioned 3.9.0
+ # Kogaion 3.9 kernels are versioned 3.9.0
epatch "${FILESDIR}/ati-drivers-14.4-acpi.patch"
# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
+ # Linux 4.0 support
+ if kernel_is ge 4 0; then
+ epatch "${FILESDIR}/${PN}-linux-4.0.patch"
+ fi
+
cd "${MODULE_DIR}"
# bugged fglrx build system, this file should be copied by hand
cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch b/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch
new file mode 100644
index 00000000..9b321955
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch
@@ -0,0 +1,72 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index 0f7399d..eb23e06 100644
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -4240,8 +4240,13 @@ static void kcl_mem_pat_setup (void *info)
+
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ cr4 = read_cr4();
+ write_cr4(cr4 & ~X86_CR4_PGE);
++#else
++ cr4 = __read_cr4();
++ __write_cr4(cr4 & ~X86_CR4_PGE);
++#endif
+ }
+ __flush_tlb();
+
+@@ -4254,7 +4259,11 @@ static void kcl_mem_pat_setup (void *info)
+ write_cr0(cr0 & 0xbfffffff);
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ write_cr4(cr4);
++#else
++ __write_cr4(cr4);
++#endif
+ }
+ local_irq_restore(flags);
+
+@@ -4281,8 +4290,13 @@ static void kcl_mem_pat_restore (void *info)
+
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ cr4 = read_cr4();
+ write_cr4(cr4 & ~X86_CR4_PGE);
++#else
++ cr4 = __read_cr4();
++ __write_cr4(cr4 & ~X86_CR4_PGE);
++#endif
+ }
+ __flush_tlb();
+
+@@ -4294,7 +4308,11 @@ static void kcl_mem_pat_restore (void *info)
+ write_cr0(cr0 & 0xbfffffff);
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ write_cr4(cr4);
++#else
++ __write_cr4(cr4);
++#endif
+ }
+ local_irq_restore(flags);
+
+diff --git a/common/lib/modules/fglrx/build_mod/kcl_str.c b/common/lib/modules/fglrx/build_mod/kcl_str.c
+index 2d89eb0..6df117c 100644
+--- a/common/lib/modules/fglrx/build_mod/kcl_str.c
++++ b/common/lib/modules/fglrx/build_mod/kcl_str.c
+@@ -169,7 +169,11 @@ int ATI_API_CALL KCL_STR_Strnicmp(const char* s1,
+ const char* s2,
+ KCL_TYPE_SizeSigned count)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ return strnicmp(s1, s2, count);
++#else
++ return strncasecmp(s1, s2, count);
++#endif
+ }
+
+ /** \brief Locate character in string