git.iko.soy/typeable/nixpkgs
on master help sign in
ati-driver: Fix support for linux kernel 3.17
commitb15311027f0770942ebe697b6b51904c5f174df1 authorJascha Geerds <jg@ekby.de> dateWed 10 Dec 2014, 21:30 (12 years ago) parent3525f71
2 files changed+32−1
pkgs/os-specific/linux/ati-drivers/default.nix+1−1 pkgs/os-specific/linux/ati-drivers/fglrx_3.17rc6-no_hotplug.patch+31
pkgs/os-specific/linux/ati-drivers/default.nix+1−1
@@ -44,7 +44,7 @@ stdenv.mkDerivation {
4444 curlOpts = "--referer http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64";
4545 };
4646
47− # most patches are taken from gentoo
47+ patchPhase = "patch -p1 < ${./fglrx_3.17rc6-no_hotplug.patch}";
4848 patchPhaseSamples = "patch -p2 < ${./patch-samples.patch}";
4949
5050 buildInputs =
pkgs/os-specific/linux/ati-drivers/fglrx_3.17rc6-no_hotplug.patchnew file+31
@@ -0,0 +1,31 @@
1+source: https://aur.archlinux.org/packages/catalyst/
2+
3+diff -uNr 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c
4+--- 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-09-09 16:10:17.000000000 +0200
5++++ 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-09-26 19:01:44.000000000 +0200
6+@@ -1093,6 +1093,9 @@
7+ // directly here to allow suspend/resume without X server start.
8+ firegl_pci_save_state((KCL_PCI_DevHandle)pdev, privdev);
9+ pci_disable_device(pdev);
10++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
11++ pci_ignore_hotplug(pdev);
12++#endif
13+ PMSG_EVENT(pdev->dev.power.power_state) = state;
14+ }
15+ else
16+diff -uNr 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c
17+--- 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2014-09-09 16:10:17.000000000 +0200
18++++ 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2014-09-26 18:57:27.000000000 +0200
19+@@ -840,10 +840,12 @@
20+ if(tdev != NULL)
21+ {
22+ device = (acpi_device_adr(tdev) >> 16) & 0xffff;
23++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
24+ if(PCI_SLOT(pdev->devfn) == device)
25+ {
26+ tdev->flags.no_hotplug = true;
27+ }
28++#endif
29+ }
30+ #endif
31+ return 0;