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 | |
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')
-rw-r--r-- | recipes/powervr-drivers/libgles-omap3.inc | 2 | ||||
-rwxr-xr-x | recipes/powervr-drivers/libgles-omap3/cputype | 14 | ||||
-rwxr-xr-x | recipes/powervr-drivers/libgles-omap3/rc.pvr | 46 |
3 files changed, 53 insertions, 9 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc index 938b59ba05..d2ab4602a9 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 = "r7" +PR = "r8" COMPATIBLE_MACHINE = "(omap3|ti816x)" diff --git a/recipes/powervr-drivers/libgles-omap3/cputype b/recipes/powervr-drivers/libgles-omap3/cputype index 9dc2b49fa2..e34a5f22d3 100755 --- a/recipes/powervr-drivers/libgles-omap3/cputype +++ b/recipes/powervr-drivers/libgles-omap3/cputype @@ -1,5 +1,11 @@ #!/bin/sh -devmem2 0x4800244c | \ -grep 'Value at address' | \ -sed -e 's/.*): //' | \ -sed -e 's/0x5C00/OMAP3503/' -e 's/0x1C00/OMAP3515/' -e 's/0x4C00/OMAP3525/' -e 's/0xC00/OMAP3530/' +. /etc/init.d/functions + +if [ "$(machine_id)" = "ti8168evm" ] ; then + echo TI816x +else + devmem2 0x4800244c | \ + grep 'Value at address' | \ + sed -e 's/.*): //' | \ + sed -e 's/0x5C00/OMAP3503/' -e 's/0x1C00/OMAP3515/' -e 's/0x4C00/OMAP3525/' -e 's/0xC00/OMAP3530/' +fi 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 |