catalyst: patched for linux4.6

This commit is contained in:
ivierlin 2016-06-08 14:49:33 +02:00
parent 56a04d83be
commit d8843fbf08
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,39 @@
diff --git a/firegl_public.c b/firegl_public.c
--- 15.201/common/lib/modules/fglrx/build_mod/firegl_public.c
+++ 15.201b/common/lib/modules/fglrx/build_mod/firegl_public.c
@@ -3225,7 +3225,11 @@ int ATI_API_CALL KCL_LockUserPages(unsigned long vaddr, unsigned long* page_list
int ret;
down_read(&current->mm->mmap_sem);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+ ret = get_user_pages(vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
+#else
ret = get_user_pages(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
+#endif
up_read(&current->mm->mmap_sem);
return ret;
@@ -3243,7 +3247,11 @@ int ATI_API_CALL KCL_LockReadOnlyUserPages(unsigned long vaddr, unsigned long* p
int ret;
down_read(&current->mm->mmap_sem);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+ ret = get_user_pages(vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
+#else
ret = get_user_pages(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
+#endif
up_read(&current->mm->mmap_sem);
return ret;
@@ -3254,7 +3262,11 @@ void ATI_API_CALL KCL_UnlockUserPages(unsigned long* page_list, unsigned int pag
unsigned int i;
for (i=0; i<page_cnt; i++)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+ put_page((struct page*)page_list[i]);
+#else
page_cache_release((struct page*)page_list[i]);
+#endif
}
}

View File

@ -4,7 +4,7 @@ _release="15.9"
pkgname=catalyst
version=15.201.1151
revision=6
revision=7
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="Proprietary AMD license"
homepage="http://www.amd.com"
@ -17,6 +17,7 @@ conflicts="nvidia>=0 xserver-abi-video>19_1"
short_desc="${_desc} - Utilities"
repository="nonfree"
create_wrksrc=yes
nopie=yes
XBPS_FETCH_CMD="wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' "
@ -44,6 +45,7 @@ do_build() {
[ "$XBPS_MACHINE" = "i686" ] && patch -Np1 -i ${FILESDIR}/crimson_i686_xg.patch
patch -Np1 -i ${FILESDIR}/4.4-manjaro-xstate.patch
patch -Np1 -i ${FILESDIR}/grsec_arch.patch
patch -Np1 -i ${FILESDIR}/4.6-void-user_page.patch
}
do_install() {
cd fglrx-${version}