![Romain Perier](/assets/img/avatar_default.png)
This commits adds support for the AMD Catalyst Linux driver 15.9 (15.201.1151). It includes the fglrx kernel module with various fixes to make it work with at least Linux kernel 4.4 LTS, the userspace OpenGL stack and the xorg driver module. Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Thomas: - fixup whitespace issues noticed by Yann. - register AMD_CATALYST_PREPARE_MODULE as a post-patch hook rather than calling it during the configure step, also suggested by Yann.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
55 lines
2.1 KiB
Diff
55 lines
2.1 KiB
Diff
Author: Manuel RĂ¼ger <mrueg@gentoo.org>
|
|
Date: Sat, 2 Jan 2016 17:24:30 +0100
|
|
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/x11-drivers/ati-drivers/files?id=179aa11ed2f1bd79cf1b190263c3a7a07279fc50
|
|
|
|
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
|
|
---
|
|
--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-18 23:57:02.000000000 -0400
|
|
+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-18 23:57:11.000000000 -0400
|
|
@@ -136,7 +136,6 @@
|
|
#include <asm/mman.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/processor.h>
|
|
-#include <asm/tlbflush.h> // for flush_tlb_page
|
|
#include <asm/cpufeature.h>
|
|
#ifdef CONFIG_MTRR
|
|
#include <asm/mtrr.h>
|
|
@@ -251,6 +250,26 @@
|
|
#define WRITE_CR4(x) write_cr4(x)
|
|
#endif
|
|
|
|
+#define __flush_tlb_one(addr) asm volatile("invlpg (%0)" ::"r" (addr) : "memory")
|
|
+#define __flush_tlb() native_write_cr3(native_read_cr3())
|
|
+
|
|
+static inline void __flush_tlb_all(void)
|
|
+{
|
|
+ if (cpu_has_pge)
|
|
+ {
|
|
+ unsigned long flags, cr4;
|
|
+ raw_local_irq_save(flags);
|
|
+ cr4 = native_read_cr4();
|
|
+ native_write_cr4(cr4 & ~X86_CR4_PGE);
|
|
+ native_write_cr4(cr4);
|
|
+ raw_local_irq_restore(flags);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ __flush_tlb();
|
|
+ }
|
|
+}
|
|
+
|
|
// ============================================================
|
|
/* globals */
|
|
|
|
--- a/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-09-19 00:43:35.000000000 -0400
|
|
+++ b/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-09-19 00:43:48.000000000 -0400
|
|
@@ -868,7 +868,7 @@ void ATI_API_CALL KCL_ACPI_No_Hotplug(vo
|
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
|
|
if(pdev)
|
|
{
|
|
-#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 0 && (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))
|
|
pci_ignore_hotplug(pdev);
|
|
#else
|
|
pdev->ignore_hotplug = 1;
|