[Pkg-fglrx-devel] r996 - in fglrx-driver/trunk/debian: . patches

Andreas Beckmann anbe-guest at alioth.debian.org
Fri Jul 27 17:24:53 UTC 2012


Author: anbe-guest
Date: 2012-07-27 17:24:52 +0000 (Fri, 27 Jul 2012)
New Revision: 996

Added:
   fglrx-driver/trunk/debian/patches/01-fglrx_kernel_3.5.0.diff
Modified:
   fglrx-driver/trunk/debian/changelog
   fglrx-driver/trunk/debian/patches/series
Log:
add patch from Hans-Frieder Vogt for compiling the module on kernel 3.5 (not tested, but does not harm 2.6.32, 3.2, 3.4)

Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog	2012-07-27 07:04:43 UTC (rev 995)
+++ fglrx-driver/trunk/debian/changelog	2012-07-27 17:24:52 UTC (rev 996)
@@ -10,6 +10,10 @@
       Closes: #675940
     - Drop patch 01-fglrx_kernel_3.4.0, it has been merged by upstream.
 
+  [ Andreas Beckmann ]
+  * 01-fglrx_kernel_3.5.0.diff: New patch from Hans-Frieder Vogt, fix kernel
+    module build for kernel 3.5.
+
  -- Andreas Beckmann <debian at abeckmann.de>  Sat, 21 Jul 2012 17:31:58 +0200
 
 fglrx-driver (1:12-6-3) unstable; urgency=low

Added: fglrx-driver/trunk/debian/patches/01-fglrx_kernel_3.5.0.diff
===================================================================
--- fglrx-driver/trunk/debian/patches/01-fglrx_kernel_3.5.0.diff	                        (rev 0)
+++ fglrx-driver/trunk/debian/patches/01-fglrx_kernel_3.5.0.diff	2012-07-27 17:24:52 UTC (rev 996)
@@ -0,0 +1,65 @@
+From: "Hans-Frieder Vogt" <hfvogt at gmx.net>
+Subject: [PATCH] fglrx-modules-dkms / fglrx-modules-src: Linux 3.5 support
+Date: Sun, 22 Jul 2012 22:50:48 +0200
+
+Andreas,
+please find attached a patch to support linux 3.5 with the fglrx driver 12-6. Thanks for your effort in creating debian 
+packages of the ATI/AMD driver.
+
+Best regards,
+Hans-Frieder
+
+Patch for fglrx 12-6 kernel module source to support linux 3.5. Tested with various release candidates and with the final 
+version 3.5.
+
+Signed-off-by: Hans-Frieder Vogt <hfvogt at gmx.net>
+
+ firegl_public.c |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c	2012-06-30 21:26:40.000000000 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c	2012-07-08 10:05:36.109924741 +0200
+@@ -2123,9 +2123,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
+@@ -2136,18 +2140,27 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAd
+ {
+     int retcode = 0;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) 
+     down_write(&current->mm->mmap_sem);
++#endif
+ #ifdef FGL_LINUX_RHEL_MUNMAP_API
+     retcode = do_munmap(current->mm,
+                         addr,
+                         len,
+                         1);
+ #else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) 
++    retcode = vm_munmap(addr,
++                        len);
++#else
+     retcode = do_munmap(current->mm,
+                         addr,
+                         len);
+ #endif                        
++#endif                        
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) 
+     up_write(&current->mm->mmap_sem);
++#endif                        
+     return retcode;
+ }
+ 
+
+Hans-Frieder Vogt                       e-mail: hfvogt <at> gmx .dot. net

Modified: fglrx-driver/trunk/debian/patches/series
===================================================================
--- fglrx-driver/trunk/debian/patches/series	2012-07-27 07:04:43 UTC (rev 995)
+++ fglrx-driver/trunk/debian/patches/series	2012-07-27 17:24:52 UTC (rev 996)
@@ -1,2 +1,3 @@
+01-fglrx_kernel_3.5.0.diff
 02-dkms-arch_compat.diff
 03-authatieventsd.sh.diff




More information about the Pkg-fglrx-devel mailing list