summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/powervr-drivers
diff options
context:
space:
mode:
authorPrabindh Sundareson <prabu@ti.com>2013-06-12 22:52:42 +0530
committerDenys Dmytriyenko <denys@ti.com>2013-06-21 14:43:24 -0400
commitdf2d999252b17598671112f152a9ddbc079ea704 (patch)
treee366b8522f974623afa1eb1d3d8338dd24be7176 /recipes-bsp/powervr-drivers
parent086be90ce8099c5b06a443e386479cada4d4709a (diff)
downloadmeta-ti-df2d999252b17598671112f152a9ddbc079ea704.tar.gz
omap3-sgx-modules-x11: Separate X11 SGX driver package into new recipe
omap3-sgx-modules now contains only non-X11 drivers. The X11 driver is available in the omap3-sgx-modules-x11 package. Signed-off-by: Prabindh Sundareson <prabu at ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-bsp/powervr-drivers')
-rw-r--r--recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/Compile-fixes-for-38-kernel.patch346
-rw-r--r--recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/kernel-30.patch38
-rw-r--r--recipes-bsp/powervr-drivers/omap3-sgx-modules-x11_4.09.00.01.bb74
3 files changed, 458 insertions, 0 deletions
diff --git a/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/Compile-fixes-for-38-kernel.patch b/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/Compile-fixes-for-38-kernel.patch
new file mode 100644
index 00000000..fc315bce
--- /dev/null
+++ b/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/Compile-fixes-for-38-kernel.patch
@@ -0,0 +1,346 @@
1--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c-orig 2011-03-08 04:27:35.000000000 -0800
2+++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2011-03-17 13:11:31.000000000 -0700
3@@ -235,9 +235,20 @@ static OMAP_ERROR UnblankDisplay(OMAPLFB
4 {
5 int res;
6
7+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
8+ console_lock();
9+#else
10 acquire_console_sem();
11+#endif
12+
13 res = fb_blank(psDevInfo->psLINFBInfo, 0);
14+
15+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
16+ console_unlock();
17+#else
18 release_console_sem();
19+#endif
20+
21 #if !defined (CONFIG_OMAP2_DSS)
22 if (res != 0 && res != -EINVAL)
23 {
24@@ -1118,7 +1129,11 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF
25 OMAP_ERROR eError = OMAP_ERROR_GENERIC;
26 unsigned long FBSize;
27
28+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
29+ console_lock();
30+#else
31 acquire_console_sem();
32+#endif
33
34 if (fb_idx < 0 || fb_idx >= num_registered_fb)
35 {
36@@ -1254,7 +1269,11 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF
37 errModPut:
38 module_put(psLINFBOwner);
39 errRelSem:
40+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
41+ console_unlock();
42+#else
43 release_console_sem();
44+#endif
45 return eError;
46 }
47
48@@ -1263,7 +1282,11 @@ static void DeInitDev(OMAPLFB_DEVINFO *p
49 struct fb_info *psLINFBInfo = psDevInfo->psLINFBInfo;
50 struct module *psLINFBOwner;
51
52+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
53+ console_lock();
54+#else
55 acquire_console_sem();
56+#endif
57
58 psLINFBOwner = psLINFBInfo->fbops->owner;
59
60@@ -1274,7 +1297,11 @@ static void DeInitDev(OMAPLFB_DEVINFO *p
61
62 module_put(psLINFBOwner);
63
64+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
65+ console_unlock();
66+#else
67 release_console_sem();
68+#endif
69 }
70
71 OMAP_ERROR OMAPLFBInit(void)
72--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c-orig 2011-03-08 04:27:35.000000000 -0800
73+++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2011-03-17 13:40:15.000000000 -0700
74@@ -24,11 +24,14 @@
75 *
76 ******************************************************************************/
77
78+#include <linux/version.h>
79+
80+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
81 #ifndef AUTOCONF_INCLUDED
82 #include <linux/config.h>
83 #endif
84+#endif
85
86-#include <linux/version.h>
87 #include <linux/module.h>
88
89 #include <linux/pci.h>
90--- GFX_Linux_KM/services4/srvkm/common/resman.c-orig 2011-03-08 04:27:36.000000000 -0800
91+++ GFX_Linux_KM/services4/srvkm/common/resman.c 2011-03-17 14:20:07.000000000 -0700
92@@ -24,15 +24,17 @@
93 *
94 ******************************************************************************/
95
96+#include <linux/version.h>
97 #include "services_headers.h"
98 #include "resman.h"
99
100 #ifdef __linux__
101+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
102 #ifndef AUTOCONF_INCLUDED
103 #include <linux/config.h>
104 #endif
105+#endif
106
107-#include <linux/version.h>
108 #include <linux/sched.h>
109 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
110 #include <linux/hardirq.h>
111--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c-orig 2011-03-08 04:27:36.000000000 -0800
112+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c 2011-03-17 14:33:09.000000000 -0700
113@@ -24,9 +24,13 @@
114 *
115 ******************************************************************************/
116
117+#include <linux/version.h>
118+
119+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
120 #ifndef AUTOCONF_INCLUDED
121 #include <linux/config.h>
122 #endif
123+#endif
124
125 #include <asm/io.h>
126 #include <asm/uaccess.h>
127--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_uaccess.h-orig 2011-03-08 04:27:36.000000000 -0800
128+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_uaccess.h 2011-03-17 14:39:14.000000000 -0700
129@@ -27,11 +27,14 @@
130 #ifndef __PVR_UACCESS_H__
131 #define __PVR_UACCESS_H__
132
133+#include <linux/version.h>
134+
135+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
136 #ifndef AUTOCONF_INCLUDED
137 #include <linux/config.h>
138 #endif
139+#endif
140
141-#include <linux/version.h>
142 #include <asm/uaccess.h>
143
144 static inline unsigned long pvr_copy_to_user(void __user *pvTo, const void *pvFrom, unsigned long ulBytes)
145--- GFX_Linux_KM/services4/srvkm/env/linux/mm.c-orig 2011-03-08 04:27:36.000000000 -0800
146+++ GFX_Linux_KM/services4/srvkm/env/linux/mm.c 2011-03-17 14:46:23.000000000 -0700
147@@ -24,11 +24,14 @@
148 *
149 ******************************************************************************/
150
151+#include <linux/version.h>
152+
153+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
154 #ifndef AUTOCONF_INCLUDED
155 #include <linux/config.h>
156 #endif
157+#endif
158
159-#include <linux/version.h>
160 #include <linux/mm.h>
161 #include <linux/vmalloc.h>
162 #include <asm/io.h>
163--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.h-orig 2011-03-08 04:27:36.000000000 -0800
164+++ GFX_Linux_KM/services4/srvkm/env/linux/mutils.h 2011-03-17 14:54:37.000000000 -0700
165@@ -27,11 +27,13 @@
166 #ifndef __IMG_LINUX_MUTILS_H__
167 #define __IMG_LINUX_MUTILS_H__
168
169+#include <linux/version.h>
170+
171+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
172 #ifndef AUTOCONF_INCLUDED
173 #include <linux/config.h>
174 #endif
175-
176-#include <linux/version.h>
177+#endif
178
179 #if !(defined(__i386__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)))
180 #if defined(SUPPORT_LINUX_X86_PAT)
181--- GFX_Linux_KM/services4/srvkm/env/linux/mm.h-orig 2011-03-08 04:27:36.000000000 -0800
182+++ GFX_Linux_KM/services4/srvkm/env/linux/mm.h 2011-03-17 15:33:56.000000000 -0700
183@@ -27,11 +27,14 @@
184 #ifndef __IMG_LINUX_MM_H__
185 #define __IMG_LINUX_MM_H__
186
187+#include <linux/version.h>
188+
189+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
190 #ifndef AUTOCONF_INCLUDED
191 #include <linux/config.h>
192 #endif
193+#endif
194
195-#include <linux/version.h>
196 #include <linux/slab.h>
197 #include <linux/mm.h>
198 #include <linux/list.h>
199--- GFX_Linux_KM/services4/srvkm/env/linux/mmap.c-orig 2011-03-17 20:39:31.000000000 -0700
200+++ GFX_Linux_KM/services4/srvkm/env/linux/mmap.c 2011-03-17 20:40:00.000000000 -0700
201@@ -24,11 +24,14 @@
202 *
203 ******************************************************************************/
204
205+#include <linux/version.h>
206+
207+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
208 #ifndef AUTOCONF_INCLUDED
209 #include <linux/config.h>
210 #endif
211+#endif
212
213-#include <linux/version.h>
214 #include <linux/mm.h>
215 #include <linux/module.h>
216 #include <linux/vmalloc.h>
217--- GFX_Linux_KM/services4/srvkm/env/linux/proc.c-orig 2011-03-08 04:27:36.000000000 -0800
218+++ GFX_Linux_KM/services4/srvkm/env/linux/proc.c 2011-03-17 21:01:35.000000000 -0700
219@@ -24,13 +24,16 @@
220 *
221 ******************************************************************************/
222
223+#include <linux/version.h>
224+
225+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
226 #ifndef AUTOCONF_INCLUDED
227 #include <linux/config.h>
228 #endif
229+#endif
230
231 #include <linux/init.h>
232 #include <linux/module.h>
233-#include <linux/version.h>
234 #include <linux/fs.h>
235 #include <linux/proc_fs.h>
236 #include <linux/seq_file.h>
237--- GFX_Linux_KM/services4/srvkm/env/linux/module.c-orig 2011-03-08 04:27:36.000000000 -0800
238+++ GFX_Linux_KM/services4/srvkm/env/linux/module.c 2011-03-17 21:32:19.000000000 -0700
239@@ -24,9 +24,13 @@
240 *
241 ******************************************************************************/
242
243+#include <linux/version.h>
244+
245+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
246 #ifndef AUTOCONF_INCLUDED
247 #include <linux/config.h>
248 #endif
249+#endif
250
251 #if !defined(SUPPORT_DRI_DRM)
252
253@@ -44,7 +48,6 @@
254 #include <linux/init.h>
255 #include <linux/kernel.h>
256 #include <linux/module.h>
257-#include <linux/version.h>
258 #include <linux/fs.h>
259 #include <linux/proc_fs.h>
260
261--- GFX_Linux_KM/services4/srvkm/env/linux/event.c-orig 2011-03-08 04:27:36.000000000 -0800
262+++ GFX_Linux_KM/services4/srvkm/env/linux/event.c 2011-03-18 08:51:42.000000000 -0700
263@@ -24,11 +24,14 @@
264 *
265 ******************************************************************************/
266
267+#include <linux/version.h>
268+
269+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
270 #ifndef AUTOCONF_INCLUDED
271 #include <linux/config.h>
272 #endif
273+#endif
274
275-#include <linux/version.h>
276 #include <asm/io.h>
277 #include <asm/page.h>
278 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
279--- GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c-orig 2011-03-08 04:27:36.000000000 -0800
280+++ GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c 2011-03-18 08:58:16.000000000 -0700
281@@ -24,11 +24,14 @@
282 *
283 ******************************************************************************/
284
285+#include <linux/version.h>
286+
287+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
288 #ifndef AUTOCONF_INCLUDED
289 #include <linux/config.h>
290 #endif
291+#endif
292
293-#include <linux/version.h>
294 #include <asm/io.h>
295 #include <asm/page.h>
296 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
297--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_drm.c-orig 2011-03-08 04:27:36.000000000 -0800
298+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_drm.c 2011-03-18 09:01:06.000000000 -0700
299@@ -26,14 +26,17 @@
300
301 #if defined(SUPPORT_DRI_DRM)
302
303+#include <linux/version.h>
304+
305+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
306 #ifndef AUTOCONF_INCLUDED
307 #include <linux/config.h>
308 #endif
309+#endif
310
311 #include <linux/init.h>
312 #include <linux/kernel.h>
313 #include <linux/module.h>
314-#include <linux/version.h>
315 #include <linux/fs.h>
316 #include <linux/proc_fs.h>
317 #include <asm/ioctl.h>
318--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.c-orig 2011-03-08 04:27:36.000000000 -0800
319+++ GFX_Linux_KM/services4/srvkm/env/linux/mutils.c 2011-03-18 09:08:12.000000000 -0700
320@@ -24,10 +24,13 @@
321 *
322 ******************************************************************************/
323
324+#include <linux/version.h>
325+
326+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
327 #ifndef AUTOCONF_INCLUDED
328 #include <linux/config.h>
329 #endif
330-#include <linux/version.h>
331+#endif
332
333 #include <linux/spinlock.h>
334 #include <linux/mm.h>
335--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c-orig 2011-03-31 13:46:48.000000000 -0700
336+++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c 2011-03-31 15:14:10.000000000 -0700
337@@ -76,7 +76,8 @@ static IMG_CHAR gszBufferIRQ[PVR_MAX_MSG
338 static PVRSRV_LINUX_MUTEX gsDebugMutexNonIRQ;
339
340
341-static spinlock_t gsDebugLockIRQ = SPIN_LOCK_UNLOCKED;
342+static DEFINE_SPINLOCK(gsDebugLockIRQ);
343+
344
345 #if !defined (USE_SPIN_LOCK)
346 #define USE_SPIN_LOCK (in_interrupt() || !preemptible())
diff --git a/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/kernel-30.patch b/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/kernel-30.patch
new file mode 100644
index 00000000..269d459b
--- /dev/null
+++ b/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11/kernel-30.patch
@@ -0,0 +1,38 @@
1From: Steve Sakoman
2Subject: omap3-sgx-modules: Fix build for Linux 3.0
3
4This patch implements the header change from plat/display.h to video/omapdss.h
5
6Signed-off-by: Steve Sakoman <steve at sakoman.com>
7
8--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c-orig 2011-08-01 07:21:45.000000000 -0700
9+++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2011-08-01 07:29:32.000000000 -0700
10@@ -47,12 +47,12 @@
11 #if defined (SUPPORT_TI_DSS_FW)
12 #include <asm/io.h>
13
14-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
15-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
16+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)))
17+#include <video/omapdss.h>
18+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
19 #include <plat/display.h>
20-#else
21+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
22 #include <mach/display.h>
23-#endif
24 #else
25 #include <asm/arch-omap/display.h>
26 #endif
27@@ -64,7 +64,11 @@ extern int omap_dispc_request_irq(unsign
28 extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
29 extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
30 #else
31+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39))
32+#include <video/omapdss.h>
33+#else
34 #include <plat/display.h>
35+#endif
36 #include <linux/console.h>
37 #include <linux/fb.h>
38 static omap_dispc_isr_t *pOMAPLFBVSyncISRHandle = NULL;
diff --git a/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11_4.09.00.01.bb b/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11_4.09.00.01.bb
new file mode 100644
index 00000000..84938141
--- /dev/null
+++ b/recipes-bsp/powervr-drivers/omap3-sgx-modules-x11_4.09.00.01.bb
@@ -0,0 +1,74 @@
1DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs (for X11)"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=ea5743acf520dd81ca172e69f818a3d4"
4
5TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
6require ../../recipes-ti/includes/ti-eula-unpack.inc
7
8SGXPV = "4_09_00_01"
9IMGPV = "1.9.2188537"
10BINFILE = "Graphics_SDK_setuplinux_${SGXPV}_minimal_demos.bin"
11
12inherit module
13
14MACHINE_KERNEL_PR_append = "a"
15PR = "${MACHINE_KERNEL_PR}"
16
17DEFAULT_PREFERENCE = "-1"
18
19SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/${BINFILE}"
20
21SRC_URI[md5sum] = "bd35e9d8843aff3a2aca9d41e7db1c7d"
22SRC_URI[sha256sum] = "eb37f75ddde4640b09e760fa86e689beb394330ecdf68786188c34f249247647"
23
24TI_BIN_UNPK_WDEXT="/Graphics_SDK_${SGXPV}"
25S = "${WORKDIR}${TI_BIN_UNPK_WDEXT}/GFX_Linux_KM"
26
27PVRBUILD = "release"
28export KERNELDIR = "${STAGING_KERNEL_DIR}"
29
30INHIBIT_PACKAGE_STRIP = "1"
31
32TI_PLATFORM_omap3 = "omap3630"
33TI_PLATFORM_ti814x = "ti81xx"
34TI_PLATFORM_ti816x = "ti81xx"
35TI_PLATFORM_ti33x = "ti335x"
36
37MODULESLOCATION_omap3 = "dc_omapfb3_linux"
38MODULESLOCATION_ti814x = "dc_ti81xx_linux"
39MODULESLOCATION_ti816x = "dc_ti81xx_linux"
40MODULESLOCATION_ti33x = "dc_ti335x_linux"
41
42export SUPPORT_XORG ?= "1"
43
44MAKE_TARGETS = " BUILD=${PVRBUILD} TI_PLATFORM=${TI_PLATFORM} SUPPORT_XORG=${SUPPORT_XORG}"
45
46do_compile() {
47 export TOOLCHAIN="${TOOLCHAIN_PATH}"
48 export PLAT_CC="${CC}"
49 export PLAT_CPP="${CXX}"
50 export PLAR_AR="${AR}"
51 for kernelver in ${WORKDIR}/../../linux-ti-staging/* ; do
52 cp -f $kernelver/git/drivers/gpu/drm/*.c ${S}/services4/3rdparty/linux_drm/
53 done
54 if [ $(echo -e "${KERNEL_VERSION}\n3.3" | sort --version-sort | head -1) = "3.3" ] ; then
55 cp -f ${S}/services4/3rdparty/linux_drm/Kbuild_3.3 \
56 ${S}/services4/3rdparty/linux_drm/Kbuild
57 else
58 if [ $(echo -e "${KERNEL_VERSION}\n3.2" | sort --version-sort | head -1) = "3.2" ] ; then
59 cp -f ${S}/services4/3rdparty/linux_drm/Kbuild_3.2 \
60 ${S}/services4/3rdparty/linux_drm/Kbuild
61 fi
62 fi
63 oe_runmake BUILD=${PVRBUILD} TI_PLATFORM=${TI_PLATFORM} SUPPORT_XORG=${SUPPORT_XORG}
64}
65
66do_install() {
67 mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
68 cp ${S}/pvrsrvkm.ko \
69 ${S}/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko \
70 ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
71
72 cp ${S}/services4/3rdparty/linux_drm/drm.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
73}
74