about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ati-drivers
diff options
context:
space:
mode:
authorMatt McHenry <github@matt.mchenryfamily.org>2017-02-03 20:25:38 -0500
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-02-11 12:57:53 +0200
commit166464b5ad293e4ce5c50a9e150c00d10f836f93 (patch)
treecdf1a66666dd4a6cecd3b73e48e362255e0c9283 /pkgs/os-specific/linux/ati-drivers
parentdb8ac6144eb26fb2b1a93142e42bafef6a31c6ea (diff)
downloadnixlib-166464b5ad293e4ce5c50a9e150c00d10f836f93.tar
nixlib-166464b5ad293e4ce5c50a9e150c00d10f836f93.tar.gz
nixlib-166464b5ad293e4ce5c50a9e150c00d10f836f93.tar.bz2
nixlib-166464b5ad293e4ce5c50a9e150c00d10f836f93.tar.lz
nixlib-166464b5ad293e4ce5c50a9e150c00d10f836f93.tar.xz
nixlib-166464b5ad293e4ce5c50a9e150c00d10f836f93.tar.zst
nixlib-166464b5ad293e4ce5c50a9e150c00d10f836f93.zip
patch ati-drivers for kernel 4.9
uses patch from https://github.com/imageguy/fglrx-for-Fedora/blob/master/fglrx_kernel_4.9.diff
Diffstat (limited to 'pkgs/os-specific/linux/ati-drivers')
-rw-r--r--pkgs/os-specific/linux/ati-drivers/default.nix5
-rw-r--r--pkgs/os-specific/linux/ati-drivers/patches/4.9-get_user_pages.patch28
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 395850384d1e..d9e6ec3cf624 100644
--- a/pkgs/os-specific/linux/ati-drivers/default.nix
+++ b/pkgs/os-specific/linux/ati-drivers/default.nix
@@ -80,7 +80,10 @@ stdenv.mkDerivation rec {
                  ./patches/kernel-4.6-page_cache_release-put_page.patch ]
   ++ optionals ( kernel != null &&
                  (lib.versionAtLeast kernel.version "4.7") )
-               [ ./patches/4.7-arch-cpu_has_pge-v2.patch ];
+               [ ./patches/4.7-arch-cpu_has_pge-v2.patch ]
+  ++ optionals ( kernel != null &&
+                 (lib.versionAtLeast kernel.version "4.9") )
+               [ ./patches/4.9-get_user_pages.patch ];
 
   buildInputs =
     [ xorg.libXrender xorg.libXext xorg.libX11 xorg.libXinerama xorg.libSM
diff --git a/pkgs/os-specific/linux/ati-drivers/patches/4.9-get_user_pages.patch b/pkgs/os-specific/linux/ati-drivers/patches/4.9-get_user_pages.patch
new file mode 100644
index 000000000000..8a6c42cdb1fc
--- /dev/null
+++ b/pkgs/os-specific/linux/ati-drivers/patches/4.9-get_user_pages.patch
@@ -0,0 +1,28 @@
+commit b3e4353fc68a6a024dcb95e2d61aa0afd7370233
+Author: Matt McHenry <matt@mchenryfamily.org>
+Date:   Fri Feb 3 20:19:41 2017
+
+    patch for 4.9 only
+
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index 4ce095f..3b591e1 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -3224,7 +3224,7 @@ int ATI_API_CALL KCL_LockUserPages(unsigned long vaddr, unsigned long* page_list
+     int ret;
+ 
+     down_read(&current->mm->mmap_sem);
+-    ret = get_user_pages(vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
++    ret = get_user_pages(vaddr, page_cnt, 1, (struct page **)page_list, NULL);
+     up_read(&current->mm->mmap_sem);
+ 
+     return ret;
+@@ -3242,7 +3242,7 @@ int ATI_API_CALL KCL_LockReadOnlyUserPages(unsigned long vaddr, unsigned long* p
+     int ret;
+ 
+     down_read(&current->mm->mmap_sem);
+-    ret = get_user_pages(vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
++    ret = get_user_pages(vaddr, page_cnt, 0, (struct page **)page_list, NULL);
+     up_read(&current->mm->mmap_sem);
+ 
+     return ret;