[packages/xorg-driver-video-fglrx] - fix building with linux 4.6 - rel 2

baggins baggins at pld-linux.org
Sun Jun 19 18:12:36 CEST 2016


commit abb30b2a53dd0f5e7121028e1c4990d32d9d2c47
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jun 19 18:12:18 2016 +0200

    - fix building with linux 4.6
    - rel 2

 linux-4.6.patch              | 38 ++++++++++++++++++++++++++++++++++++++
 xorg-driver-video-fglrx.spec |  4 +++-
 2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-fglrx.spec b/xorg-driver-video-fglrx.spec
index 47f91dc..84dde3b 100644
--- a/xorg-driver-video-fglrx.spec
+++ b/xorg-driver-video-fglrx.spec
@@ -32,7 +32,7 @@ exit 1
 %define		betaver		1.0
 #define		rel		0.beta%{betaver}.3
 
-%define		rel		1
+%define		rel		2
 %define		pname		xorg-driver-video-fglrx
 Summary:	Linux Drivers for AMD/ATI graphics accelerators
 Summary(pl.UTF-8):	Sterowniki do akceleratorów graficznych AMD/ATI
@@ -66,6 +66,7 @@ Patch9:		linux-4.2.patch
 Patch10:	linux-4.3.patch
 Patch11:	linux-4.4.patch
 Patch12:	linux-4.5.patch
+Patch13:	linux-4.6.patch
 URL:		http://ati.amd.com/support/drivers/linux/linux-radeon.html
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
 BuildRequires:	rpmbuild(macros) >= 1.701
@@ -236,6 +237,7 @@ EOF
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 
 install -d common{%{_prefix}/{%{_lib},bin,sbin},/etc}
 cp -a %{x11ver}%{arch_sufix}/usr/X11R6/%{_lib}/* common%{_libdir}
diff --git a/linux-4.6.patch b/linux-4.6.patch
new file mode 100644
index 0000000..fcf8b23
--- /dev/null
+++ b/linux-4.6.patch
@@ -0,0 +1,38 @@
+--- xorg-driver-video-fglrx-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c.orig	2016-06-19 18:04:29.731479926 +0200
++++ xorg-driver-video-fglrx-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-06-19 18:11:14.236335016 +0200
+@@ -3228,7 +3228,11 @@
+     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;
+@@ -3246,7 +3250,11 @@
+     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;
+@@ -3257,7 +3265,11 @@
+     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
+     }
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-fglrx.git/commitdiff/abb30b2a53dd0f5e7121028e1c4990d32d9d2c47



More information about the pld-cvs-commit mailing list