git.iko.soy/typeable/nixpkgs
on master help sign in
patch ati-drivers for kernel 4.9

uses patch from https://github.com/imageguy/fglrx-for-Fedora/blob/master/fglrx_kernel_4.9.diff

commit166464b5ad293e4ce5c50a9e150c00d10f836f93 authorMatt McHenry <github@matt.mchenryfamily.org> dateFri 3 Feb 2017, 20:25 (10 years ago) parentdb8ac61
2 files changed+32−1
pkgs/os-specific/linux/ati-drivers/default.nix+4−1 pkgs/os-specific/linux/ati-drivers/patches/4.9-get_user_pages.patch+28
pkgs/os-specific/linux/ati-drivers/default.nix+4−1
@@ -80,7 +80,10 @@ stdenv.mkDerivation rec {
8080 ./patches/kernel-4.6-page_cache_release-put_page.patch ]
8181 ++ optionals ( kernel != null &&
8282 (lib.versionAtLeast kernel.version "4.7") )
83− [ ./patches/4.7-arch-cpu_has_pge-v2.patch ];
83+ [ ./patches/4.7-arch-cpu_has_pge-v2.patch ]
84+ ++ optionals ( kernel != null &&
85+ (lib.versionAtLeast kernel.version "4.9") )
86+ [ ./patches/4.9-get_user_pages.patch ];
8487
8588 buildInputs =
8689 [ xorg.libXrender xorg.libXext xorg.libX11 xorg.libXinerama xorg.libSM
pkgs/os-specific/linux/ati-drivers/patches/4.9-get_user_pages.patchnew file+28
@@ -0,0 +1,28 @@
1+commit b3e4353fc68a6a024dcb95e2d61aa0afd7370233
2+Author: Matt McHenry <matt@mchenryfamily.org>
3+Date: Fri Feb 3 20:19:41 2017
4+
5+ patch for 4.9 only
6+
7+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
8+index 4ce095f..3b591e1 100755
9+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
10++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
11+@@ -3224,7 +3224,7 @@ int ATI_API_CALL KCL_LockUserPages(unsigned long vaddr, unsigned long* page_list
12+ int ret;
13+
14+ down_read(&current->mm->mmap_sem);
15+- ret = get_user_pages(vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
16++ ret = get_user_pages(vaddr, page_cnt, 1, (struct page **)page_list, NULL);
17+ up_read(&current->mm->mmap_sem);
18+
19+ return ret;
20+@@ -3242,7 +3242,7 @@ int ATI_API_CALL KCL_LockReadOnlyUserPages(unsigned long vaddr, unsigned long* p
21+ int ret;
22+
23+ down_read(&current->mm->mmap_sem);
24+- ret = get_user_pages(vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
25++ ret = get_user_pages(vaddr, page_cnt, 0, (struct page **)page_list, NULL);
26+ up_read(&current->mm->mmap_sem);
27+
28+ return ret;