1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef AST_TABLES_H
25#define AST_TABLES_H
26
27
28#define TextModeIndex 0
29#define EGAModeIndex 1
30#define VGAModeIndex 2
31#define HiCModeIndex 3
32#define TrueCModeIndex 4
33
34#define Charx8Dot 0x00000001
35#define HalfDCLK 0x00000002
36#define DoubleScanMode 0x00000004
37#define LineCompareOff 0x00000008
38#define SyncPP 0x00000000
39#define SyncPN 0x00000040
40#define SyncNP 0x00000080
41#define SyncNN 0x000000C0
42#define HBorder 0x00000020
43#define VBorder 0x00000010
44#define WideScreenMode 0x00000100
45
46
47
48#define VCLK25_175 0x00
49#define VCLK28_322 0x01
50#define VCLK31_5 0x02
51#define VCLK36 0x03
52#define VCLK40 0x04
53#define VCLK49_5 0x05
54#define VCLK50 0x06
55#define VCLK56_25 0x07
56#define VCLK65 0x08
57#define VCLK75 0x09
58#define VCLK78_75 0x0A
59#define VCLK94_5 0x0B
60#define VCLK108 0x0C
61#define VCLK135 0x0D
62#define VCLK157_5 0x0E
63#define VCLK162 0x0F
64
65#define VCLK154 0x10
66#define VCLK83_5 0x11
67#define VCLK106_5 0x12
68#define VCLK146_25 0x13
69#define VCLK148_5 0x14
70
71static struct ast_vbios_dclk_info dclk_table[] = {
72 {0x2C, 0xE7, 0x03},
73 {0x95, 0x62, 0x03},
74 {0x67, 0x63, 0x01},
75 {0x76, 0x63, 0x01},
76 {0xEE, 0x67, 0x01},
77 {0x82, 0x62, 0x01},
78 {0xC6, 0x64, 0x01},
79 {0x94, 0x62, 0x01},
80 {0x80, 0x64, 0x00},
81 {0x7B, 0x63, 0x00},
82 {0x67, 0x62, 0x00},
83 {0x7C, 0x62, 0x00},
84 {0x8E, 0x62, 0x00},
85 {0x85, 0x24, 0x00},
86 {0x67, 0x22, 0x00},
87 {0x6A, 0x22, 0x00},
88 {0x4d, 0x4c, 0x80},
89 {0xa7, 0x78, 0x80},
90 {0x28, 0x49, 0x80},
91 {0x37, 0x49, 0x80},
92 {0x1f, 0x45, 0x80},
93};
94
95static struct ast_vbios_stdtable vbios_stdtable[] = {
96
97 {
98 0x67,
99 {0x00,0x03,0x00,0x02},
100 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
101 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
102 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
103 0xff},
104 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
105 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
106 0x0c,0x00,0x0f,0x08},
107 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
108 0xff}
109 },
110
111 {
112 0xe3,
113 {0x01,0x0f,0x00,0x06},
114 {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
115 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
116 0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xe3,
117 0xff},
118 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
119 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
120 0x01,0x00,0x0f,0x00},
121 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
122 0xff}
123 },
124
125 {
126 0x2f,
127 {0x01,0x0f,0x00,0x0e},
128 {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
129 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
130 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
131 0xff},
132 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
133 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
134 0x01,0x00,0x00,0x00},
135 {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
136 0xff}
137 },
138
139 {
140 0x2f,
141 {0x01,0x0f,0x00,0x0e},
142 {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
143 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
144 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
145 0xff},
146 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
147 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
148 0x01,0x00,0x00,0x00},
149 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
150 0xff}
151 },
152
153 {
154 0x2f,
155 {0x01,0x0f,0x00,0x0e},
156 {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
157 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
158 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
159 0xff},
160 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
161 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
162 0x01,0x00,0x00,0x00},
163 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
164 0xff}
165 },
166};
167
168static struct ast_vbios_enhtable res_640x480[] = {
169 { 800, 640, 8, 96, 525, 480, 2, 2, VCLK25_175,
170 (SyncNN | HBorder | VBorder | Charx8Dot), 60, 1, 0x2E },
171 { 832, 640, 16, 40, 520, 480, 1, 3, VCLK31_5,
172 (SyncNN | HBorder | VBorder | Charx8Dot), 72, 2, 0x2E },
173 { 840, 640, 16, 64, 500, 480, 1, 3, VCLK31_5,
174 (SyncNN | Charx8Dot) , 75, 3, 0x2E },
175 { 832, 640, 56, 56, 509, 480, 1, 3, VCLK36,
176 (SyncNN | Charx8Dot) , 85, 4, 0x2E },
177 { 832, 640, 56, 56, 509, 480, 1, 3, VCLK36,
178 (SyncNN | Charx8Dot) , 0xFF, 4, 0x2E },
179};
180
181static struct ast_vbios_enhtable res_800x600[] = {
182 {1024, 800, 24, 72, 625, 600, 1, 2, VCLK36,
183 (SyncPP | Charx8Dot), 56, 1, 0x30 },
184 {1056, 800, 40, 128, 628, 600, 1, 4, VCLK40,
185 (SyncPP | Charx8Dot), 60, 2, 0x30 },
186 {1040, 800, 56, 120, 666, 600, 37, 6, VCLK50,
187 (SyncPP | Charx8Dot), 72, 3, 0x30 },
188 {1056, 800, 16, 80, 625, 600, 1, 3, VCLK49_5,
189 (SyncPP | Charx8Dot), 75, 4, 0x30 },
190 {1048, 800, 32, 64, 631, 600, 1, 3, VCLK56_25,
191 (SyncPP | Charx8Dot), 84, 5, 0x30 },
192 {1048, 800, 32, 64, 631, 600, 1, 3, VCLK56_25,
193 (SyncPP | Charx8Dot), 0xFF, 5, 0x30 },
194};
195
196
197static struct ast_vbios_enhtable res_1024x768[] = {
198 {1344, 1024, 24, 136, 806, 768, 3, 6, VCLK65,
199 (SyncNN | Charx8Dot), 60, 1, 0x31 },
200 {1328, 1024, 24, 136, 806, 768, 3, 6, VCLK75,
201 (SyncNN | Charx8Dot), 70, 2, 0x31 },
202 {1312, 1024, 16, 96, 800, 768, 1, 3, VCLK78_75,
203 (SyncPP | Charx8Dot), 75, 3, 0x31 },
204 {1376, 1024, 48, 96, 808, 768, 1, 3, VCLK94_5,
205 (SyncPP | Charx8Dot), 84, 4, 0x31 },
206 {1376, 1024, 48, 96, 808, 768, 1, 3, VCLK94_5,
207 (SyncPP | Charx8Dot), 0xFF, 4, 0x31 },
208};
209
210static struct ast_vbios_enhtable res_1280x1024[] = {
211 {1688, 1280, 48, 112, 1066, 1024, 1, 3, VCLK108,
212 (SyncPP | Charx8Dot), 60, 1, 0x32 },
213 {1688, 1280, 16, 144, 1066, 1024, 1, 3, VCLK135,
214 (SyncPP | Charx8Dot), 75, 2, 0x32 },
215 {1728, 1280, 64, 160, 1072, 1024, 1, 3, VCLK157_5,
216 (SyncPP | Charx8Dot), 85, 3, 0x32 },
217 {1728, 1280, 64, 160, 1072, 1024, 1, 3, VCLK157_5,
218 (SyncPP | Charx8Dot), 0xFF, 3, 0x32 },
219};
220
221static struct ast_vbios_enhtable res_1600x1200[] = {
222 {2160, 1600, 64, 192, 1250, 1200, 1, 3, VCLK162,
223 (SyncPP | Charx8Dot), 60, 1, 0x33 },
224 {2160, 1600, 64, 192, 1250, 1200, 1, 3, VCLK162,
225 (SyncPP | Charx8Dot), 0xFF, 1, 0x33 },
226};
227
228static struct ast_vbios_enhtable res_1920x1200[] = {
229 {2080, 1920, 48, 32, 1235, 1200, 3, 6, VCLK154,
230 (SyncNP | Charx8Dot), 60, 1, 0x34 },
231 {2080, 1920, 48, 32, 1235, 1200, 3, 6, VCLK154,
232 (SyncNP | Charx8Dot), 0xFF, 1, 0x34 },
233};
234
235
236static struct ast_vbios_enhtable res_1280x800[] = {
237 {1680, 1280, 72,128, 831, 800, 3, 6, VCLK83_5,
238 (SyncPN | Charx8Dot | LineCompareOff | WideScreenMode), 60, 1, 0x35 },
239 {1680, 1280, 72,128, 831, 800, 3, 6, VCLK83_5,
240 (SyncPN | Charx8Dot | LineCompareOff | WideScreenMode), 0xFF, 1, 0x35 },
241
242};
243
244static struct ast_vbios_enhtable res_1440x900[] = {
245 {1904, 1440, 80,152, 934, 900, 3, 6, VCLK106_5,
246 (SyncPN | Charx8Dot | LineCompareOff | WideScreenMode), 60, 1, 0x36 },
247 {1904, 1440, 80,152, 934, 900, 3, 6, VCLK106_5,
248 (SyncPN | Charx8Dot | LineCompareOff | WideScreenMode), 0xFF, 1, 0x36 },
249};
250
251static struct ast_vbios_enhtable res_1680x1050[] = {
252 {2240, 1680,104,176, 1089, 1050, 3, 6, VCLK146_25,
253 (SyncPN | Charx8Dot | LineCompareOff | WideScreenMode), 60, 1, 0x37 },
254 {2240, 1680,104,176, 1089, 1050, 3, 6, VCLK146_25,
255 (SyncPN | Charx8Dot | LineCompareOff | WideScreenMode), 0xFF, 1, 0x37 },
256};
257
258
259static struct ast_vbios_enhtable res_1920x1080[] = {
260 {2200, 1920, 88, 44, 1125, 1080, 4, 5, VCLK148_5,
261 (SyncNP | Charx8Dot | LineCompareOff | WideScreenMode), 60, 1, 0x38 },
262 {2200, 1920, 88, 44, 1125, 1080, 4, 5, VCLK148_5,
263 (SyncNP | Charx8Dot | LineCompareOff | WideScreenMode), 0xFF, 1, 0x38 },
264};
265#endif
266