aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/powervr-drivers/libgles-omap3/rc.pvr
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/powervr-drivers/libgles-omap3/rc.pvr')
-rwxr-xr-xrecipes/powervr-drivers/libgles-omap3/rc.pvr57
1 files changed, 21 insertions, 36 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr
index b854852074..0a4f11b77f 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
+
+