diff options
author | Koen Kooi <k-kooi@ti.com> | 2010-10-07 12:42:13 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-10-07 12:47:16 +0200 |
commit | d2939bad15136d9e59af5f84ee8d4ac833920c11 (patch) | |
tree | f7f6cb429ed2ebfa7172991490ce3d3ae0dda329 /recipes/powervr-drivers/libgles-omap3/rc.pvr | |
parent | b3bf82db70ed74a6781fc2cc23ea0a8fe0a66f49 (diff) | |
download | openembedded-d2939bad15136d9e59af5f84ee8d4ac833920c11.tar.gz |
libgles-omap3: fixup ti816x
* needs a better fix in cputype, but this will do for now
Signed-off-by: Koen Kooi <k-kooi@ti.com>
Diffstat (limited to 'recipes/powervr-drivers/libgles-omap3/rc.pvr')
-rwxr-xr-x | recipes/powervr-drivers/libgles-omap3/rc.pvr | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr index b84225e775..6513102864 100755 --- a/recipes/powervr-drivers/libgles-omap3/rc.pvr +++ b/recipes/powervr-drivers/libgles-omap3/rc.pvr @@ -30,7 +30,8 @@ fi # Try to enable triple buffering when there's enough VRAM fbset -vyres $(expr $YRES \* 3) -if [ $CPUTYPE = "OMAP3530" ]; then +case $CPUTYPE in +"OMAP3530") echo Starting PVR insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") modprobe omaplfb @@ -64,7 +65,44 @@ if [ $CPUTYPE = "OMAP3530" ]; then echo "${ES_REVISION}" > /etc/powervr-esrev fi /usr/bin/pvrsrvinit -else - echo No SGX hardware, not starting PVR -fi + ;; +"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 + + mknod /dev/pvrsrvkm c $pvr_maj 0 + chmod 666 /dev/pvrsrvkm + touch /etc/powervr-esrev + + SAVED_ESREVISION="$(cat /etc/powervr-esrev)" + + devmem2 0x48180F04 w 0x0 + devmem2 0x48180900 w 0x2 + devmem2 0x48180920 w 0x2 + + ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x10205:6: -e s:0x10201:3: -e s:0x10003: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 + + ;; +*) + echo No SGX hardware, not starting PVR + ;; +esac |