boost: bump to version 1.63.0
[buildroot-gz.git] / package / sunxi-mali / S80mali
blobecfbab97b4ae02df59b569f39d1c91ad6281a7fe
1 #!/bin/sh -e
3 install_driver() {
4 DRIVER=$1
5 OPTS=$2
7 modprobe $DRIVER $OPTS
8 maj=$(awk "\$2==\"${DRIVER}\" { print \$1; }" /proc/devices)
10 rm -f /dev/${DRIVER}
12 mknod /dev/${DRIVER} c $maj 0
13 chmod 600 /dev/${DRIVER}
16 start() {
17 echo "mali: starting driver"
19 BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')"
20 YRES="$(fbset | awk '/geom/ {print $3}')"
21 # Set RGBA ordering to something the drivers like
22 if [ "$BITSPERPIXEL" = "32" ] ; then
23 fbset -rgba 8/16,8/8,8/0,8/24
25 # Try to enable triple buffering when there's enough VRAM
26 fbset -vyres $(( YRES*3 ))
28 install_driver mali
29 install_driver ump
32 stop() {
33 echo "mali: stopping driver"
35 rmmod ump
36 rmmod mali
39 case "$1" in
40 start)
41 start
43 stop)
44 stop
46 restart)
47 stop
48 start
51 echo "mali: Please use start, stop, or restart."
52 exit 1
54 esac