[oe-commits] Koen Kooi : libgles-omap3: fixup ti816x

git version control git at git.openembedded.org
Thu Oct 7 10:49:06 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: d2939bad15136d9e59af5f84ee8d4ac833920c11
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=d2939bad15136d9e59af5f84ee8d4ac833920c11

Author: Koen Kooi <k-kooi at ti.com>
Date:   Thu Oct  7 12:42:13 2010 +0200

libgles-omap3: fixup ti816x

* needs a better fix in cputype, but this will do for now

Signed-off-by: Koen Kooi <k-kooi at ti.com>

---

 recipes/powervr-drivers/libgles-omap3.inc     |    2 +-
 recipes/powervr-drivers/libgles-omap3/cputype |   14 +++++--
 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 938b59b..d2ab460 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 9dc2b49..e34a5f2 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 b84225e..6513102 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





More information about the Openembedded-commits mailing list