summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ati-drivers
diff options
context:
space:
mode:
authorJascha Geerds <jg@ekby.de>2014-12-10 21:30:31 +0100
committerJascha Geerds <jg@ekby.de>2014-12-10 21:30:31 +0100
commitb15311027f0770942ebe697b6b51904c5f174df1 (patch)
tree65c3f9e6b31d1ed7b191a5133ab88e099f4857ab /pkgs/os-specific/linux/ati-drivers
parent3525f7135f9e7ce532facf815c4132b2d9fb7d95 (diff)
downloadnixpkgs-b15311027f0770942ebe697b6b51904c5f174df1.tar
nixpkgs-b15311027f0770942ebe697b6b51904c5f174df1.tar.gz
nixpkgs-b15311027f0770942ebe697b6b51904c5f174df1.tar.bz2
nixpkgs-b15311027f0770942ebe697b6b51904c5f174df1.tar.lz
nixpkgs-b15311027f0770942ebe697b6b51904c5f174df1.tar.xz
nixpkgs-b15311027f0770942ebe697b6b51904c5f174df1.tar.zst
nixpkgs-b15311027f0770942ebe697b6b51904c5f174df1.zip
ati-driver: Fix support for linux kernel 3.17
Diffstat (limited to 'pkgs/os-specific/linux/ati-drivers')
-rw-r--r--pkgs/os-specific/linux/ati-drivers/default.nix2
-rw-r--r--pkgs/os-specific/linux/ati-drivers/fglrx_3.17rc6-no_hotplug.patch31
2 files changed, 32 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix
index ded70890edd..9c7afb929c0 100644
--- a/pkgs/os-specific/linux/ati-drivers/default.nix
+++ b/pkgs/os-specific/linux/ati-drivers/default.nix
@@ -44,7 +44,7 @@ stdenv.mkDerivation {
     curlOpts = "--referer http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64";
   };
 
-  # most patches are taken from gentoo
+  patchPhase = "patch -p1 < ${./fglrx_3.17rc6-no_hotplug.patch}";
   patchPhaseSamples = "patch -p2 < ${./patch-samples.patch}";
 
   buildInputs =
diff --git a/pkgs/os-specific/linux/ati-drivers/fglrx_3.17rc6-no_hotplug.patch b/pkgs/os-specific/linux/ati-drivers/fglrx_3.17rc6-no_hotplug.patch
new file mode 100644
index 00000000000..7afd54a59c5
--- /dev/null
+++ b/pkgs/os-specific/linux/ati-drivers/fglrx_3.17rc6-no_hotplug.patch
@@ -0,0 +1,31 @@
+source: https://aur.archlinux.org/packages/catalyst/
+
+diff -uNr 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-09-09 16:10:17.000000000 +0200
++++ 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-09-26 19:01:44.000000000 +0200
+@@ -1093,6 +1093,9 @@
+     // directly here to allow suspend/resume without X server start. 
+         firegl_pci_save_state((KCL_PCI_DevHandle)pdev, privdev);
+         pci_disable_device(pdev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++	pci_ignore_hotplug(pdev);
++#endif
+         PMSG_EVENT(pdev->dev.power.power_state) = state;
+     }
+     else
+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
+@@ -840,10 +840,12 @@
+    if(tdev != NULL)
+    {
+       device = (acpi_device_adr(tdev) >> 16) & 0xffff;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
+       if(PCI_SLOT(pdev->devfn) == device)
+       {
+          tdev->flags.no_hotplug = true;
+       }
++#endif
+    }
+ #endif
+    return 0;