summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/libgles/libgles-omap3/rc.pvr
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-01-04 15:55:29 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2012-01-26 10:01:47 +0100
commit5a0cf7c32c54199314f65d404c856501ec0f37a2 (patch)
treed1368d038a87bdbf70f06525b25dc2f36a9a8f3f /recipes-graphics/libgles/libgles-omap3/rc.pvr
parent98ea84b1f847b49ad0df6d125ea90247cfb3500c (diff)
downloadmeta-ti-5a0cf7c32c54199314f65d404c856501ec0f37a2.tar.gz
libgles-omap3: merge in updates from arago
* ES3.x do_install fix * AM335x support And one non-arago fix: break dependency on 'initscripts' package Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-graphics/libgles/libgles-omap3/rc.pvr')
-rwxr-xr-xrecipes-graphics/libgles/libgles-omap3/rc.pvr29
1 files changed, 23 insertions, 6 deletions
diff --git a/recipes-graphics/libgles/libgles-omap3/rc.pvr b/recipes-graphics/libgles/libgles-omap3/rc.pvr
index d32f9e4c..07efa663 100755
--- a/recipes-graphics/libgles/libgles-omap3/rc.pvr
+++ b/recipes-graphics/libgles/libgles-omap3/rc.pvr
@@ -1,6 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2PATH=$PATH:/usr/sbin 2PATH=$PATH:/usr/sbin
3 3
4# Check if an fb device is available. If not then just go ahead and
5# exit because we have no display.
6fbset > /dev/null 2>&1
7if [ "$?" == "1" ]
8then
9 # looks like there is no display, so let's exit
10 exit 0
11fi
12
4BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" 13BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')"
5YRES="$(fbset | grep geom | awk '{print $3}')" 14YRES="$(fbset | grep geom | awk '{print $3}')"
6 15
@@ -28,7 +37,7 @@ if [ "$BITSPERPIXEL" = "32" ] ; then
28fi 37fi
29 38
30# Try to enable triple buffering when there's enough VRAM 39# Try to enable triple buffering when there's enough VRAM
31fbset -vyres $(expr $YRES \* 3) 40fbset -vyres $(expr $YRES \* 3)
32 41
33sgxprepare () { 42sgxprepare () {
34 echo Starting PVR 43 echo Starting PVR
@@ -39,11 +48,11 @@ sgxprepare () {
39 pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` 48 pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
40 bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` 49 bc_maj=`grep "bc" /proc/devices | cut -b1,2,3`
41 50
42 if [ -e /dev/pvrsrvkm ] ; then 51 if [ -e /dev/pvrsrvkm ] ; then
43 rm -f /dev/pvrsrvkm 52 rm -f /dev/pvrsrvkm
44 fi 53 fi
45 54
46 mknod /dev/pvrsrvkm c $pvr_maj 0 55 mknod /dev/pvrsrvkm c $pvr_maj 0
47 chmod 666 /dev/pvrsrvkm 56 chmod 666 /dev/pvrsrvkm
48 57
49 touch /etc/powervr-esrev 58 touch /etc/powervr-esrev
@@ -56,7 +65,7 @@ sgxfinish () {
56 echo -n "Starting SGX fixup for" 65 echo -n "Starting SGX fixup for"
57 echo " ES${ES_REVISION}.x" 66 echo " ES${ES_REVISION}.x"
58 cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib 67 cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib
59 cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin 68 cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin
60 echo "${ES_REVISION}" > /etc/powervr-esrev 69 echo "${ES_REVISION}" > /etc/powervr-esrev
61 fi 70 fi
62 /usr/bin/pvrsrvinit 71 /usr/bin/pvrsrvinit
@@ -74,6 +83,16 @@ case $CPUTYPE in
74 83
75 sgxfinish 84 sgxfinish
76 ;; 85 ;;
86"TI33XX")
87 sgxprepare
88
89 devmem2 0x44e01104 w 0x0 > /dev/null
90 devmem2 0x44e00904 w 0x2 > /dev/null
91
92 ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:8: | tail -n1 | awk -F': ' '{print $2}')"
93
94 sgxfinish
95 ;;
77"TI816x") 96"TI816x")
78 sgxprepare 97 sgxprepare
79 98
@@ -89,5 +108,3 @@ case $CPUTYPE in
89 echo No SGX hardware, not starting PVR 108 echo No SGX hardware, not starting PVR
90 ;; 109 ;;
91esac 110esac
92
93