aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2011-04-20 13:52:53 +0200
committerSteffen Sledz <sledz@dresearch-fe.de>2011-04-29 14:08:37 +0200
commit5101597a82fa1cbf4d6686ed4aa683474ac4b3c7 (patch)
treefb534d57d209deab15c9bf3bab36d5673b438ffe
parenta9a5090bbf268d254047faa1f0ea6167918b8eb4 (diff)
downloadopenembedded-5101597a82fa1cbf4d6686ed4aa683474ac4b3c7.zip
openembedded-5101597a82fa1cbf4d6686ed4aa683474ac4b3c7.tar.gz
openembedded-5101597a82fa1cbf4d6686ed4aa683474ac4b3c7.tar.bz2
libgles-omap3: abstract ES handling and share it across all targets
Signed-off-by: Koen Kooi <koen@openembedded.org>
-rw-r--r--recipes/powervr-drivers/libgles-omap3.inc2
-rwxr-xr-xrecipes/powervr-drivers/libgles-omap3/rc.pvr57
2 files changed, 22 insertions, 37 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc
index 61d7f3d..ac21631 100644
--- a/recipes/powervr-drivers/libgles-omap3.inc
+++ b/recipes/powervr-drivers/libgles-omap3.inc
@@ -1,7 +1,7 @@
DESCRIPTION = "libGLES for the omap3"
LICENSE = "proprietary-binary"
-PR = "r12"
+PR = "r13"
COMPATIBLE_MACHINE = "(omap3|ti816x)"
diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr
index b854852..0a4f11b 100755
--- a/recipes/powervr-drivers/libgles-omap3/rc.pvr
+++ b/recipes/powervr-drivers/libgles-omap3/rc.pvr
@@ -30,8 +30,7 @@ fi
# Try to enable triple buffering when there's enough VRAM
fbset -vyres $(expr $YRES \* 3)
-case $CPUTYPE in
-"OMAP3530")
+function sgxprepare {
echo Starting PVR
insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
modprobe omaplfb
@@ -50,13 +49,9 @@ case $CPUTYPE in
touch /etc/powervr-esrev
SAVED_ESREVISION="$(cat /etc/powervr-esrev)"
+}
- devmem2 0x48004B48 w 0x2 > /dev/null
- devmem2 0x48004B10 w 0x1 > /dev/null
- devmem2 0x48004B00 w 0x2 > /dev/null
-
- ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')"
-
+function sgxfinish {
if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then
echo -n "Starting SGX fixup for"
echo " ES${ES_REVISION}.x"
@@ -65,44 +60,34 @@ case $CPUTYPE in
echo "${ES_REVISION}" > /etc/powervr-esrev
fi
/usr/bin/pvrsrvinit
- ;;
-"TI816x")
- echo Starting PVR
- insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
- modprobe omaplfb
- modprobe bufferclass_ti
-
- pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
- bc_maj=`grep "bc" /proc/devices | cut -b1,2,3`
+}
- if [ -e /dev/pvrsrvkm ] ; then
- rm -f /dev/pvrsrvkm
- fi
+case $CPUTYPE in
+"OMAP3530")
+ sgxprepare
- mknod /dev/pvrsrvkm c $pvr_maj 0
- chmod 666 /dev/pvrsrvkm
+ devmem2 0x48004B48 w 0x2 > /dev/null
+ devmem2 0x48004B10 w 0x1 > /dev/null
+ devmem2 0x48004B00 w 0x2 > /dev/null
- touch /etc/powervr-esrev
+ ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')"
- SAVED_ESREVISION="$(cat /etc/powervr-esrev)"
+ sgxfinish
+ ;;
+"TI816x")
+ sgxprepare
- devmem2 0x48180F04 w 0x0
- devmem2 0x48180900 w 0x2
- devmem2 0x48180920 w 0x2
+ devmem2 0x48180F04 w 0x0 > /dev/null
+ devmem2 0x48180900 w 0x2 > /dev/null
+ devmem2 0x48180920 w 0x2 > /dev/null
ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:6: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')"
- if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then
- echo -n "Starting SGX fixup for"
- echo " ES${ES_REVISION}.x"
- cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib
- cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin
- echo "${ES_REVISION}" > /etc/powervr-esrev
- fi
- /usr/bin/pvrsrvinit
-
+ sgxfinish
;;
*)
echo No SGX hardware, not starting PVR
;;
esac
+
+