lol

patch ati-drivers for kernel 4.9

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

authored by

Matt McHenry and committed by
Tuomas Tynkkynen
166464b5 db8ac614

+32 -1
+4 -1
pkgs/os-specific/linux/ati-drivers/default.nix
··· 80 80 ./patches/kernel-4.6-page_cache_release-put_page.patch ] 81 81 ++ optionals ( kernel != null && 82 82 (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 ]; 84 87 85 88 buildInputs = 86 89 [ xorg.libXrender xorg.libXext xorg.libX11 xorg.libXinerama xorg.libSM
+28
pkgs/os-specific/linux/ati-drivers/patches/4.9-get_user_pages.patch
··· 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;