* updated knights (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / contrib / 915resolution / updates.patch
blob602d4b27dbfa51f63385cd26a3a04f42f000c552
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../915resolution/updates.patch
5 # Copyright (C) 2014 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 Nokia, or better their contractor, forgot to fill the native display resolution
18 (1280x720) into the BIOS tables, which unfortunately does not allow to select
19 them via basic VESA BIOS functions. Given the unfortunate GMA500 aka. Poulsbo
20 driver situation we'd rather like to set the mode for more stable pieces of
21 legacy software blitting, for now.
23 - Rene Rebe <rene@exactcode.de>
25 This source has been patched by tempestuous in 2008, from 0.5.3.
26 I BK added 500GMA and 945GME support (adapted from an arch patch), dec 2009.
27 tempestuous adds device 2a408086 "GM45" Dec 12 2009.
28 20120521: tempestuous: more patches, refer:
29 http://www.murga-linux.com/puppy/viewtopic.php?t=32462
31 diff -Naur 915resolution-0.5.3/915resolution.c 915resolution-0.5.3-patched20120521/915resolution.c
32 --- 915resolution-0.5.3/915resolution.c 2007-04-15 18:46:56.000000000 +0800
33 +++ 915resolution-0.5.3-patched20120521/915resolution.c 2014-11-27 15:36:39.000000000 +0800
34 @@ -55,13 +61,13 @@
35 typedef unsigned int cardinal;
37 typedef enum {
38 - CT_UNKWN, CT_830, CT_845G, CT_855GM, CT_865G, CT_915G, CT_915GM, CT_945G, CT_945GM,
39 - CT_946GZ, CT_G965, CT_Q965
40 + CT_UNKWN, CT_500GMA, CT_830, CT_845G, CT_855GM, CT_865G, CT_915G, CT_915GM, CT_945G, CT_945GM,
41 + CT_945GME, CT_946GZ, CT_G965, CT_Q965, CT_GM965, CT_G33, CT_GM45, CT_GMA3150, CT_HDGraphics
42 } chipset_type;
44 char * chipset_type_names[] = {
45 - "UNKNOWN", "830", "845G", "855GM", "865G", "915G", "915GM", "945G", "945GM",
46 - "946GZ", "G965", "Q965"
47 + "UNKNOWN", "500GMA", "830", "845G", "855GM", "865G", "915G", "915GM", "945G", "945GM",
48 + "945GME", "946GZ", "G965", "Q965", "GM965", "G33", "GM45", "GMA3150", "HDGraphics"
51 typedef enum {
52 @@ -181,6 +187,10 @@
53 chipset_type type;
55 switch (id) {
56 + case 0x81008086:
57 + type = CT_500GMA;
58 + break;
60 case 0x35758086:
61 type = CT_830;
62 break;
63 @@ -213,6 +223,10 @@
64 type = CT_945GM;
65 break;
67 + case 0x27ac8086:
68 + type = CT_945GME;
69 + break;
71 case 0x29708086:
72 type = CT_946GZ;
73 break;
74 @@ -225,6 +239,46 @@
75 type = CT_Q965;
76 break;
78 + case 0x2a008086:
79 + type = CT_GM965;
80 + break;
82 + case 0x2a018086:
83 + type = CT_GM965;
84 + break;
86 + case 0x2a028086:
87 + type = CT_GM965;
88 + break;
90 + case 0x29b08086:
91 + type = CT_G33;
92 + break;
94 + case 0x29c08086:
95 + type = CT_G33;
96 + break;
98 + case 0x2a408086:
99 + type = CT_GM45;
100 + break;
102 + case 0xa0008086:
103 + type = CT_GMA3150;
104 + break;
106 + case 0xa0108086:
107 + type = CT_GMA3150;
108 + break;
110 + case 0x00408086:
111 + type = CT_HDGraphics;
112 + break;
114 + case 0x00448086:
115 + type = CT_HDGraphics;
116 + break;
118 default:
119 type = CT_UNKWN;
120 break;
121 @@ -502,15 +556,22 @@
122 outl(0x8000005a, 0xcf8);
123 outb(0x33, 0xcfe);
124 break;
125 + case CT_500GMA:
126 case CT_845G:
127 case CT_865G:
128 case CT_915G:
129 case CT_915GM:
130 case CT_945G:
131 case CT_945GM:
132 + case CT_945GME:
133 case CT_946GZ:
134 case CT_G965:
135 case CT_Q965:
136 + case CT_GM965:
137 + case CT_G33:
138 + case CT_GM45:
139 + case CT_GMA3150:
140 + case CT_HDGraphics:
141 outl(0x80000090, 0xcf8);
142 map->b1 = inb(0xcfd);
143 map->b2 = inb(0xcfe);
144 @@ -542,15 +603,22 @@
145 outl(0x8000005a, 0xcf8);
146 outb(map->b1, 0xcfe);
147 break;
148 + case CT_500GMA:
149 case CT_845G:
150 case CT_865G:
151 case CT_915G:
152 case CT_915GM:
153 case CT_945G:
154 case CT_945GM:
155 + case CT_945GME:
156 case CT_946GZ:
157 case CT_G965:
158 case CT_Q965:
159 + case CT_GM965:
160 + case CT_G33:
161 + case CT_GM45:
162 + case CT_GMA3150:
163 + case CT_HDGraphics:
164 outl(0x80000090, 0xcf8);
165 outb(map->b1, 0xcfd);
166 outb(map->b2, 0xcfe);
167 @@ -782,7 +850,10 @@
168 return 0;
171 - if (!strcmp(argv[index], "845")) {
172 + else if (!strcmp(argv[index], "500GMA")) {
173 + *forced_chipset = CT_500GMA;
175 + else if (!strcmp(argv[index], "845")) {
176 *forced_chipset = CT_845G;
178 else if (!strcmp(argv[index], "855")) {
179 @@ -803,6 +874,9 @@
180 else if (!strcmp(argv[index], "945GM")) {
181 *forced_chipset = CT_945GM;
183 + else if (!strcmp(argv[index], "945GME")) {
184 + *forced_chipset = CT_945GME;
186 else if (!strcmp(argv[index], "946GZ")) {
187 *forced_chipset = CT_946GZ;
189 @@ -812,6 +886,21 @@
190 else if (!strcmp(argv[index], "Q965")) {
191 *forced_chipset = CT_Q965;
193 + else if (!strcmp(argv[index], "GM965")) {
194 + *forced_chipset = CT_GM965;
196 + else if (!strcmp(argv[index], "G33")) {
197 + *forced_chipset = CT_G33;
199 + else if (!strcmp(argv[index], "GM45")) {
200 + *forced_chipset = CT_GM45;
202 + else if (!strcmp(argv[index], "GMA3150")) {
203 + *forced_chipset = CT_GMA3150;
205 + else if (!strcmp(argv[index], "HDGraphics")) {
206 + *forced_chipset = CT_HDGraphics;
208 else {
209 *forced_chipset = CT_UNKWN;