diff options
Diffstat (limited to 'recipes-graphics/libgles/libgles-omap3-4.09.00.01/rc_dri.pvr')
-rwxr-xr-x | recipes-graphics/libgles/libgles-omap3-4.09.00.01/rc_dri.pvr | 136 |
1 files changed, 0 insertions, 136 deletions
diff --git a/recipes-graphics/libgles/libgles-omap3-4.09.00.01/rc_dri.pvr b/recipes-graphics/libgles/libgles-omap3-4.09.00.01/rc_dri.pvr deleted file mode 100755 index dd1e9421..00000000 --- a/recipes-graphics/libgles/libgles-omap3-4.09.00.01/rc_dri.pvr +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | PATH=$PATH:/usr/sbin | ||
3 | |||
4 | # Check if an fb device is available. If not then just go ahead and | ||
5 | # exit because we have no display. | ||
6 | fbset > /dev/null 2>&1 | ||
7 | if [ "$?" == "1" ] | ||
8 | then | ||
9 | # looks like there is no display, so let's exit | ||
10 | exit 0 | ||
11 | fi | ||
12 | |||
13 | BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" | ||
14 | YRES="$(fbset | grep geom | awk '{print $3}')" | ||
15 | |||
16 | CPUTYPE="$(cputype)" | ||
17 | |||
18 | if [ "$1" = "" ]; then | ||
19 | echo PVR-INIT: Please use start, stop, or restart. | ||
20 | exit 1 | ||
21 | fi | ||
22 | |||
23 | if [ "$1" = "stop" -o "$1" = "restart" ]; then | ||
24 | echo Stopping PVR | ||
25 | |||
26 | # Stop the X Server. | ||
27 | # | ||
28 | [ -f /tmp/.X0-lock ] && read XPID < /tmp/.X0-lock && [ -n "$XPID" ] && kill $XPID && while [ -e /proc/$XPID ] ; do sleep 1; done | ||
29 | |||
30 | rmmod bufferclass_ti | ||
31 | rmmod pvrsrvkm 2>/dev/null | ||
32 | rmmod drm 2>/dev/null | ||
33 | fi | ||
34 | |||
35 | if [ "$1" = "stop" ]; then | ||
36 | exit 0 | ||
37 | fi | ||
38 | |||
39 | # Set RGBA ordering to something the drivers like | ||
40 | if [ "$BITSPERPIXEL" = "32" ] ; then | ||
41 | fbset -rgba 8/16,8/8,8/0,8/24 | ||
42 | fi | ||
43 | |||
44 | # Try to enable triple buffering when there's enough VRAM | ||
45 | fbset -vyres $(expr $YRES \* 3) | ||
46 | |||
47 | sgxprepare () { | ||
48 | echo Starting PVR | ||
49 | |||
50 | # Start the X Server. | ||
51 | # The X Server will load the PVR Services module. | ||
52 | # | ||
53 | /usr/local/XSGX/bin/X -verbose -config /usr/local/XSGX/etc/xorg.conf & | ||
54 | |||
55 | modprobe drm | ||
56 | |||
57 | insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") | ||
58 | |||
59 | if [ "$?" != "0" ] | ||
60 | then | ||
61 | echo "Could not find pvrsrvkm driver" | ||
62 | exit 1 | ||
63 | fi | ||
64 | |||
65 | modprobe bufferclass_ti | ||
66 | |||
67 | pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` | ||
68 | bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` | ||
69 | |||
70 | if [ -e /dev/pvrsrvkm ] ; then | ||
71 | rm -f /dev/pvrsrvkm | ||
72 | fi | ||
73 | |||
74 | mknod /dev/pvrsrvkm c $pvr_maj 0 | ||
75 | chmod 666 /dev/pvrsrvkm | ||
76 | |||
77 | touch /etc/powervr-esrev | ||
78 | |||
79 | SAVED_ESREVISION="$(cat /etc/powervr-esrev)" | ||
80 | } | ||
81 | |||
82 | sgxfinish () { | ||
83 | # Fix up a bug in opkg | ||
84 | if [ $(readlink /usr/lib/libsrv_um.so) != $(readlink /usr/lib/libsrv_um.so.1) ] ; then | ||
85 | cd /usr/lib | ||
86 | ln -sf $(readlink /usr/lib/libsrv_um.so.1) libsrv_um.so | ||
87 | fi | ||
88 | |||
89 | if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then | ||
90 | echo -n "Starting SGX fixup for" | ||
91 | echo " ES${ES_REVISION}.x" | ||
92 | cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib | ||
93 | cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin | ||
94 | echo "${ES_REVISION}" > /etc/powervr-esrev | ||
95 | fi | ||
96 | |||
97 | if ! /usr/bin/pvrsrvctl --start --no-module; then return; fi | ||
98 | } | ||
99 | |||
100 | case $CPUTYPE in | ||
101 | "OMAP3530") | ||
102 | sgxprepare | ||
103 | |||
104 | devmem2 0x48004B48 w 0x2 > /dev/null | ||
105 | devmem2 0x48004B10 w 0x1 > /dev/null | ||
106 | devmem2 0x48004B00 w 0x2 > /dev/null | ||
107 | |||
108 | ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" | ||
109 | |||
110 | sgxfinish | ||
111 | ;; | ||
112 | "TI33XX") | ||
113 | sgxprepare | ||
114 | |||
115 | devmem2 0x44e01104 w 0x0 > /dev/null | ||
116 | devmem2 0x44e00904 w 0x2 > /dev/null | ||
117 | |||
118 | ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:8: | tail -n1 | awk -F': ' '{print $2}')" | ||
119 | |||
120 | sgxfinish | ||
121 | ;; | ||
122 | "TI816x") | ||
123 | sgxprepare | ||
124 | |||
125 | devmem2 0x48180F04 w 0x0 > /dev/null | ||
126 | devmem2 0x48180900 w 0x2 > /dev/null | ||
127 | devmem2 0x48180920 w 0x2 > /dev/null | ||
128 | |||
129 | ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:6: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" | ||
130 | |||
131 | sgxfinish | ||
132 | ;; | ||
133 | *) | ||
134 | echo No SGX hardware, not starting PVR | ||
135 | ;; | ||
136 | esac | ||