diff options
-rw-r--r-- | recipes/powervr-drivers/libgles-omap3.inc | 2 | ||||
-rwxr-xr-x | recipes/powervr-drivers/libgles-omap3/rc.pvr | 57 |
2 files changed, 22 insertions, 37 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc index 61d7f3dfc8..ac21631517 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 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 + + |