4 BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')"
5 YRES="$(fbset | grep geom | awk '{print $3}')"
10 echo PVR-INIT: Please use start, stop, or restart.
14 if [ "$1" = "stop" -o "$1" = "restart" ]; then
17 rmmod omaplfb 2>/dev/null
18 rmmod pvrsrvkm 2>/dev/null
21 if [ "$1" = "stop" ]; then
25 # Set RGBA ordering to something the drivers like
26 if [ "$BITSPERPIXEL" = "32" ] ; then
27 fbset -rgba 8/16,8/8,8/0,8/24
30 # Try to enable triple buffering when there's enough VRAM
31 fbset -vyres $(expr $YRES \* 3)
33 if [ $CPUTYPE = "OMAP3530" ]; then
35 insmod /lib/modules/$(uname -r)/kernel/drivers/gpu/pvrsrvkm.ko
36 insmod /lib/modules/$(uname -r)/kernel/drivers/gpu/omaplfb.ko
37 insmod /lib/modules/$(uname -r)/kernel/drivers/gpu/bufferclass_ti.ko
39 if ! lsmod | grep -q pvrsrvkm; then
40 echo pvrsrvkm failed to load
44 #pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
45 #bc_maj=`grep "bc" /proc/devices | cut -b1,2,3`
47 #if [ -e /dev/pvrsrvkm ] ; then
51 #mknod /dev/pvrsrvkm c $pvr_maj 0
52 chmod 666 /dev/pvrsrvkm
54 touch /etc/powervr-esrev
56 SAVED_ESREVISION="$(cat /etc/powervr-esrev)"
58 devmem2 0x48004B48 w 0x2 > /dev/null
59 devmem2 0x48004B10 w 0x1 > /dev/null
60 devmem2 0x48004B00 w 0x2 > /dev/null
62 ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x10205:5: -e s:0x10201:3: -e s:0x10003:2: | tail -n1 | awk -F': ' '{print $2}')"
64 # enable hardware supervised domain power state transition - makes suspend work
65 devmem2 0x48004B48 w 0x3 > /dev/null
67 if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then
68 echo -n "Starting SGX fixup for"
69 echo " ES${ES_REVISION}.x"
70 cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib
71 cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin
72 echo "${ES_REVISION}" > /etc/powervr-esrev
76 echo No SGX hardware, not starting PVR