diff options
author | Koen Kooi <koen@openembedded.org> | 2010-02-23 16:04:51 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-02-24 12:06:59 +0100 |
commit | 32799b8fb20c213dd932780bf21148d050d772f4 (patch) | |
tree | 905c698018af48ae6aa94094a67badfa5aa674bc /recipes/powervr-drivers/libgles-omap3/rc.pvr | |
parent | 23681e960148d0edff965eaef30044678eed111e (diff) |
libgles-omap3: complete overhaul
* convert to new-style staging
* (re)build demos with proper toolchain and flags
* build trainingcourses
* generate .desktop files on the fly
* delete old versions
Diffstat (limited to 'recipes/powervr-drivers/libgles-omap3/rc.pvr')
-rwxr-xr-x | recipes/powervr-drivers/libgles-omap3/rc.pvr | 56 |
1 files changed, 48 insertions, 8 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr index 4a698da60d..2a8260baec 100755 --- a/recipes/powervr-drivers/libgles-omap3/rc.pvr +++ b/recipes/powervr-drivers/libgles-omap3/rc.pvr @@ -1,14 +1,39 @@ #!/bin/sh +PATH=$PATH:/usr/sbin + +BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" +YRES="$(fbset | grep geom | awk '{print $3}')" CPUTYPE="$(cputype)" -if [ $CPUTYPE = "OMAP3530" ]; then +if [ "$1" = "" ]; then + echo PVR-INIT: Please use start, stop, or restart. + exit 1 +fi + +if [ "$1" = "stop" -o "$1" = "restart" ]; then + echo Stopping PVR + #rmmod bc_example + rmmod omaplfb 2>/dev/null + rmmod pvrsrvkm 2>/dev/null +fi - rmmod omaplfb - rmmod pvrsrvkm +if [ "$1" = "stop" ]; then + exit 0 +fi - insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") +# Set RGBA ordering to something the drivers like +if [ "$BITSPERPIXEL" = "32" ] ; then + fbset -rgba 8/16,8/8,8/0,8/24 +fi +# Try to enable triple buffering when there's enough VRAM +fbset -vyres $(expr $YRES \* 3) + +if [ $CPUTYPE = "OMAP3530" ]; then + echo Starting PVR + insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") + #modprobe bc_example modprobe omaplfb pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` @@ -20,11 +45,26 @@ if [ $CPUTYPE = "OMAP3530" ]; then mknod /dev/pvrsrvkm c $pvr_maj 0 chmod 666 /dev/pvrsrvkm - /usr/bin/pvrsrvinit + touch /etc/powervr-esrev - # Set SGX to full speed - devmem2 0x48004b40 w 0 + SAVED_ESREVISION="$(cat /etc/powervr-esrev)" + ES_REVISION="$(cat /proc/cpuinfo | grep "CPU revision" | awk -F: '{print $2}')" + + if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then + echo -n "Starting SGX fixup for" + if [ "${ES_REVISION}" = " 3" ] ; then + echo " ES3.x" + cp -a /usr/lib/ES3.0/* /usr/lib + cp -a /usr/bin/ES3.0/* /usr/bin + else + echo "ES 2.x" + cp -a /usr/lib/ES2.0/* /usr/lib + cp -a /usr/bin/ES2.0/* /usr/bin + fi + echo "${ES_REVISION}" > /etc/powervr-esrev + fi + /usr/bin/pvrsrvinit else - echo No SGX hardware, not starting pvrsinit + echo No SGX hardware, not starting PVR fi |