commit 35532630b62bfe700061724255ba5cb351093fe7
Author: Jan Rękorajski <[email protected]>
Date:   Tue Sep 25 22:26:08 2012 +0200

    - fix building with linux 3.5
    - rel 5

 linux-3.5.0-missing_do_mmap.patch | 44 +++++++++++++++++++++++++++++++++++++++
 xorg-driver-video-fglrx.spec      |  4 +++-
 2 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-fglrx.spec b/xorg-driver-video-fglrx.spec
index 8f01623..9f5bd4b 100644
--- a/xorg-driver-video-fglrx.spec
+++ b/xorg-driver-video-fglrx.spec
@@ -30,7 +30,7 @@
 
 %define                intver          8.982
 
-%define                rel             4
+%define                rel             5
 %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
@@ -56,6 +56,7 @@ Patch3:               %{pname}-desktop.patch
 Patch4:                %{pname}-nofinger.patch
 Patch5:                %{pname}-GPL-only.patch
 Patch7:                %{pname}-kernel-fpu.patch
+Patch8:                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
@@ -202,6 +203,7 @@ cp -p arch/%{arch_dir}/lib/modules/fglrx/build_mod/* 
common/lib/modules/fglrx/bu
 %patch4 -p1
 %patch5 -p1
 %patch7 -p0
+%patch8 -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(&current->mm->mmap_sem);
+     vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
+     up_write(&current->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(&current->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(&current->mm->mmap_sem);
++#endif
++#endif
+     return retcode;
+ }
+ 
================================================================

---- gitweb:

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to