summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-12-11 22:12:20 +0100
committerVladimír Čunát <vcunat@gmail.com>2014-12-11 22:12:20 +0100
commit80e3018bc0bde424e070856c4686fd1b42d19a4a (patch)
tree5377cde492f4cd1ebdceb074ec71c6ccbcaca95d /pkgs/os-specific
parent5f18c41a1b6347a37a96c3524881f288f60062e6 (diff)
parentb15311027f0770942ebe697b6b51904c5f174df1 (diff)
downloadnixlib-80e3018bc0bde424e070856c4686fd1b42d19a4a.tar
nixlib-80e3018bc0bde424e070856c4686fd1b42d19a4a.tar.gz
nixlib-80e3018bc0bde424e070856c4686fd1b42d19a4a.tar.bz2
nixlib-80e3018bc0bde424e070856c4686fd1b42d19a4a.tar.lz
nixlib-80e3018bc0bde424e070856c4686fd1b42d19a4a.tar.xz
nixlib-80e3018bc0bde424e070856c4686fd1b42d19a4a.tar.zst
nixlib-80e3018bc0bde424e070856c4686fd1b42d19a4a.zip
Merge #5286: ati-driver: Update to 4.12
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/ati-drivers/builder.sh1
-rw-r--r--pkgs/os-specific/linux/ati-drivers/default.nix9
-rw-r--r--pkgs/os-specific/linux/ati-drivers/fglrx_3.17rc6-no_hotplug.patch31
-rw-r--r--pkgs/os-specific/linux/ati-drivers/gentoo-patches.patch33
4 files changed, 36 insertions, 38 deletions
diff --git a/pkgs/os-specific/linux/ati-drivers/builder.sh b/pkgs/os-specific/linux/ati-drivers/builder.sh
index 325fb869a707..8df039101462 100644
--- a/pkgs/os-specific/linux/ati-drivers/builder.sh
+++ b/pkgs/os-specific/linux/ati-drivers/builder.sh
@@ -224,6 +224,7 @@ fi
 
   # libstdc++ and gcc are needed by some libs
   patchelf --set-rpath $gcc/$lib_arch $out/lib/libatiadlxx.so
+  patchelf --set-rpath $gcc/$lib_arch $out/lib/xorg/modules/glesx.so
 }
 
 if test -z "$libsOnly"; then
diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix
index 11657d342917..9c7afb929c08 100644
--- a/pkgs/os-specific/linux/ati-drivers/default.nix
+++ b/pkgs/os-specific/linux/ati-drivers/default.nix
@@ -31,7 +31,7 @@ assert (!libsOnly) -> kernel != null;
 with stdenv.lib;
 
 stdenv.mkDerivation {
-  name = "ati-drivers-14.4" + (optionalString (!libsOnly) "-${kernel.version}");
+  name = "ati-drivers-14.12" + (optionalString (!libsOnly) "-${kernel.version}");
 
   builder = ./builder.sh;
 
@@ -39,13 +39,12 @@ stdenv.mkDerivation {
   gcc = stdenv.gcc.gcc;
 
   src = fetchurl {
-    url = http://www2.ati.com/drivers/linux/amd-catalyst-14-4-rev2-linux-x86-x86-64-may6.zip;
-    sha256 = "1xbhn55yifis9b0lzb3s03hc1bcq8jmy7l96m4x8d842n7ji7qlk";
+    url = http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip;
+    sha256 = "0jd2scrdlyapynxfjdrarnwcdzxjqrk5fg5i10g3bm0ay8v9hrk8";
     curlOpts = "--referer http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64";
   };
 
-  # most patches are taken from gentoo
-  patchPhase = "patch -p1 < ${./gentoo-patches.patch}";
+  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 000000000000..7afd54a59c50
--- /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;
diff --git a/pkgs/os-specific/linux/ati-drivers/gentoo-patches.patch b/pkgs/os-specific/linux/ati-drivers/gentoo-patches.patch
deleted file mode 100644
index fd1d12cccb62..000000000000
--- a/pkgs/os-specific/linux/ati-drivers/gentoo-patches.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
-index d3ad3ce..9362b58 100755
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -34,6 +34,11 @@
- #include <linux/autoconf.h>
- #endif
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
-+#include <linux/uidgid.h>
-+#endif
-+
-+
- #if !defined(CONFIG_X86) 
- #if !defined(CONFIG_X86_PC) 
- #if !defined(CONFIG_X86_XEN) 
-@@ -1543,9 +1548,17 @@ KCL_TYPE_Pid ATI_API_CALL KCL_GetTgid(void)
- KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
- {
- #ifdef current_euid
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
-+    return __kuid_val(current_euid());
-+# else
-     return current_euid();
-+# endif
- #else
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
-+    return __kuid_val(current->euid);
-+# else
-     return current->euid;
-+# endif
- #endif
- }