[packages/xorg-driver-video-fglrx-legacy-12.x] - fix building with linux 3.5 - rel 7
baggins
baggins at pld-linux.org
Tue Sep 25 22:30:44 CEST 2012
commit 308da22e92a7a36b57ed0d4e9dc859145a234090
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Sep 25 22:30:30 2012 +0200
- fix building with linux 3.5
- rel 7
linux-3.5.0-missing_do_mmap.patch | 44 ++++++++++++++++++++++++++++++++
xorg-driver-video-fglrx-legacy-12.x.spec | 4 ++-
2 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-fglrx-legacy-12.x.spec b/xorg-driver-video-fglrx-legacy-12.x.spec
index dd69224..a2ca051 100644
--- a/xorg-driver-video-fglrx-legacy-12.x.spec
+++ b/xorg-driver-video-fglrx-legacy-12.x.spec
@@ -28,7 +28,7 @@
%define arch_dir x86_64
%endif
-%define rel 6
+%define rel 7
%define pname xorg-driver-video-fglrx-legacy-12.x
Summary: Linux Drivers for AMD graphics accelerators
Summary(pl.UTF-8): Sterowniki do akceleratorów graficznych AMD
@@ -53,6 +53,7 @@ Patch3: xorg-driver-video-fglrx-desktop.patch
Patch4: xorg-driver-video-fglrx-nofinger.patch
Patch5: xorg-driver-video-fglrx-GPL-only.patch
Patch6: xorg-driver-video-fglrx-kernel-fpu.patch
+Patch7: linux-3.5.0-missing_do_mmap.patch
URL: http://ati.amd.com/support/drivers/linux/linux-radeon.html
%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
BuildRequires: rpmbuild(macros) >= 1.379
@@ -198,6 +199,7 @@ cp -p arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/bu
%patch4 -p1
%patch5 -p1
%patch6 -p0
+%patch7 -p1
install -d common{%{_prefix}/{%{_lib},bin,sbin},/etc}
cp -a %{x11ver}%{arch_sufix}/usr/X11R6/%{_lib}/* common%{_libdir}
diff --git a/linux-3.5.0-missing_do_mmap.patch b/linux-3.5.0-missing_do_mmap.patch
new file mode 100644
index 0000000..5a755a6
--- /dev/null
+++ b/linux-3.5.0-missing_do_mmap.patch
@@ -0,0 +1,44 @@
+--- xorg-driver-video-fglrx-12.8/common/lib/modules/fglrx/build_mod/firegl_public.c.orig 2012-07-29 15:27:34.069562576 +0200
++++ xorg-driver-video-fglrx-12.8/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-07-29 15:19:30.431849972 +0200
+@@ -2126,9 +2126,13 @@ unsigned long ATI_API_CALL KCL_MEM_Alloc
+ flags = MAP_SHARED;
+ prot = PROT_READ|PROT_WRITE;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);
++#else
+ down_write(¤t->mm->mmap_sem);
+ vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
+ up_write(¤t->mm->mmap_sem);
++#endif
+ if (IS_ERR(vaddr))
+ return 0;
+ else
+@@ -2139,6 +2143,16 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAd
+ {
+ int retcode = 0;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#ifdef FGL_LINUX_RHEL_MUNMAP_API
++ retcode = vm_munmap(addr,
++ len,
++ 1);
++#else
++ retcode = vm_munmap(addr,
++ len);
++#endif
++#else
+ down_write(¤t->mm->mmap_sem);
+ #ifdef FGL_LINUX_RHEL_MUNMAP_API
+ retcode = do_munmap(current->mm,
+@@ -2149,8 +2163,9 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAd
+ retcode = do_munmap(current->mm,
+ addr,
+ len);
+-#endif
+ up_write(¤t->mm->mmap_sem);
++#endif
++#endif
+ return retcode;
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-fglrx-legacy-12.x.git/commitdiff/308da22e92a7a36b57ed0d4e9dc859145a234090
More information about the pld-cvs-commit
mailing list