public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in x11-drivers/ati-drivers/files: ati-drivers-2.6.39.patch
@ 2011-05-26 20:17 Chi-Thanh Christopher Nguyen (chithanh)
  0 siblings, 0 replies; only message in thread
From: Chi-Thanh Christopher Nguyen (chithanh) @ 2011-05-26 20:17 UTC (permalink / raw
  To: gentoo-commits

chithanh    11/05/26 20:17:09

  Added:                ati-drivers-2.6.39.patch
  Log:
  Import 2.6.39 patch and Enrico Tagliavini's ebuild from the x11 overlay, bug #368081.
  
  (Portage version: 2.2.0_alpha34/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch?rev=1.1&content-type=text/plain

Index: ati-drivers-2.6.39.patch
===================================================================
Description: add support for missing kernel lock
Author: Pascal Giard <evilynux@gmail.com>

diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
--- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:30:08.000000000 +0200
+++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:29:27.000000000 +0200
@@ -1902,13 +1902,17 @@
 /** \brief Grab global kernel lock */
 void ATI_API_CALL KCL_GlobalKernelLock(void)
 {
+#ifdef CONFIG_KERNEL_LOCK
     lock_kernel();
+#endif
 }
 
 /** \brief Release global kernel lock */
 void ATI_API_CALL KCL_GlobalKernelUnlock(void)
 {
+#ifdef CONFIG_KERNEL_LOCK
     unlock_kernel();
+#endif
 }
 
 /*****************************************************************************/
# Do not include smp_lock.h if the Kernel is built without BKL.
# Closes: #619952

diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h
--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-24 17:00:28.000000000 +0100
+++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-29 20:39:05.000000000 +0200
@@ -57,7 +57,11 @@
 #include <linux/pci.h>
 #include <linux/version.h>
 #include <linux/sched.h>
+/* with no Big Kernel Lock and linux 2.6.38
+   and higher smp_lock.h is removed      */
+#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #include <linux/smp_lock.h>	/* For (un)lock_kernel */
+#endif
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #if defined(__alpha__) || defined(__powerpc__)
diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c
--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:37:04.000000000 +0200
+++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:39:05.000000000 +0200
@@ -116,7 +116,16 @@
 #include <linux/pci.h>
 #include <linux/wait.h>
 #include <linux/miscdevice.h>
-#include <linux/smp_lock.h>
+
+/* with no Big Kernel Lock and linux 2.6.38
+   and higher is smp_lock.h removed.
+   instead of smp_lock.h is sched.h required    */
+#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
+#include <linux/smp_lock.h>	/* For (un)lock_kernel */
+#else
+#include <linux/sched.h>
+#endif
+
 // newer SuSE kernels need this
 #include <linux/highmem.h>
 
Description: Add Linux 2.6.39 support
 <linux/spinlock_types.h> had the following comment until 2.6.38:
 .
 /*
  * SPIN_LOCK_UNLOCKED defeats lockdep state tracking and is hence
  * deprecated.
  * Please use DEFINE_SPINLOCK() or __SPIN_LOCK_UNLOCKED() as
  * appropriate.
  */
 #define SPIN_LOCK_UNLOCKED     __SPIN_LOCK_UNLOCKED(old_style_spin_init)
 .
 This definition got removed in 2.6.39. Restore it locally until it gets fixed
 upstream.
Author: Miguel Colon <debian.micove@gmail.com>
Forwarded: no
Last-Update: 2011-03-30

diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
--- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:48:43.000000000 +0200
+++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:49:36.000000000 +0200
@@ -1060,7 +1060,12 @@
     dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
 
     for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
         dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
+#else
+        dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init);
+#endif
+
 
     for (i=0; i < __KE_MAX_SEMAPHORES; i++)
         sema_init(&dev->struct_sem[i], 1);






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-26 20:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 20:17 [gentoo-commits] gentoo-x86 commit in x11-drivers/ati-drivers/files: ati-drivers-2.6.39.patch Chi-Thanh Christopher Nguyen (chithanh)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox