aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/powervr-drivers/omap3-sgx-modules/Compile-fixes-for-38-kernel.patch
blob: fc315bcec26189811bfc3dae0f34a9b3b791be45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c-orig	2011-03-08 04:27:35.000000000 -0800
+++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c	2011-03-17 13:11:31.000000000 -0700
@@ -235,9 +235,20 @@ static OMAP_ERROR UnblankDisplay(OMAPLFB
 {
 	int res;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
+	console_lock();
+#else
 	acquire_console_sem();
+#endif
+
 	res = fb_blank(psDevInfo->psLINFBInfo, 0);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
+	console_unlock();
+#else
 	release_console_sem();
+#endif
+
 #if !defined (CONFIG_OMAP2_DSS)
 	if (res != 0 && res != -EINVAL)
 	{
@@ -1118,7 +1129,11 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF
 	OMAP_ERROR eError = OMAP_ERROR_GENERIC;
 	unsigned long FBSize;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
+	console_lock();
+#else
 	acquire_console_sem();
+#endif
 
 	if (fb_idx < 0 || fb_idx >= num_registered_fb)
 	{
@@ -1254,7 +1269,11 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF
 errModPut:
 	module_put(psLINFBOwner);
 errRelSem:
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
+	console_unlock();
+#else
 	release_console_sem();
+#endif
 	return eError;
 }
 
@@ -1263,7 +1282,11 @@ static void DeInitDev(OMAPLFB_DEVINFO *p
 	struct fb_info *psLINFBInfo = psDevInfo->psLINFBInfo;
 	struct module *psLINFBOwner;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
+	console_lock();
+#else
 	acquire_console_sem();
+#endif
 
 	psLINFBOwner = psLINFBInfo->fbops->owner;
 
@@ -1274,7 +1297,11 @@ static void DeInitDev(OMAPLFB_DEVINFO *p
 
 	module_put(psLINFBOwner);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
+	console_unlock();
+#else
 	release_console_sem();
+#endif
 }
 
 OMAP_ERROR OMAPLFBInit(void)
--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c-orig	2011-03-08 04:27:35.000000000 -0800
+++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c	2011-03-17 13:40:15.000000000 -0700
@@ -24,11 +24,14 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
 #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <linux/module.h>
 
 #include <linux/pci.h>
--- GFX_Linux_KM/services4/srvkm/common/resman.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/common/resman.c	2011-03-17 14:20:07.000000000 -0700
@@ -24,15 +24,17 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
 #include "services_headers.h"
 #include "resman.h"
 
 #ifdef __linux__
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <linux/sched.h>
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
 #include <linux/hardirq.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c	2011-03-17 14:33:09.000000000 -0700
@@ -24,9 +24,13 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_uaccess.h-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_uaccess.h	2011-03-17 14:39:14.000000000 -0700
@@ -27,11 +27,14 @@
 #ifndef __PVR_UACCESS_H__
 #define __PVR_UACCESS_H__
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <asm/uaccess.h>
 
 static inline unsigned long pvr_copy_to_user(void __user *pvTo, const void *pvFrom, unsigned long ulBytes)
--- GFX_Linux_KM/services4/srvkm/env/linux/mm.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/mm.c	2011-03-17 14:46:23.000000000 -0700
@@ -24,11 +24,14 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
 #include <asm/io.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.h-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/mutils.h	2011-03-17 14:54:37.000000000 -0700
@@ -27,11 +27,13 @@
 #ifndef __IMG_LINUX_MUTILS_H__
 #define __IMG_LINUX_MUTILS_H__
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
 #include <linux/config.h>
 #endif
-
-#include <linux/version.h>
+#endif
 
 #if !(defined(__i386__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)))
 #if defined(SUPPORT_LINUX_X86_PAT)
--- GFX_Linux_KM/services4/srvkm/env/linux/mm.h-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/mm.h	2011-03-17 15:33:56.000000000 -0700
@@ -27,11 +27,14 @@
 #ifndef __IMG_LINUX_MM_H__
 #define __IMG_LINUX_MM_H__
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/list.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/mmap.c-orig	2011-03-17 20:39:31.000000000 -0700
+++ GFX_Linux_KM/services4/srvkm/env/linux/mmap.c	2011-03-17 20:40:00.000000000 -0700
@@ -24,11 +24,14 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/vmalloc.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/proc.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/proc.c	2011-03-17 21:01:35.000000000 -0700
@@ -24,13 +24,16 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/module.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/module.c	2011-03-17 21:32:19.000000000 -0700
@@ -24,9 +24,13 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
 #if !defined(SUPPORT_DRI_DRM)
 	
@@ -44,7 +48,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
 
--- GFX_Linux_KM/services4/srvkm/env/linux/event.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/event.c	2011-03-18 08:51:42.000000000 -0700
@@ -24,11 +24,14 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <asm/io.h>
 #include <asm/page.h>
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
--- GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c	2011-03-18 08:58:16.000000000 -0700
@@ -24,11 +24,14 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
-#include <linux/version.h>
 #include <asm/io.h>
 #include <asm/page.h>
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_drm.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_drm.c	2011-03-18 09:01:06.000000000 -0700
@@ -26,14 +26,17 @@
 
 #if defined(SUPPORT_DRI_DRM)
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
  #include <linux/config.h>
 #endif
+#endif
 
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
 #include <asm/ioctl.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.c-orig	2011-03-08 04:27:36.000000000 -0800
+++ GFX_Linux_KM/services4/srvkm/env/linux/mutils.c	2011-03-18 09:08:12.000000000 -0700
@@ -24,10 +24,13 @@
  *
  ******************************************************************************/
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #ifndef AUTOCONF_INCLUDED
 #include <linux/config.h>
 #endif
-#include <linux/version.h>
+#endif
 
 #include <linux/spinlock.h>
 #include <linux/mm.h>
--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c-orig	2011-03-31 13:46:48.000000000 -0700
+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c	2011-03-31 15:14:10.000000000 -0700
@@ -76,7 +76,8 @@ static IMG_CHAR gszBufferIRQ[PVR_MAX_MSG
 static PVRSRV_LINUX_MUTEX gsDebugMutexNonIRQ;
 
  
-static spinlock_t gsDebugLockIRQ = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(gsDebugLockIRQ);
+
 
 #if !defined (USE_SPIN_LOCK)  
 #define	USE_SPIN_LOCK (in_interrupt() || !preemptible())