Gentoo Archives: gentoo-commits

From: "Chi-Thanh Christopher Nguyen (chithanh)" <chithanh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-drivers/ati-drivers/files: ati-drivers-2.6.39.patch
Date: Thu, 26 May 2011 20:17:20
Message-Id: 20110526201709.8EBC020057@flycatcher.gentoo.org
1 chithanh 11/05/26 20:17:09
2
3 Added: ati-drivers-2.6.39.patch
4 Log:
5 Import 2.6.39 patch and Enrico Tagliavini's ebuild from the x11 overlay, bug #368081.
6
7 (Portage version: 2.2.0_alpha34/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
11
12 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
13 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
14
15 Index: ati-drivers-2.6.39.patch
16 ===================================================================
17 Description: add support for missing kernel lock
18 Author: Pascal Giard <evilynux@×××××.com>
19
20 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
21 --- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:30:08.000000000 +0200
22 +++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:29:27.000000000 +0200
23 @@ -1902,13 +1902,17 @@
24 /** \brief Grab global kernel lock */
25 void ATI_API_CALL KCL_GlobalKernelLock(void)
26 {
27 +#ifdef CONFIG_KERNEL_LOCK
28 lock_kernel();
29 +#endif
30 }
31
32 /** \brief Release global kernel lock */
33 void ATI_API_CALL KCL_GlobalKernelUnlock(void)
34 {
35 +#ifdef CONFIG_KERNEL_LOCK
36 unlock_kernel();
37 +#endif
38 }
39
40 /*****************************************************************************/
41 # Do not include smp_lock.h if the Kernel is built without BKL.
42 # Closes: #619952
43
44 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
45 --- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h 2011-03-24 17:00:28.000000000 +0100
46 +++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h 2011-03-29 20:39:05.000000000 +0200
47 @@ -57,7 +57,11 @@
48 #include <linux/pci.h>
49 #include <linux/version.h>
50 #include <linux/sched.h>
51 +/* with no Big Kernel Lock and linux 2.6.38
52 + and higher smp_lock.h is removed */
53 +#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
54 #include <linux/smp_lock.h> /* For (un)lock_kernel */
55 +#endif
56 #include <linux/mm.h>
57 #include <linux/pagemap.h>
58 #if defined(__alpha__) || defined(__powerpc__)
59 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
60 --- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-03-29 20:37:04.000000000 +0200
61 +++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-03-29 20:39:05.000000000 +0200
62 @@ -116,7 +116,16 @@
63 #include <linux/pci.h>
64 #include <linux/wait.h>
65 #include <linux/miscdevice.h>
66 -#include <linux/smp_lock.h>
67 +
68 +/* with no Big Kernel Lock and linux 2.6.38
69 + and higher is smp_lock.h removed.
70 + instead of smp_lock.h is sched.h required */
71 +#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
72 +#include <linux/smp_lock.h> /* For (un)lock_kernel */
73 +#else
74 +#include <linux/sched.h>
75 +#endif
76 +
77 // newer SuSE kernels need this
78 #include <linux/highmem.h>
79
80 Description: Add Linux 2.6.39 support
81 <linux/spinlock_types.h> had the following comment until 2.6.38:
82 .
83 /*
84 * SPIN_LOCK_UNLOCKED defeats lockdep state tracking and is hence
85 * deprecated.
86 * Please use DEFINE_SPINLOCK() or __SPIN_LOCK_UNLOCKED() as
87 * appropriate.
88 */
89 #define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init)
90 .
91 This definition got removed in 2.6.39. Restore it locally until it gets fixed
92 upstream.
93 Author: Miguel Colon <debian.micove@×××××.com>
94 Forwarded: no
95 Last-Update: 2011-03-30
96
97 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
98 --- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:48:43.000000000 +0200
99 +++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:49:36.000000000 +0200
100 @@ -1060,7 +1060,12 @@
101 dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
102
103 for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
104 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
105 dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
106 +#else
107 + dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init);
108 +#endif
109 +
110
111 for (i=0; i < __KE_MAX_SEMAPHORES; i++)
112 sema_init(&dev->struct_sem[i], 1);