summaryrefslogtreecommitdiff
path: root/recipes/powervr-drivers/libgles-omap3
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/powervr-drivers/libgles-omap3')
-rw-r--r--recipes/powervr-drivers/libgles-omap3/chameleonman.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/evilskull.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/fivespheres.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/lighting.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/mouse.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/particles.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/polybump.desktop8
-rwxr-xr-xrecipes/powervr-drivers/libgles-omap3/rc.pvr56
-rw-r--r--recipes/powervr-drivers/libgles-omap3/sample.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/shaders.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/skybox.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/skybox2.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/trilinear.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/vase.desktop8
17 files changed, 56 insertions, 128 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop b/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop
deleted file mode 100644
index 23d4fc0b7d..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=ChameleonMan Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/ChameleonMan/OGLESChameleonMan
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/evilskull.desktop b/recipes/powervr-drivers/libgles-omap3/evilskull.desktop
deleted file mode 100644
index 0590f7f7ff..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/evilskull.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=EvilSkull Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/EvilSkull/OGLESEvilSkull
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop b/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop
deleted file mode 100644
index 569cad693c..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=FiveSpheres Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/FiveSpheres/OGLESFiveSpheres
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/lighting.desktop b/recipes/powervr-drivers/libgles-omap3/lighting.desktop
deleted file mode 100644
index 39179b2408..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/lighting.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Lighting Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Lighting/OGLESLighting
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/mouse.desktop b/recipes/powervr-drivers/libgles-omap3/mouse.desktop
deleted file mode 100644
index a56531014c..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/mouse.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Mouse Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Mouse/OGLESMouse
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop b/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop
deleted file mode 100644
index 9d7194a586..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=OptimizeMesh Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/OptimizeMesh/OGLESOptimizeMesh
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/particles.desktop b/recipes/powervr-drivers/libgles-omap3/particles.desktop
deleted file mode 100644
index 1d71b9d25c..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/particles.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Particles Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Particles/OGLESParticles
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/polybump.desktop b/recipes/powervr-drivers/libgles-omap3/polybump.desktop
deleted file mode 100644
index d7cf1af8bd..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/polybump.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=PolyBump Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/PolyBump/OGLESPolyBump
-Icon=star
-Type=Application
-Categories=Demos;
-
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
diff --git a/recipes/powervr-drivers/libgles-omap3/sample.desktop b/recipes/powervr-drivers/libgles-omap3/sample.desktop
new file mode 100644
index 0000000000..6bacac9277
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/sample.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=NAME Demo
+Comment=OGLES Demo
+Exec=EXEC
+Icon=star
+Type=Application
+Categories=Graphics;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/shaders.desktop b/recipes/powervr-drivers/libgles-omap3/shaders.desktop
deleted file mode 100644
index bee8c92fb9..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/shaders.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Shaders Demo
-Comment=OGLES2 Demo
-Exec=/usr/demos/OGLES2/Shaders/OGLES2Shaders
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop b/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop
deleted file mode 100644
index 0f228d5d27..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=ShadowTechniques Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/ShadowTechniques/OGLESShadowTechniques
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/skybox.desktop b/recipes/powervr-drivers/libgles-omap3/skybox.desktop
deleted file mode 100644
index 69a7f9418b..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/skybox.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Skybox Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Skybox/OGLESSkybox
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/skybox2.desktop b/recipes/powervr-drivers/libgles-omap3/skybox2.desktop
deleted file mode 100644
index a2b02f72f6..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/skybox2.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Skybox2 Demo
-Comment=OGLES2 Demo
-Exec=/usr/demos/OGLES2/Skybox2/OGLES2Skybox2
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/trilinear.desktop b/recipes/powervr-drivers/libgles-omap3/trilinear.desktop
deleted file mode 100644
index 3e105ac182..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/trilinear.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Trilinear Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Trilinear/OGLESTrilinear
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop b/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop
deleted file mode 100644
index 9bad690555..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=UserClipPlanes Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/UserClipPlanes/OGLESUserClipPlanes
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/vase.desktop b/recipes/powervr-drivers/libgles-omap3/vase.desktop
deleted file mode 100644
index 06064349d6..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/vase.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Vase Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Vase/OGLESVase
-Icon=star
-Type=Application
-Categories=Demos;
-