S80ti-gfx 912 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. start() {
  3. echo "ti-gfx: starting pvr driver"
  4. BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')"
  5. YRES="$(fbset | awk '/geom/ {print $3}')"
  6. # Set RGBA ordering to something the drivers like
  7. if [ "$BITSPERPIXEL" = "32" ] ; then
  8. fbset -rgba 8/16,8/8,8/0,8/24
  9. fi
  10. # Try to enable triple buffering when there's enough VRAM
  11. fbset -vyres $(( YRES*3 ))
  12. modprobe pvrsrvkm
  13. modprobe omaplfb
  14. modprobe bufferclass_ti
  15. pvr_maj=$(awk '$2=="pvrsrvkm" { print $1; }' /proc/devices)
  16. rm -f /dev/pvrsrvkm
  17. mknod /dev/pvrsrvkm c $pvr_maj 0
  18. chmod 600 /dev/pvrsrvkm
  19. if ! /usr/bin/pvrsrvctl --start --no-module; then
  20. echo "ti-gfx: unable to start server"
  21. fi
  22. }
  23. stop() {
  24. echo "ti-gfx: stopping pvr driver"
  25. rmmod bufferclass_ti
  26. rmmod omaplfb
  27. rmmod pvrsrvkm
  28. }
  29. case "$1" in
  30. start)
  31. start
  32. ;;
  33. stop)
  34. stop
  35. ;;
  36. restart)
  37. stop
  38. start
  39. ;;
  40. *)
  41. echo "ti-gfx: Please use start, stop, or restart."
  42. exit 1
  43. ;;
  44. esac