diff options
17 files changed, 874 insertions, 31 deletions
diff --git a/b2qt-init-build-env b/b2qt-init-build-env index ec9f394..f1ad0bb 100755 --- a/b2qt-init-build-env +++ b/b2qt-init-build-env | |||
@@ -90,8 +90,8 @@ checkout() { | |||
90 | checkout git://git.yoctoproject.org/poky "daisy:b2f045c400fa8bd20b319c60137b1575f967cef1" | 90 | checkout git://git.yoctoproject.org/poky "daisy:b2f045c400fa8bd20b319c60137b1575f967cef1" |
91 | checkout git://git.yoctoproject.org/meta-fsl-arm "daisy:e9bf647e10ff1e31f911d3236dbb22a1ad7ace9f" | 91 | checkout git://git.yoctoproject.org/meta-fsl-arm "daisy:e9bf647e10ff1e31f911d3236dbb22a1ad7ace9f" |
92 | checkout git://github.com/Freescale/meta-fsl-arm-extra "daisy:e041d9a118c5eecf4010bcb41bb5c554636090ab" | 92 | checkout git://github.com/Freescale/meta-fsl-arm-extra "daisy:e041d9a118c5eecf4010bcb41bb5c554636090ab" |
93 | checkout git://git.yoctoproject.org/meta-ti "daisy:41457c50e21168faf04f3cdd4168954890d6cdab" | ||
94 | checkout git://github.com/beagleboard/meta-beagleboard "master:b5c709b2b6bd3bf236df923fa8f245a00fbb1b60" | 93 | checkout git://github.com/beagleboard/meta-beagleboard "master:b5c709b2b6bd3bf236df923fa8f245a00fbb1b60" |
94 | checkout git://git.yoctoproject.org/meta-ti "daisy:41457c50e21168faf04f3cdd4168954890d6cdab" | ||
95 | checkout git://git.yoctoproject.org/meta-raspberrypi "daisy:946b69299737cc2f1378c864f1b9075280db1b53" | 95 | checkout git://git.yoctoproject.org/meta-raspberrypi "daisy:946b69299737cc2f1378c864f1b9075280db1b53" |
96 | checkout git://git.toradex.com/meta-toradex "V2.2:b47dad6cf9bd5be5287dac3835ea037a2fd30cf7" | 96 | checkout git://git.toradex.com/meta-toradex "V2.2:b47dad6cf9bd5be5287dac3835ea037a2fd30cf7" |
97 | checkout git://git.openembedded.org/meta-openembedded "daisy:662cf409c1175450699d498085f3c894e0fe81d0" | 97 | checkout git://git.openembedded.org/meta-openembedded "daisy:662cf409c1175450699d498085f3c894e0fe81d0" |
diff --git a/conf/bblayers.conf.sample b/conf/bblayers.conf.sample index 666d9ab..777d077 100644 --- a/conf/bblayers.conf.sample +++ b/conf/bblayers.conf.sample | |||
@@ -32,8 +32,8 @@ BBLAYERS ?= " \ | |||
32 | ##COREBASE##/meta-yocto \ | 32 | ##COREBASE##/meta-yocto \ |
33 | ##COREBASE##/meta-fsl-arm \ | 33 | ##COREBASE##/meta-fsl-arm \ |
34 | ##COREBASE##/meta-fsl-arm-extra \ | 34 | ##COREBASE##/meta-fsl-arm-extra \ |
35 | ##COREBASE##/meta-ti \ | ||
36 | ##COREBASE##/meta-beagleboard/common-bsp \ | 35 | ##COREBASE##/meta-beagleboard/common-bsp \ |
36 | ##COREBASE##/meta-ti \ | ||
37 | ##COREBASE##/meta-raspberrypi \ | 37 | ##COREBASE##/meta-raspberrypi \ |
38 | ##COREBASE##/meta-toradex \ | 38 | ##COREBASE##/meta-toradex \ |
39 | ##COREBASE##/meta-openembedded/meta-oe \ | 39 | ##COREBASE##/meta-openembedded/meta-oe \ |
diff --git a/conf/distro/include/beaglebone.conf b/conf/distro/include/beaglebone.conf index 376e3c6..a68a8d5 100644 --- a/conf/distro/include/beaglebone.conf +++ b/conf/distro/include/beaglebone.conf | |||
@@ -26,8 +26,10 @@ BOOTFS_DEPENDS = "u-boot:do_deploy u-boot-uenv-script:do_deploy" | |||
26 | 26 | ||
27 | EXTRA_IMAGEDEPENDS += "u-boot-uenv-script" | 27 | EXTRA_IMAGEDEPENDS += "u-boot-uenv-script" |
28 | 28 | ||
29 | PREFERRED_VERSION_libgles-omap3 = "5.01.00.01" | 29 | PREFERRED_VERSION_libgles-omap3 = "4.10.00.01" |
30 | PREFERRED_VERSION_omap3-sgx-modules = "5.01.00.01" | 30 | PREFERRED_VERSION_omap3-sgx-modules = "4.10.00.01" |
31 | |||
32 | EXTRA_IMAGEDEPENDS_remove = "u-boot-denx" | ||
31 | 33 | ||
32 | MACHINE_EXTRA_INSTALL = "\ | 34 | MACHINE_EXTRA_INSTALL = "\ |
33 | libgles-omap3 \ | 35 | libgles-omap3 \ |
diff --git a/recipes/libgles/libgles-omap3/0001-Add-GLchar-typedef.patch b/recipes/libgles/libgles-omap3/0001-Add-GLchar-typedef.patch deleted file mode 100644 index 15c85cc..0000000 --- a/recipes/libgles/libgles-omap3/0001-Add-GLchar-typedef.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | From a5fdf434b402d4c90390bf5db08ab6bc8bf0a5a3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Samuli Piippo <samuli.piippo@digia.com> | ||
3 | Date: Thu, 6 Sep 2012 15:18:20 +0300 | ||
4 | Subject: [PATCH] Add GLchar typedef | ||
5 | |||
6 | --- | ||
7 | .../SDKPackage/Builds/OGLES2/Include/GLES2/gl2.h | 1 + | ||
8 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
9 | |||
10 | diff --git a/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/GLES2/gl2.h b/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/GLES2/gl2.h | ||
11 | index d9ae403..225f2f1 100644 | ||
12 | --- a/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/GLES2/gl2.h | ||
13 | +++ b/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/GLES2/gl2.h | ||
14 | @@ -17,6 +17,7 @@ extern "C" { | ||
15 | *-----------------------------------------------------------------------*/ | ||
16 | |||
17 | typedef void GLvoid; | ||
18 | +typedef char GLchar; | ||
19 | typedef unsigned int GLenum; | ||
20 | typedef unsigned char GLboolean; | ||
21 | typedef unsigned int GLbitfield; | ||
22 | -- | ||
23 | 1.7.4.1 | ||
24 | |||
diff --git a/recipes/libgles/libgles-omap3/rc.pvr b/recipes/libgles/libgles-omap3/rc.pvr new file mode 100755 index 0000000..d6f6c82 --- /dev/null +++ b/recipes/libgles/libgles-omap3/rc.pvr | |||
@@ -0,0 +1,117 @@ | |||
1 | #!/bin/sh | ||
2 | PATH=$PATH:/usr/sbin | ||
3 | |||
4 | # Check if an fb device is available. If not then just go ahead and | ||
5 | # exit because we have no display. | ||
6 | fbset > /dev/null 2>&1 | ||
7 | if [ "$?" == "1" ] | ||
8 | then | ||
9 | # looks like there is no display, so let's exit | ||
10 | exit 0 | ||
11 | fi | ||
12 | |||
13 | BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" | ||
14 | YRES="$(fbset | grep geom | awk '{print $3}')" | ||
15 | |||
16 | CPUTYPE="$(cputype)" | ||
17 | |||
18 | if [ "$1" = "" ]; then | ||
19 | echo PVR-INIT: Please use start, stop, or restart. | ||
20 | exit 1 | ||
21 | fi | ||
22 | |||
23 | if [ "$1" = "stop" -o "$1" = "restart" ]; then | ||
24 | echo Stopping PVR | ||
25 | rmmod bufferclass_ti | ||
26 | rmmod omaplfb 2>/dev/null | ||
27 | rmmod pvrsrvkm 2>/dev/null | ||
28 | fi | ||
29 | |||
30 | if [ "$1" = "stop" ]; then | ||
31 | exit 0 | ||
32 | fi | ||
33 | |||
34 | # Set RGBA ordering to something the drivers like | ||
35 | if [ "$BITSPERPIXEL" = "32" ] ; then | ||
36 | fbset -rgba 8/16,8/8,8/0,8/24 | ||
37 | fi | ||
38 | |||
39 | # Try to enable triple buffering when there's enough VRAM | ||
40 | fbset -vyres $(expr $YRES \* 3) | ||
41 | |||
42 | sgxprepare () { | ||
43 | echo Starting PVR | ||
44 | |||
45 | modprobe omaplfb | ||
46 | modprobe bufferclass_ti | ||
47 | |||
48 | pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` | ||
49 | bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` | ||
50 | |||
51 | if [ -e /dev/pvrsrvkm ] ; then | ||
52 | rm -f /dev/pvrsrvkm | ||
53 | fi | ||
54 | |||
55 | mknod /dev/pvrsrvkm c $pvr_maj 0 | ||
56 | chmod 666 /dev/pvrsrvkm | ||
57 | |||
58 | touch /etc/powervr-esrev | ||
59 | |||
60 | SAVED_ESREVISION="$(cat /etc/powervr-esrev)" | ||
61 | } | ||
62 | |||
63 | sgxfinish () { | ||
64 | # Fix up a bug in opkg | ||
65 | if [ $(readlink /usr/lib/libsrv_um.so) != $(readlink /usr/lib/libsrv_um.so.1) ] ; then | ||
66 | cd /usr/lib | ||
67 | ln -sf $(readlink /usr/lib/libsrv_um.so.1) libsrv_um.so | ||
68 | fi | ||
69 | |||
70 | if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then | ||
71 | echo -n "Starting SGX fixup for" | ||
72 | echo " ES${ES_REVISION}.x" | ||
73 | cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib | ||
74 | cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin | ||
75 | echo "${ES_REVISION}" > /etc/powervr-esrev | ||
76 | fi | ||
77 | |||
78 | /usr/bin/pvrsrvctl --start --no-module | ||
79 | } | ||
80 | |||
81 | case $CPUTYPE in | ||
82 | "OMAP3530") | ||
83 | sgxprepare | ||
84 | |||
85 | devmem2 0x48004B48 w 0x2 > /dev/null | ||
86 | devmem2 0x48004B10 w 0x1 > /dev/null | ||
87 | devmem2 0x48004B00 w 0x2 > /dev/null | ||
88 | |||
89 | ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" | ||
90 | |||
91 | sgxfinish | ||
92 | ;; | ||
93 | "TI33XX") | ||
94 | sgxprepare | ||
95 | |||
96 | devmem2 0x44e01104 w 0x0 > /dev/null | ||
97 | devmem2 0x44e00904 w 0x2 > /dev/null | ||
98 | |||
99 | ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:8: | tail -n1 | awk -F': ' '{print $2}')" | ||
100 | |||
101 | sgxfinish | ||
102 | ;; | ||
103 | "TI816x") | ||
104 | sgxprepare | ||
105 | |||
106 | devmem2 0x48180F04 w 0x0 > /dev/null | ||
107 | devmem2 0x48180900 w 0x2 > /dev/null | ||
108 | devmem2 0x48180920 w 0x2 > /dev/null | ||
109 | |||
110 | ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:6: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" | ||
111 | |||
112 | sgxfinish | ||
113 | ;; | ||
114 | *) | ||
115 | echo No SGX hardware, not starting PVR | ||
116 | ;; | ||
117 | esac | ||
diff --git a/recipes/libgles/libgles-omap3_4.10.00.01.bb b/recipes/libgles/libgles-omap3_4.10.00.01.bb new file mode 100644 index 0000000..6a8c1ba --- /dev/null +++ b/recipes/libgles/libgles-omap3_4.10.00.01.bb | |||
@@ -0,0 +1,48 @@ | |||
1 | require recipes-graphics/libgles/libgles-omap3-no-x.inc | ||
2 | |||
3 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:${COREBASE}/meta-ti/recipes-graphics/libgles/${PN}" | ||
4 | |||
5 | LICENSE = "TI-TSPA" | ||
6 | |||
7 | PR = "${INC_PR}.3" | ||
8 | |||
9 | BINLOCATION_omap3 = "${S}/gfx_rel_es3.x" | ||
10 | BINLOCATION_ti816x = "${S}/gfx_rel_es6.x" | ||
11 | BINLOCATION_ti814x = "${S}/gfx_rel_es6.x" | ||
12 | BINLOCATION_ti33x = "${S}/gfx_rel_es8.x" | ||
13 | |||
14 | PLATFORM = "LinuxARMV7" | ||
15 | PVR_INIT = "pvrsrvctl" | ||
16 | |||
17 | # download required binary distribution from: | ||
18 | # http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html | ||
19 | # see libgles-omap3.inc for detailed installation instructions | ||
20 | |||
21 | SGXPV = "4_10_00_01" | ||
22 | IMGPV = "1.9.2188537" | ||
23 | |||
24 | TI_BIN_UNPK_WDEXT := "/Graphics_SDK_${SGXPV}" | ||
25 | |||
26 | # Select the corresponding hardfp/softfp filename and checksums based on tune flags | ||
27 | BINFILE_SOFTFP = "Graphics_SDK_setuplinux_${SGXPV}_minimal_demos.bin" | ||
28 | MD5SUM_SOFTFP = "bd35e9d8843aff3a2aca9d41e7db1c7d" | ||
29 | SHA256SUM_SOFTFP = "eb37f75ddde4640b09e760fa86e689beb394330ecdf68786188c34f249247647" | ||
30 | |||
31 | BINFILE_HARDFP = "Graphics_SDK_setuplinux_${SGXPV}_hardfp_minimal_demos.bin" | ||
32 | MD5SUM_HARDFP = "15a3ccb66e98580e474fc112565f66b6" | ||
33 | SHA256SUM_HARDFP = "4d94d5a1869b228ce12027783fc5425c92e9b66685c501247889f1f167e66c9d" | ||
34 | |||
35 | BINFILE = "${@base_contains('TUNE_FEATURES', 'callconvention-hard', '${BINFILE_HARDFP}', '${BINFILE_SOFTFP}', d)}" | ||
36 | |||
37 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/${BINFILE} \ | ||
38 | file://cputype \ | ||
39 | file://rc.pvr \ | ||
40 | file://99-bufferclass.rules \ | ||
41 | " | ||
42 | |||
43 | SRC_URI[md5sum] := "${@base_contains('TUNE_FEATURES', 'callconvention-hard', '${MD5SUM_HARDFP}', '${MD5SUM_SOFTFP}', d)}" | ||
44 | SRC_URI[sha256sum] := "${@base_contains('TUNE_FEATURES', 'callconvention-hard', '${SHA256SUM_HARDFP}', '${SHA256SUM_SOFTFP}', d)}" | ||
45 | |||
46 | S = "${WORKDIR}/Graphics_SDK_${SGXPV}" | ||
47 | |||
48 | LIBGLESWINDOWSYSTEM = "libpvrPVR2D_FRONTWSEGL.so.1" | ||
diff --git a/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch b/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch new file mode 100755 index 0000000..97ce000 --- /dev/null +++ b/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 1400fbf3e8e02eb1efd210a892a0d602061c7ca8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 11:42:13 +0530 | ||
4 | Subject: [PATCH 1/3] AM335x : Adding SGX DT node | ||
5 | |||
6 | This adds the SGX DT node for AM335x. | ||
7 | |||
8 | Signed-off-by: Prathap M S <msprathap@ti.com> | ||
9 | --- | ||
10 | arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ | ||
11 | 1 files changed, 8 insertions(+), 0 deletions(-) | ||
12 | |||
13 | diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi | ||
14 | index 17e0da8..74c6e41 100644 | ||
15 | --- a/arch/arm/boot/dts/am33xx.dtsi | ||
16 | +++ b/arch/arm/boot/dts/am33xx.dtsi | ||
17 | @@ -96,6 +96,14 @@ | ||
18 | reg = <0x48200000 0x1000>; | ||
19 | }; | ||
20 | |||
21 | + sgx@0x56000000 { | ||
22 | + compatible = "ti,sgx"; | ||
23 | + ti,hwmods = "gfx"; | ||
24 | + clock-frequency = <200000000>; | ||
25 | + reg = <0x56000000 0x1000000>; | ||
26 | + interrupts = <37>; | ||
27 | + }; | ||
28 | + | ||
29 | edma: edma@49000000 { | ||
30 | compatible = "ti,edma3"; | ||
31 | ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; | ||
32 | -- | ||
33 | 1.7.1 | ||
34 | |||
diff --git a/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch b/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch new file mode 100755 index 0000000..05672d3 --- /dev/null +++ b/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch | |||
@@ -0,0 +1,121 @@ | |||
1 | From 4179cd27a2caa23688646e043e2872e89c9a7bc7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 11:52:03 +0530 | ||
4 | Subject: [PATCH 2/3] AM33XX : Invoke hwmod deassert for SGX(graphics device) | ||
5 | |||
6 | By default reset is asserted for SGX. | ||
7 | Adding gpu.c file introducing omap_sgx_init_of() for deasserting SGX reset. | ||
8 | This calls omap_device_deassert_hardreset() for deasserting the reset for SGX. | ||
9 | |||
10 | Signed-off-by: Prathap M S <msprathap@ti.com> | ||
11 | --- | ||
12 | arch/arm/mach-omap2/Makefile | 2 +- | ||
13 | arch/arm/mach-omap2/board-generic.c | 4 +++ | ||
14 | arch/arm/mach-omap2/common.h | 1 + | ||
15 | arch/arm/mach-omap2/gpu.c | 48 +++++++++++++++++++++++++++++++++++ | ||
16 | 4 files changed, 54 insertions(+), 1 deletions(-) | ||
17 | create mode 100644 arch/arm/mach-omap2/gpu.c | ||
18 | |||
19 | diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile | ||
20 | index d4f6715..b65cc56 100644 | ||
21 | --- a/arch/arm/mach-omap2/Makefile | ||
22 | +++ b/arch/arm/mach-omap2/Makefile | ||
23 | @@ -8,7 +8,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | ||
24 | # Common support | ||
25 | obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ | ||
26 | common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ | ||
27 | - omap_device.o sram.o | ||
28 | + omap_device.o sram.o gpu.o | ||
29 | |||
30 | omap-2-3-common = irq.o | ||
31 | hwmod-common = omap_hwmod.o omap_hwmod_reset.o \ | ||
32 | diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c | ||
33 | index be5d005..e2b3981 100644 | ||
34 | --- a/arch/arm/mach-omap2/board-generic.c | ||
35 | +++ b/arch/arm/mach-omap2/board-generic.c | ||
36 | @@ -22,6 +22,7 @@ | ||
37 | #include "common.h" | ||
38 | #include "common-board-devices.h" | ||
39 | #include "dss-common.h" | ||
40 | +#include "soc.h" | ||
41 | |||
42 | #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)) | ||
43 | #define intc_of_init NULL | ||
44 | @@ -50,6 +50,8 @@ static void __init omap_generic_init(void) | ||
45 | omap4_panda_display_init_of(); | ||
46 | else if (of_machine_is_compatible("ti,omap4-sdp")) | ||
47 | omap_4430sdp_display_init_of(); | ||
48 | + if (omap3_has_sgx()) | ||
49 | + omap_sgx_init_of(); | ||
50 | } | ||
51 | |||
52 | #ifdef CONFIG_SOC_OMAP2420 | ||
53 | diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h | ||
54 | index dfcc182..7d2f04e 100644 | ||
55 | --- a/arch/arm/mach-omap2/common.h | ||
56 | +++ b/arch/arm/mach-omap2/common.h | ||
57 | @@ -296,6 +296,7 @@ extern void omap_reserve(void); | ||
58 | |||
59 | struct omap_hwmod; | ||
60 | extern int omap_dss_reset(struct omap_hwmod *); | ||
61 | +void __init omap_sgx_init_of(void); | ||
62 | |||
63 | /* SoC specific clock initializer */ | ||
64 | extern int (*omap_clk_init)(void); | ||
65 | diff --git a/arch/arm/mach-omap2/gpu.c b/arch/arm/mach-omap2/gpu.c | ||
66 | new file mode 100644 | ||
67 | index 0000000..98a66cf | ||
68 | --- /dev/null | ||
69 | +++ b/arch/arm/mach-omap2/gpu.c | ||
70 | @@ -0,0 +1,48 @@ | ||
71 | +/* | ||
72 | + * Deassert reset for AM33xx graphics device(SGX) hwmod | ||
73 | + * | ||
74 | + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ | ||
75 | + * Prathap MS <msprathap@ti.com> | ||
76 | + * | ||
77 | + * This program is free software; you can redistribute it and/or | ||
78 | + * modify it under the terms of the GNU General Public License as | ||
79 | + * published by the Free Software Foundation version 2. | ||
80 | + * | ||
81 | + * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
82 | + * kind, whether express or implied; without even the implied warranty | ||
83 | + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
84 | + * GNU General Public License for more details. | ||
85 | + */ | ||
86 | +#include <linux/of_platform.h> | ||
87 | +#include "omap_device.h" | ||
88 | + | ||
89 | +void __init omap_sgx_init_of(void) | ||
90 | +{ | ||
91 | + struct device_node *node; | ||
92 | + struct platform_device *pdev; | ||
93 | + int ret = 0; | ||
94 | + node = of_find_compatible_node(NULL, NULL, "ti,sgx"); | ||
95 | + if (!node) | ||
96 | + return; | ||
97 | + pdev = of_find_device_by_node(node); | ||
98 | + if (!pdev) { | ||
99 | + pr_warn("of_find_device_by_node() failed for sgx\n"); | ||
100 | + return; | ||
101 | + } | ||
102 | + ret = omap_device_deassert_hardreset(pdev, "gfx"); | ||
103 | + if (ret != 0) | ||
104 | + pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n"); | ||
105 | + | ||
106 | + node = of_find_compatible_node(NULL, NULL, "ti,am335x-timer"); | ||
107 | + if (!node) | ||
108 | + return; | ||
109 | + pdev = of_find_device_by_node(node); | ||
110 | + if (!pdev) { | ||
111 | + pr_warn("of_find_device_by_node() failed for sgx\n"); | ||
112 | + return; | ||
113 | + } | ||
114 | + ret = omap_device_deassert_hardreset(pdev, "timer7"); | ||
115 | + if (ret != 0) | ||
116 | + pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n"); | ||
117 | +} | ||
118 | + | ||
119 | -- | ||
120 | 1.7.1 | ||
121 | |||
diff --git a/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch b/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch new file mode 100755 index 0000000..c425982 --- /dev/null +++ b/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | From 0f4e7d4b7d7314b38a9fd3497d7d4e0c36d19bff Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 12:05:23 +0530 | ||
4 | Subject: [PATCH 3/3] video: da8xx-fb: Add API to register wait for vsync callback | ||
5 | |||
6 | This patch adds APIs to register and unregister wait for vsync callback. | ||
7 | This is derived from commit id 2d44302545da24fd22912d964102bc31a7489e97 | ||
8 | This commit id was part of 3.2 kernel sources. | ||
9 | |||
10 | Signed-off-by: Prathap M S <msprathap@ti.com> | ||
11 | --- | ||
12 | drivers/video/da8xx-fb.c | 33 +++++++++++++++++++++++++++++++++ | ||
13 | include/video/da8xx-fb.h | 4 ++++ | ||
14 | 2 files changed, 37 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c | ||
17 | index 131cf4c..ef06b85 100644 | ||
18 | --- a/drivers/video/da8xx-fb.c | ||
19 | +++ b/drivers/video/da8xx-fb.c | ||
20 | @@ -199,6 +199,9 @@ static struct fb_fix_screeninfo da8xx_fb_fix = { | ||
21 | .accel = FB_ACCEL_NONE | ||
22 | }; | ||
23 | |||
24 | +static vsync_callback_t vsync_cb_handler; | ||
25 | +static void *vsync_cb_arg; | ||
26 | + | ||
27 | static struct fb_videomode known_lcd_panels[] = { | ||
28 | /* Sharp LCD035Q3DG01 */ | ||
29 | [0] = { | ||
30 | @@ -806,6 +809,32 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
35 | +{ | ||
36 | + if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) { | ||
37 | + vsync_cb_arg = arg; | ||
38 | + vsync_cb_handler = handler; | ||
39 | + } else { | ||
40 | + return -EEXIST; | ||
41 | + } | ||
42 | + | ||
43 | + return 0; | ||
44 | +} | ||
45 | +EXPORT_SYMBOL(register_vsync_cb); | ||
46 | + | ||
47 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
48 | +{ | ||
49 | + if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) { | ||
50 | + vsync_cb_handler = NULL; | ||
51 | + vsync_cb_arg = NULL; | ||
52 | + } else { | ||
53 | + return -ENXIO; | ||
54 | + } | ||
55 | + | ||
56 | + return 0; | ||
57 | +} | ||
58 | +EXPORT_SYMBOL(unregister_vsync_cb); | ||
59 | + | ||
60 | /* IRQ handler for version 2 of LCDC */ | ||
61 | static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
62 | { | ||
63 | @@ -843,6 +872,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
64 | LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG); | ||
65 | par->vsync_flag = 1; | ||
66 | wake_up_interruptible(&par->vsync_wait); | ||
67 | + if (vsync_cb_handler) | ||
68 | + vsync_cb_handler(vsync_cb_arg); | ||
69 | } | ||
70 | |||
71 | if (stat & LCD_END_OF_FRAME1) { | ||
72 | @@ -918,6 +949,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg) | ||
73 | LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG); | ||
74 | par->vsync_flag = 1; | ||
75 | wake_up_interruptible(&par->vsync_wait); | ||
76 | + if (vsync_cb_handler) | ||
77 | + vsync_cb_handler(vsync_cb_arg); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h | ||
82 | index efed3c3..a6cc484 100644 | ||
83 | --- a/include/video/da8xx-fb.h | ||
84 | +++ b/include/video/da8xx-fb.h | ||
85 | @@ -91,5 +91,9 @@ struct lcd_sync_arg { | ||
86 | /* Proprietary FB_SYNC_ flags */ | ||
87 | #define FB_SYNC_CLK_INVERT 0x40000000 | ||
88 | |||
89 | +typedef void (*vsync_callback_t)(void *arg); | ||
90 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
91 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
92 | + | ||
93 | #endif /* ifndef DA8XX_FB_H */ | ||
94 | |||
95 | -- | ||
96 | 1.7.1 | ||
97 | |||
diff --git a/recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch b/recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch new file mode 100644 index 0000000..97ce000 --- /dev/null +++ b/recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 1400fbf3e8e02eb1efd210a892a0d602061c7ca8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 11:42:13 +0530 | ||
4 | Subject: [PATCH 1/3] AM335x : Adding SGX DT node | ||
5 | |||
6 | This adds the SGX DT node for AM335x. | ||
7 | |||
8 | Signed-off-by: Prathap M S <msprathap@ti.com> | ||
9 | --- | ||
10 | arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ | ||
11 | 1 files changed, 8 insertions(+), 0 deletions(-) | ||
12 | |||
13 | diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi | ||
14 | index 17e0da8..74c6e41 100644 | ||
15 | --- a/arch/arm/boot/dts/am33xx.dtsi | ||
16 | +++ b/arch/arm/boot/dts/am33xx.dtsi | ||
17 | @@ -96,6 +96,14 @@ | ||
18 | reg = <0x48200000 0x1000>; | ||
19 | }; | ||
20 | |||
21 | + sgx@0x56000000 { | ||
22 | + compatible = "ti,sgx"; | ||
23 | + ti,hwmods = "gfx"; | ||
24 | + clock-frequency = <200000000>; | ||
25 | + reg = <0x56000000 0x1000000>; | ||
26 | + interrupts = <37>; | ||
27 | + }; | ||
28 | + | ||
29 | edma: edma@49000000 { | ||
30 | compatible = "ti,edma3"; | ||
31 | ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; | ||
32 | -- | ||
33 | 1.7.1 | ||
34 | |||
diff --git a/recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch b/recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch new file mode 100644 index 0000000..3287851 --- /dev/null +++ b/recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch | |||
@@ -0,0 +1,196 @@ | |||
1 | From 9de290880400c31b727ebc0014da7ccd67867359 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Alexander=20R=C3=B6ssler?= <mail.aroessler@gmail.com> | ||
3 | Date: Fri, 1 Nov 2013 15:35:26 +0100 | ||
4 | Subject: [PATCH] Changes according to TI for SGX support | ||
5 | |||
6 | --- | ||
7 | arch/arm/mach-omap2/Makefile | 2 +- | ||
8 | arch/arm/mach-omap2/board-generic.c | 3 +++ | ||
9 | arch/arm/mach-omap2/common.h | 1 + | ||
10 | arch/arm/mach-omap2/gpu.c | 47 +++++++++++++++++++++++++++++++++++++ | ||
11 | drivers/video/da8xx-fb.c | 33 ++++++++++++++++++++++++++ | ||
12 | include/video/da8xx-fb.h | 4 ++++ | ||
13 | 6 files changed, 89 insertions(+), 1 deletion(-) | ||
14 | create mode 100644 arch/arm/mach-omap2/gpu.c | ||
15 | |||
16 | diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile | ||
17 | index afecbbc..6c253bd 100644 | ||
18 | --- a/arch/arm/mach-omap2/Makefile | ||
19 | +++ b/arch/arm/mach-omap2/Makefile | ||
20 | @@ -5,7 +5,7 @@ | ||
21 | # Common support | ||
22 | obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ | ||
23 | common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ | ||
24 | - omap_device.o sram.o | ||
25 | + omap_device.o sram.o gpu.o | ||
26 | |||
27 | omap-2-3-common = irq.o | ||
28 | hwmod-common = omap_hwmod.o \ | ||
29 | diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c | ||
30 | index fac00f0..24bdc10 100644 | ||
31 | --- a/arch/arm/mach-omap2/board-generic.c | ||
32 | +++ b/arch/arm/mach-omap2/board-generic.c | ||
33 | @@ -22,6 +22,7 @@ | ||
34 | #include "common.h" | ||
35 | #include "common-board-devices.h" | ||
36 | #include "dss-common.h" | ||
37 | +#include "soc.h" | ||
38 | |||
39 | #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)) | ||
40 | #define intc_of_init NULL | ||
41 | @@ -50,6 +51,8 @@ static void __init omap_generic_init(void) | ||
42 | omap4_panda_display_init_of(); | ||
43 | else if (of_machine_is_compatible("ti,omap4-sdp")) | ||
44 | omap_4430sdp_display_init_of(); | ||
45 | + if (omap3_has_sgx()) | ||
46 | + omap_sgx_init_of(); | ||
47 | } | ||
48 | |||
49 | #ifdef CONFIG_SOC_OMAP2420 | ||
50 | diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h | ||
51 | index f077fbd..dca5aca 100644 | ||
52 | --- a/arch/arm/mach-omap2/common.h | ||
53 | +++ b/arch/arm/mach-omap2/common.h | ||
54 | @@ -293,6 +293,7 @@ extern void omap_reserve(void); | ||
55 | |||
56 | struct omap_hwmod; | ||
57 | extern int omap_dss_reset(struct omap_hwmod *); | ||
58 | +void __init omap_sgx_init_of(void); | ||
59 | |||
60 | /* SoC specific clock initializer */ | ||
61 | extern int (*omap_clk_init)(void); | ||
62 | diff --git a/arch/arm/mach-omap2/gpu.c b/arch/arm/mach-omap2/gpu.c | ||
63 | new file mode 100644 | ||
64 | index 0000000..eebb1bd | ||
65 | --- /dev/null | ||
66 | +++ b/arch/arm/mach-omap2/gpu.c | ||
67 | @@ -0,0 +1,47 @@ | ||
68 | +/* | ||
69 | + * Deassert reset for AM33xx graphics device(SGX) hwmod | ||
70 | + * | ||
71 | + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ | ||
72 | + * Prathap MS <msprathap@ti.com> | ||
73 | + * | ||
74 | + * This program is free software; you can redistribute it and/or | ||
75 | + * modify it under the terms of the GNU General Public License as | ||
76 | + * published by the Free Software Foundation version 2. | ||
77 | + * | ||
78 | + * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
79 | + * kind, whether express or implied; without even the implied warranty | ||
80 | + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
81 | + * GNU General Public License for more details. | ||
82 | + */ | ||
83 | +#include <linux/of_platform.h> | ||
84 | +#include "omap_device.h" | ||
85 | + | ||
86 | +void __init omap_sgx_init_of(void) | ||
87 | +{ | ||
88 | + struct device_node *node; | ||
89 | + struct platform_device *pdev; | ||
90 | + int ret = 0; | ||
91 | + node = of_find_compatible_node(NULL, NULL, "ti,sgx"); | ||
92 | + if (!node) | ||
93 | + return; | ||
94 | + pdev = of_find_device_by_node(node); | ||
95 | + if (!pdev) { | ||
96 | + pr_warn("of_find_device_by_node() failed for sgx\n"); | ||
97 | + return; | ||
98 | + } | ||
99 | + ret = omap_device_deassert_hardreset(pdev, "gfx"); | ||
100 | + if (ret != 0) | ||
101 | + pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n"); | ||
102 | + | ||
103 | + node = of_find_compatible_node(NULL, NULL, "ti,am335x-timer"); | ||
104 | + if (!node) | ||
105 | + return; | ||
106 | + pdev = of_find_device_by_node(node); | ||
107 | + if (!pdev) { | ||
108 | + pr_warn("of_find_device_by_node() failed for sgx\n"); | ||
109 | + return; | ||
110 | + } | ||
111 | + ret = omap_device_deassert_hardreset(pdev, "timer7"); | ||
112 | + if (ret != 0) | ||
113 | + pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n"); | ||
114 | +} | ||
115 | diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c | ||
116 | index 6723683..6b9720c 100644 | ||
117 | --- a/drivers/video/da8xx-fb.c | ||
118 | +++ b/drivers/video/da8xx-fb.c | ||
119 | @@ -204,6 +204,9 @@ static struct fb_fix_screeninfo da8xx_fb_fix = { | ||
120 | .accel = FB_ACCEL_NONE | ||
121 | }; | ||
122 | |||
123 | +static vsync_callback_t vsync_cb_handler; | ||
124 | +static void *vsync_cb_arg; | ||
125 | + | ||
126 | static struct fb_videomode known_lcd_panels[] = { | ||
127 | /* Sharp LCD035Q3DG01 */ | ||
128 | [0] = { | ||
129 | @@ -814,6 +817,32 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
134 | +{ | ||
135 | + if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) { | ||
136 | + vsync_cb_arg = arg; | ||
137 | + vsync_cb_handler = handler; | ||
138 | + } else { | ||
139 | + return -EEXIST; | ||
140 | + } | ||
141 | + | ||
142 | + return 0; | ||
143 | +} | ||
144 | +EXPORT_SYMBOL(register_vsync_cb); | ||
145 | + | ||
146 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
147 | +{ | ||
148 | + if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) { | ||
149 | + vsync_cb_handler = NULL; | ||
150 | + vsync_cb_arg = NULL; | ||
151 | + } else { | ||
152 | + return -ENXIO; | ||
153 | + } | ||
154 | + | ||
155 | + return 0; | ||
156 | +} | ||
157 | +EXPORT_SYMBOL(unregister_vsync_cb); | ||
158 | + | ||
159 | /* IRQ handler for version 2 of LCDC */ | ||
160 | static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
161 | { | ||
162 | @@ -851,6 +880,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
163 | LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG); | ||
164 | par->vsync_flag = 1; | ||
165 | wake_up_interruptible(&par->vsync_wait); | ||
166 | + if (vsync_cb_handler) | ||
167 | + vsync_cb_handler(vsync_cb_arg); | ||
168 | } | ||
169 | |||
170 | if (stat & LCD_END_OF_FRAME1) { | ||
171 | @@ -926,6 +957,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg) | ||
172 | LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG); | ||
173 | par->vsync_flag = 1; | ||
174 | wake_up_interruptible(&par->vsync_wait); | ||
175 | + if (vsync_cb_handler) | ||
176 | + vsync_cb_handler(vsync_cb_arg); | ||
177 | } | ||
178 | } | ||
179 | |||
180 | diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h | ||
181 | index f888259..6b1abfd 100644 | ||
182 | --- a/include/video/da8xx-fb.h | ||
183 | +++ b/include/video/da8xx-fb.h | ||
184 | @@ -86,5 +86,9 @@ struct lcd_sync_arg { | ||
185 | /* Proprietary FB_SYNC_ flags */ | ||
186 | #define FB_SYNC_CLK_INVERT 0x40000000 | ||
187 | |||
188 | +typedef void (*vsync_callback_t)(void *arg); | ||
189 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
190 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
191 | + | ||
192 | #endif /* ifndef DA8XX_FB_H */ | ||
193 | |||
194 | -- | ||
195 | 1.8.4.2 | ||
196 | |||
diff --git a/recipes/linux/linux-mainline_3.8.bbappend b/recipes/linux/linux-mainline_3.8.bbappend new file mode 100644 index 0000000..e5518bc --- /dev/null +++ b/recipes/linux/linux-mainline_3.8.bbappend | |||
@@ -0,0 +1,8 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | SRC_URI += "\ | ||
3 | file://0001-AM335x-Adding-SGX-DT-node.patch \ | ||
4 | file://0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch \ | ||
5 | file://0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch \ | ||
6 | " | ||
7 | |||
8 | INSANE_SKIP_${PN} = "installed-vs-shipped" | ||
diff --git a/recipes/powervr-drivers/omap3-sgx-modules/0001-Graphics-SDK-04.10.00.01-AM335x-sgx-irq-change.patch b/recipes/powervr-drivers/omap3-sgx-modules/0001-Graphics-SDK-04.10.00.01-AM335x-sgx-irq-change.patch new file mode 100644 index 0000000..ce50479 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/0001-Graphics-SDK-04.10.00.01-AM335x-sgx-irq-change.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From e55f63a07e5266095da89b7f94122fcba9bdef04 Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Tue, 19 Nov 2013 16:33:24 +0530 | ||
4 | Subject: [PATCH 1/1] Graphics SDK 04.10.00.01 : AM335x sgx irq change | ||
5 | |||
6 | This patch enables PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO for AM335x. | ||
7 | This is required with 3.8 kernel onwards which uses DT. | ||
8 | This will enable the path of getting sgx irq number dynamically. | ||
9 | |||
10 | Signed-off-by: Prathap M S <msprathap@ti.com> | ||
11 | --- | ||
12 | services4/system/ti335x/syslocal.h | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/services4/system/ti335x/syslocal.h b/services4/system/ti335x/syslocal.h | ||
16 | index 090b38d..222d52d 100644 | ||
17 | --- a/services4/system/ti335x/syslocal.h | ||
18 | +++ b/services4/system/ti335x/syslocal.h | ||
19 | @@ -69,8 +69,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
20 | #if !defined(LDM_PLATFORM) | ||
21 | #error "LDM_PLATFORM must be set" | ||
22 | #endif | ||
23 | -//#define PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO | ||
24 | -//#include <linux/platform_device.h> | ||
25 | +#define PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO | ||
26 | +#include <linux/platform_device.h> | ||
27 | #endif | ||
28 | |||
29 | #if ((defined(DEBUG) || defined(TIMING)) && \ | ||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/recipes/powervr-drivers/omap3-sgx-modules/Change-for-interfacing-with-SGX-DT-node.patch b/recipes/powervr-drivers/omap3-sgx-modules/Change-for-interfacing-with-SGX-DT-node.patch new file mode 100644 index 0000000..c553354 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/Change-for-interfacing-with-SGX-DT-node.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | diff --git a/services4/srvkm/env/linux/module.c b/services4/srvkm/env/linux/module.c | ||
2 | index 668dc2d..2247aad 100644 | ||
3 | --- a/services4/srvkm/env/linux/module.c | ||
4 | +++ b/services4/srvkm/env/linux/module.c | ||
5 | @@ -84,6 +84,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
6 | #include <linux/module.h> | ||
7 | #include <linux/fs.h> | ||
8 | #include <linux/proc_fs.h> | ||
9 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) | ||
10 | +#include <linux/of.h> | ||
11 | +#endif | ||
12 | |||
13 | #if defined(SUPPORT_DRI_DRM) | ||
14 | #include <drm/drmP.h> | ||
15 | @@ -296,10 +299,24 @@ static struct platform_device_id powervr_id_table[] __devinitdata = { | ||
16 | }; | ||
17 | #endif | ||
18 | |||
19 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) | ||
20 | +static const struct of_device_id omap_sgx_of_match[] = { | ||
21 | + { | ||
22 | + .compatible = "ti,sgx", | ||
23 | + }, | ||
24 | + {}, | ||
25 | +}; | ||
26 | +MODULE_DEVICE_TABLE(of, omap_sgx_of_match); | ||
27 | +#endif | ||
28 | + | ||
29 | + | ||
30 | static LDM_DRV powervr_driver = { | ||
31 | #if defined(PVR_LDM_PLATFORM_MODULE) | ||
32 | .driver = { | ||
33 | .name = DRVNAME, | ||
34 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) | ||
35 | + .of_match_table = of_match_ptr(omap_sgx_of_match), | ||
36 | +#endif | ||
37 | }, | ||
38 | #endif | ||
39 | #if defined(PVR_LDM_PCI_MODULE) | ||
40 | @@ -362,7 +379,7 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device | ||
41 | #endif | ||
42 | { | ||
43 | SYS_DATA *psSysData; | ||
44 | - | ||
45 | + | ||
46 | PVR_TRACE(("PVRSRVDriverProbe(pDevice=%p)", pDevice)); | ||
47 | |||
48 | #if 0 /* INTEGRATION_POINT */ | ||
49 | -- | ||
50 | 1.7.9.5 | ||
51 | |||
diff --git a/recipes/powervr-drivers/omap3-sgx-modules/linux-3.8.patch b/recipes/powervr-drivers/omap3-sgx-modules/linux-3.8.patch new file mode 100644 index 0000000..acef54b --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/linux-3.8.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | diff --git a/services4/3rdparty/linux_drm/Kbuild b/services4/3rdparty/linux_drm/Kbuild | ||
2 | index d01ef39..ccca3cd 100755 | ||
3 | --- a/services4/3rdparty/linux_drm/Kbuild | ||
4 | +++ b/services4/3rdparty/linux_drm/Kbuild | ||
5 | @@ -26,38 +26,38 @@ endif | ||
6 | endif | ||
7 | |||
8 | obj-m := drm.o | ||
9 | -ifeq ($(TI_PLATFORM),omap4) | ||
10 | -drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drawable.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ | ||
11 | - drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ | ||
12 | - drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ | ||
13 | - drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \ | ||
14 | - drm_crtc.o drm_modes.o drm_edid.o \ | ||
15 | - drm_info.o drm_debugfs.o drm_encoder_slave.o | ||
16 | -else | ||
17 | +#ifeq ($(TI_PLATFORM),omap4) | ||
18 | +#drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drawable.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ | ||
19 | +# drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ | ||
20 | +# drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ | ||
21 | +# drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \ | ||
22 | +# drm_crtc.o drm_modes.o drm_edid.o \ | ||
23 | +# drm_info.o drm_debugfs.o drm_encoder_slave.o | ||
24 | +#else | ||
25 | # Works for 2.6.37 till 3.2 kernel | ||
26 | -drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ | ||
27 | - drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ | ||
28 | - drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ | ||
29 | - drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \ | ||
30 | - drm_crtc.o drm_modes.o drm_edid.o \ | ||
31 | - drm_info.o drm_debugfs.o drm_encoder_slave.o drm_global.o drm_platform.o drm_trace_points.o | ||
32 | -endif | ||
33 | - | ||
34 | -# For 3.3 kernel only | ||
35 | #drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ | ||
36 | # drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ | ||
37 | # drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ | ||
38 | -# drm_sysfs.o drm_hashtab.o drm_mm.o \ | ||
39 | +# drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \ | ||
40 | # drm_crtc.o drm_modes.o drm_edid.o \ | ||
41 | # drm_info.o drm_debugfs.o drm_encoder_slave.o drm_global.o drm_platform.o drm_trace_points.o | ||
42 | +#endif | ||
43 | |||
44 | -# For greater than/equal to 3.4 till 3.8 kernel | ||
45 | +# For 3.3 kernel only | ||
46 | #drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ | ||
47 | # drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ | ||
48 | # drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ | ||
49 | # drm_sysfs.o drm_hashtab.o drm_mm.o \ | ||
50 | # drm_crtc.o drm_modes.o drm_edid.o \ | ||
51 | -# drm_info.o drm_debugfs.o drm_encoder_slave.o drm_global.o drm_platform.o drm_trace_points.o drm_prime.o | ||
52 | +# drm_info.o drm_debugfs.o drm_encoder_slave.o drm_global.o drm_platform.o drm_trace_points.o | ||
53 | + | ||
54 | +# For greater than/equal to 3.4 till 3.8 kernel | ||
55 | +drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ | ||
56 | + drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ | ||
57 | + drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ | ||
58 | + drm_sysfs.o drm_hashtab.o drm_mm.o \ | ||
59 | + drm_crtc.o drm_modes.o drm_edid.o \ | ||
60 | + drm_info.o drm_debugfs.o drm_encoder_slave.o drm_global.o drm_platform.o drm_trace_points.o drm_prime.o | ||
61 | |||
62 | # less than 2.6.32 kernel | ||
63 | |||
diff --git a/recipes/powervr-drivers/omap3-sgx-modules_4.10.00.01.bb b/recipes/powervr-drivers/omap3-sgx-modules_4.10.00.01.bb new file mode 100644 index 0000000..b83e1ee --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules_4.10.00.01.bb | |||
@@ -0,0 +1,66 @@ | |||
1 | DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea5743acf520dd81ca172e69f818a3d4" | ||
4 | |||
5 | TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" | ||
6 | require recipes-ti/includes/ti-eula-unpack.inc | ||
7 | |||
8 | SGXPV = "4_10_00_01" | ||
9 | IMGPV = "1.9.2188537" | ||
10 | |||
11 | inherit module | ||
12 | |||
13 | MACHINE_KERNEL_PR_append = "c" | ||
14 | PR = "${MACHINE_KERNEL_PR}" | ||
15 | |||
16 | DEFAULT_PREFERENCE = "-1" | ||
17 | |||
18 | # Select the corresponding hardfp/softfp filename and checksums based on tune flags | ||
19 | BINFILE_SOFTFP = "Graphics_SDK_setuplinux_${SGXPV}_minimal_demos.bin" | ||
20 | MD5SUM_SOFTFP = "bd35e9d8843aff3a2aca9d41e7db1c7d" | ||
21 | SHA256SUM_SOFTFP = "eb37f75ddde4640b09e760fa86e689beb394330ecdf68786188c34f249247647" | ||
22 | |||
23 | BINFILE_HARDFP = "Graphics_SDK_setuplinux_${SGXPV}_hardfp_minimal_demos.bin" | ||
24 | MD5SUM_HARDFP = "15a3ccb66e98580e474fc112565f66b6" | ||
25 | SHA256SUM_HARDFP = "4d94d5a1869b228ce12027783fc5425c92e9b66685c501247889f1f167e66c9d" | ||
26 | |||
27 | BINFILE = "${@base_contains('TUNE_FEATURES', 'callconvention-hard', '${BINFILE_HARDFP}', '${BINFILE_SOFTFP}', d)}" | ||
28 | |||
29 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/${BINFILE} \ | ||
30 | file://Change-for-interfacing-with-SGX-DT-node.patch \ | ||
31 | file://linux-3.8.patch \ | ||
32 | file://0001-Graphics-SDK-04.10.00.01-AM335x-sgx-irq-change.patch \ | ||
33 | " | ||
34 | |||
35 | SRC_URI[md5sum] := "${@base_contains('TUNE_FEATURES', 'callconvention-hard', '${MD5SUM_HARDFP}', '${MD5SUM_SOFTFP}', d)}" | ||
36 | SRC_URI[sha256sum] := "${@base_contains('TUNE_FEATURES', 'callconvention-hard', '${SHA256SUM_HARDFP}', '${SHA256SUM_SOFTFP}', d)}" | ||
37 | |||
38 | TI_BIN_UNPK_WDEXT="/Graphics_SDK_${SGXPV}" | ||
39 | S = "${WORKDIR}${TI_BIN_UNPK_WDEXT}/GFX_Linux_KM" | ||
40 | |||
41 | PVRBUILD = "release" | ||
42 | export KERNELDIR = "${STAGING_KERNEL_DIR}" | ||
43 | |||
44 | INHIBIT_PACKAGE_STRIP = "1" | ||
45 | |||
46 | TI_PLATFORM_omap3 = "omap3630" | ||
47 | TI_PLATFORM_ti814x = "ti81xx" | ||
48 | TI_PLATFORM_ti816x = "ti81xx" | ||
49 | TI_PLATFORM_ti33x = "ti335x" | ||
50 | |||
51 | MODULESLOCATION_omap3 = "dc_omapfb3_linux" | ||
52 | MODULESLOCATION_ti814x = "dc_ti81xx_linux" | ||
53 | MODULESLOCATION_ti816x = "dc_ti81xx_linux" | ||
54 | MODULESLOCATION_ti33x = "dc_ti335x_linux" | ||
55 | |||
56 | MAKE_TARGETS = " BUILD=${PVRBUILD} TI_PLATFORM=${TI_PLATFORM} SUPPORT_XORG=0" | ||
57 | |||
58 | MAKE_TARGETS_append_ti33x = " PM_RUNTIME=1" | ||
59 | |||
60 | do_install() { | ||
61 | mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr | ||
62 | cp ${S}/pvrsrvkm.ko \ | ||
63 | ${S}/services4/3rdparty/${MODULESLOCATION}/omaplfb.ko \ | ||
64 | ${S}/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko \ | ||
65 | ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr | ||
66 | } | ||
diff --git a/recipes/u-boot/u-boot-uenv-script/uEnv.txt b/recipes/u-boot/u-boot-uenv-script/uEnv.txt index f8385a4..6b23df1 100644 --- a/recipes/u-boot/u-boot-uenv-script/uEnv.txt +++ b/recipes/u-boot/u-boot-uenv-script/uEnv.txt | |||
@@ -1,3 +1 @@ | |||
1 | bootfile=zImage | optargs=consoleblank=0 vt.global_cursor_default=0 quiet | |
2 | optargs=consoleblank=0 vt.global_cursor_default=0 | ||
3 | mmcboot=echo Booting from mmc ...; run mmcargs; bootz ${kloadaddr} - ${fdtaddr} | ||