Root/drivers/staging/xgifb/vb_table.h

1#ifndef _VB_TABLE_
2#define _VB_TABLE_
3static struct SiS_MCLKData XGI340New_MCLKData[] = {
4    {0x16, 0x01, 0x01, 166},
5    {0x19, 0x02, 0x01, 124},
6    {0x7C, 0x08, 0x01, 200},
7    {0x79, 0x06, 0x01, 250},
8    {0x29, 0x01, 0x81, 301},
9    {0x5c, 0x23, 0x01, 166},
10    {0x5c, 0x23, 0x01, 166},
11    {0x5c, 0x23, 0x01, 166}
12};
13
14static struct SiS_MCLKData XGI27New_MCLKData[] = {
15    {0x5c, 0x23, 0x01, 166},
16    {0x19, 0x02, 0x01, 124},
17    {0x7C, 0x08, 0x80, 200},
18    {0x79, 0x06, 0x80, 250},
19    {0x29, 0x01, 0x81, 300},
20    {0x5c, 0x23, 0x01, 166},
21    {0x5c, 0x23, 0x01, 166},
22    {0x5c, 0x23, 0x01, 166}
23};
24
25static struct XGI_ECLKDataStruct XGI340_ECLKData[] = {
26    {0x5c, 0x23, 0x01, 166},
27    {0x55, 0x84, 0x01, 123},
28    {0x7C, 0x08, 0x01, 200},
29    {0x79, 0x06, 0x01, 250},
30    {0x29, 0x01, 0x81, 301},
31    {0x5c, 0x23, 0x01, 166},
32    {0x5c, 0x23, 0x01, 166},
33    {0x5c, 0x23, 0x01, 166}
34};
35
36static unsigned char XG27_SR13[4][8] = {
37    {0x35, 0x45, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR13 */
38    {0x41, 0x51, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR14 */
39    {0x32, 0x32, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR18 */
40    {0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00} /* SR1B */
41};
42
43static unsigned char XGI340_SR13[4][8] = {
44    {0x35, 0x45, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR13 */
45    {0x41, 0x51, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR14 */
46    {0x31, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR18 */
47    {0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00} /* SR1B */
48};
49
50static unsigned char XGI340_cr41[24][8] = {
51    {0x20, 0x50, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0 CR41 */
52    {0xc4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 1 CR8A */
53    {0xc4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 2 CR8B */
54    {0xb5, 0xa4, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00},
55    {0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00},
56    {0x90, 0x90, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 5 CR68 */
57    {0x77, 0x77, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 6 CR69 */
58    {0x77, 0x77, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 7 CR6A */
59    {0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 8 CR6D */
60    {0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 9 CR80 */
61    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 10 CR81 */
62    {0x88, 0xa8, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 11 CR82 */
63    {0x44, 0x44, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 12 CR85 */
64    {0x48, 0x48, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 13 CR86 */
65    {0x54, 0x54, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 14 CR90 */
66    {0x54, 0x54, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 15 CR91 */
67    {0x0a, 0x0a, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 16 CR92 */
68    {0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 17 CR93 */
69    {0x10, 0x10, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 18 CR94 */
70    {0x11, 0x11, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 19 CR95 */
71    {0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 20 CR96 */
72    {0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 21 CRC3 */
73    {0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 22 CRC4 */
74    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /* 23 CRC5 */
75};
76
77static unsigned char XGI27_cr41[24][8] = {
78    {0x20, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0 CR41 */
79    {0xC4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 1 CR8A */
80    {0xC4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 2 CR8B */
81    {0xB3, 0x13, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 3 CR40[7],
82                                   CR99[2:0],
83                                   CR45[3:0]*/
84    {0xf0, 0xf5, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 4 CR59 */
85    {0x90, 0x90, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 5 CR68 */
86    {0x77, 0x67, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 6 CR69 */
87    {0x77, 0x77, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 7 CR6A */
88    {0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 8 CR6D */
89    {0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 9 CR80 */
90    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 10 CR81 */
91    {0x88, 0xcc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 11 CR82 */
92    {0x44, 0x88, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 12 CR85 */
93    {0x48, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 13 CR86 */
94    {0x54, 0x32, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 14 CR90 */
95    {0x54, 0x33, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 15 CR91 */
96    {0x0a, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 16 CR92 */
97    {0x44, 0x63, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 17 CR93 */
98    {0x10, 0x14, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 18 CR94 */
99    {0x11, 0x0B, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 19 CR95 */
100    {0x05, 0x22, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 20 CR96 */
101    {0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 21 CRC3 */
102    {0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 22 CRC4 */
103    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /* 23 CRC5 */
104};
105
106static unsigned char XGI340_CR6B[8][4] = {
107    {0xaa, 0xaa, 0xaa, 0xaa},
108    {0xaa, 0xaa, 0xaa, 0xaa},
109    {0xaa, 0xaa, 0xaa, 0xaa},
110    {0x00, 0x00, 0x00, 0x00},
111    {0x00, 0x00, 0x00, 0x00},
112    {0x00, 0x00, 0x00, 0x00},
113    {0x00, 0x00, 0x00, 0x00},
114    {0x00, 0x00, 0x00, 0x00}
115};
116
117static unsigned char XGI340_CR6E[8][4];
118
119static unsigned char XGI340_CR6F[8][32];
120
121static unsigned char XGI340_CR89[8][2];
122
123/* CR47,CR48,CR49,CR4A,CR4B,CR4C,CR70,CR71,CR74,CR75,CR76,CR77 */
124static unsigned char XGI340_AGPReg[12] = {
125    0x28, 0x23, 0x00, 0x20, 0x00, 0x20,
126    0x00, 0x05, 0xd0, 0x10, 0x10, 0x00
127};
128
129static unsigned char XGI340_SR16[4] = {0x03, 0x83, 0x03, 0x83};
130
131static struct XGI_ExtStruct XGI330_EModeIDTable[] = {
132    {0x2e, 0x0a1b, 0x0306, 0x06, 0x05, 0x06},
133    {0x2f, 0x0a1b, 0x0305, 0x05, 0x05, 0x05},
134    {0x30, 0x2a1b, 0x0407, 0x07, 0x07, 0x0e},
135    {0x31, 0x0a1b, 0x030d, 0x0d, 0x06, 0x3d},
136    {0x32, 0x0a1b, 0x0a0e, 0x0e, 0x06, 0x3e},
137    {0x33, 0x0a1d, 0x0a0d, 0x0d, 0x06, 0x3d},
138    {0x34, 0x2a1d, 0x0a0e, 0x0e, 0x06, 0x3e},
139    {0x35, 0x0a1f, 0x0a0d, 0x0d, 0x06, 0x3d},
140    {0x36, 0x2a1f, 0x0a0e, 0x0e, 0x06, 0x3e},
141    {0x38, 0x0a1b, 0x0508, 0x08, 0x00, 0x16},
142    {0x3a, 0x0e3b, 0x0609, 0x09, 0x00, 0x1e},
143    {0x3c, 0x0e3b, 0x070a, 0x0a, 0x00, 0x22}, /* mode 1600x1200
144                           add CRT2MODE [2003/10/07] */
145    {0x3d, 0x0e7d, 0x070a, 0x0a, 0x00, 0x22}, /* mode 1600x1200
146                           add CRT2MODE */
147    {0x40, 0x9a1c, 0x0000, 0x00, 0x04, 0x00},
148    {0x41, 0x9a1d, 0x0000, 0x00, 0x04, 0x00},
149    {0x43, 0x0a1c, 0x0306, 0x06, 0x05, 0x06},
150    {0x44, 0x0a1d, 0x0306, 0x06, 0x05, 0x06},
151    {0x46, 0x2a1c, 0x0407, 0x07, 0x07, 0x0e},
152    {0x47, 0x2a1d, 0x0407, 0x07, 0x07, 0x0e},
153    {0x49, 0x0a3c, 0x0508, 0x08, 0x00, 0x16},
154    {0x4a, 0x0a3d, 0x0508, 0x08, 0x00, 0x16},
155    {0x4c, 0x0e7c, 0x0609, 0x09, 0x00, 0x1e},
156    {0x4d, 0x0e7d, 0x0609, 0x09, 0x00, 0x1e},
157    {0x50, 0x9a1b, 0x0001, 0x01, 0x04, 0x02},
158    {0x51, 0xba1b, 0x0103, 0x03, 0x07, 0x03},
159    {0x52, 0x9a1b, 0x0204, 0x04, 0x00, 0x04},
160    {0x56, 0x9a1d, 0x0001, 0x01, 0x04, 0x02},
161    {0x57, 0xba1d, 0x0103, 0x03, 0x07, 0x03},
162    {0x58, 0x9a1d, 0x0204, 0x04, 0x00, 0x04},
163    {0x59, 0x9a1b, 0x0000, 0x00, 0x04, 0x00},
164    {0x5A, 0x021b, 0x0014, 0x01, 0x04, 0x3f},
165    {0x5B, 0x0a1d, 0x0014, 0x01, 0x04, 0x3f},
166    {0x5d, 0x0a1d, 0x0305, 0x05, 0x07, 0x05},
167    {0x62, 0x0a3f, 0x0306, 0x06, 0x05, 0x06},
168    {0x63, 0x2a3f, 0x0407, 0x07, 0x07, 0x0e},
169    {0x64, 0x0a7f, 0x0508, 0x08, 0x00, 0x16},
170    {0x65, 0x0eff, 0x0609, 0x09, 0x00, 0x1e},
171    {0x66, 0x0eff, 0x070a, 0x0a, 0x00, 0x22}, /* mode 1600x1200
172                           add CRT2MODE */
173    {0x68, 0x067b, 0x080b, 0x0b, 0x00, 0x29},
174    {0x69, 0x06fd, 0x080b, 0x0b, 0x00, 0x29},
175    {0x6b, 0x07ff, 0x080b, 0x0b, 0x00, 0x29},
176    {0x6c, 0x067b, 0x090c, 0x0c, 0x00, 0x2f},
177    {0x6d, 0x06fd, 0x090c, 0x0c, 0x00, 0x2f},
178    {0x6e, 0x07ff, 0x090c, 0x0c, 0x00, 0x2f},
179    {0x70, 0x2a1b, 0x0410, 0x10, 0x07, 0x34},
180    {0x71, 0x0a1b, 0x0511, 0x11, 0x00, 0x37},
181    {0x74, 0x0a1d, 0x0511, 0x11, 0x00, 0x37},
182    {0x75, 0x0a3d, 0x0612, 0x12, 0x00, 0x3a},
183    {0x76, 0x2a1f, 0x0410, 0x10, 0x07, 0x34},
184    {0x77, 0x0a1f, 0x0511, 0x11, 0x00, 0x37},
185    {0x78, 0x0a3f, 0x0612, 0x12, 0x00, 0x3a},
186    {0x79, 0x0a3b, 0x0612, 0x12, 0x00, 0x3a},
187    {0x7a, 0x2a1d, 0x0410, 0x10, 0x07, 0x34},
188    {0x7b, 0x0e3b, 0x060f, 0x0f, 0x00, 0x1d},
189    {0x7c, 0x0e7d, 0x060f, 0x0f, 0x00, 0x1d},
190    {0x7d, 0x0eff, 0x060f, 0x0f, 0x00, 0x1d},
191    {0x20, 0x0e3b, 0x0D16, 0x16, 0x00, 0x43},
192    {0x21, 0x0e7d, 0x0D16, 0x16, 0x00, 0x43},
193    {0x22, 0x0eff, 0x0D16, 0x16, 0x00, 0x43},
194    {0x23, 0x0e3b, 0x0614, 0x14, 0x00, 0x41},
195    {0x24, 0x0e7d, 0x0614, 0x14, 0x00, 0x41},
196    {0x25, 0x0eff, 0x0614, 0x14, 0x00, 0x41},
197    {0x26, 0x063b, 0x0c15, 0x15, 0x00, 0x42},
198    {0x27, 0x067d, 0x0c15, 0x15, 0x00, 0x42},
199    {0x28, 0x06ff, 0x0c15, 0x15, 0x00, 0x42},
200    {0xff, 0x0000, 0x0000, 0x00, 0x00, 0x00}
201};
202
203static struct SiS_StandTable_S XGI330_StandTable = {
204/* ExtVGATable */
205    0x00, 0x00, 0x00, 0x0000,
206    {0x01, 0x0f, 0x00, 0x0e},
207     0x23,
208    {0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e,
209     0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
210     0xea, 0x8c, 0xdf, 0x28, 0x40, 0xe7, 0x04, 0xa3,
211     0xff},
212    {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
213     0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
214     0x01, 0x00, 0x00, 0x00},
215    {0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f,
216     0xff}
217};
218
219static struct XGI_TimingHStruct XGI_TimingH[1];
220
221static struct XGI_TimingVStruct XGI_TimingV[1];
222
223static struct XGI_XG21CRT1Struct XGI_UpdateCRT1Table[] = {
224    {0x01, 0x27, 0x91, 0x8f, 0xc0}, /* 00 */
225    {0x03, 0x4f, 0x83, 0x8f, 0xc0}, /* 01 */
226    {0x05, 0x27, 0x91, 0x8f, 0xc0}, /* 02 */
227    {0x06, 0x4f, 0x83, 0x8f, 0xc0}, /* 03 */
228    {0x07, 0x4f, 0x83, 0x8f, 0xc0}, /* 04 */
229    {0x0d, 0x27, 0x91, 0x8f, 0xc0}, /* 05 */
230    {0x0e, 0x4f, 0x83, 0x8f, 0xc0}, /* 06 */
231    {0x0f, 0x4f, 0x83, 0x5d, 0xc0}, /* 07 */
232    {0x10, 0x4f, 0x83, 0x5d, 0xc0}, /* 08 */
233    {0x11, 0x4f, 0x83, 0xdf, 0x0c}, /* 09 */
234    {0x12, 0x4f, 0x83, 0xdf, 0x0c}, /* 10 */
235    {0x13, 0x4f, 0x83, 0x8f, 0xc0}, /* 11 */
236    {0x2e, 0x4f, 0x83, 0xdf, 0x0c}, /* 12 */
237    {0x2e, 0x4f, 0x87, 0xdf, 0xc0}, /* 13 */
238    {0x2f, 0x4f, 0x83, 0x8f, 0xc0}, /* 14 */
239    {0x50, 0x27, 0x91, 0xdf, 0x0c}, /* 15 */
240    {0x59, 0x27, 0x91, 0x8f, 0xc0} /* 16 */
241};
242
243static struct XGI_CRT1TableStruct XGI_CRT1Table[] = {
244    { {0x2d, 0x28, 0x90, 0x2c, 0x90, 0x00, 0x04, 0x00,
245      0xbf, 0x1f, 0x9c, 0x8e, 0x96, 0xb9, 0x30} }, /* 0x0 */
246    { {0x2d, 0x28, 0x90, 0x2c, 0x90, 0x00, 0x04, 0x00,
247      0x0b, 0x3e, 0xe9, 0x8b, 0xe7, 0x04, 0x00} }, /* 0x1 */
248    { {0x3D, 0x31, 0x81, 0x37, 0x1F, 0x00, 0x05, 0x00,
249      0x72, 0xF0, 0x58, 0x8C, 0x57, 0x73, 0xA0} }, /* 0x2 */
250    { {0x4F, 0x3F, 0x93, 0x45, 0x0D, 0x00, 0x01, 0x00,
251      0x24, 0xF5, 0x02, 0x88, 0xFF, 0x25, 0x90} }, /* 0x3 */
252    { {0x5F, 0x50, 0x82, 0x55, 0x81, 0x00, 0x05, 0x00,
253      0xBF, 0x1F, 0x9C, 0x8E, 0x96, 0xB9, 0x30} }, /* 0x4 */
254    { {0x5F, 0x50, 0x82, 0x55, 0x81, 0x00, 0x05, 0x00,
255      0x0B, 0x3E, 0xE9, 0x8B, 0xE7, 0x04, 0x00} }, /* 0x5 */
256    { {0x63, 0x50, 0x86, 0x56, 0x9B, 0x00, 0x01, 0x00,
257      0x06, 0x3E, 0xE8, 0x8B, 0xE7, 0xFF, 0x10} }, /* 0x6 */
258    { {0x64, 0x4F, 0x88, 0x55, 0x9D, 0x00, 0x01, 0x00,
259      0xF2, 0x1F, 0xE0, 0x83, 0xDF, 0xF3, 0x10} }, /* 0x7 */
260    { {0x63, 0x4F, 0x87, 0x5A, 0x81, 0x00, 0x05, 0x00,
261      0xFB, 0x1F, 0xE0, 0x83, 0xDF, 0xFC, 0x10} }, /* 0x8 */
262    { {0x65, 0x4F, 0x89, 0x58, 0x80, 0x00, 0x05, 0x60,
263      0xFB, 0x1F, 0xE0, 0x83, 0xDF, 0xFC, 0x80} }, /* 0x9 */
264    { {0x65, 0x4F, 0x89, 0x58, 0x80, 0x00, 0x05, 0x60,
265      0x01, 0x3E, 0xE0, 0x83, 0xDF, 0x02, 0x80} }, /* 0xa */
266    { {0x67, 0x4F, 0x8B, 0x58, 0x81, 0x00, 0x05, 0x60,
267      0x0D, 0x3E, 0xE0, 0x83, 0xDF, 0x0E, 0x90} }, /* 0xb */
268    { {0x65, 0x4F, 0x89, 0x57, 0x9F, 0x00, 0x01, 0x00,
269      0xFB, 0x1F, 0xE6, 0x8A, 0xDF, 0xFC, 0x10} }, /* 0xc */
270    { {0x7B, 0x63, 0x9F, 0x6A, 0x93, 0x00, 0x05, 0x00, /* ;
271                        0D (800x600,56Hz) */
272      0x6F, 0xF0, 0x58, 0x8A, 0x57, 0x70, 0xA0} }, /* ;
273                        (VCLK 36.0MHz) */
274    { {0x7F, 0x63, 0x83, 0x6C, 0x1C, 0x00, 0x06, 0x00, /* ;
275                        0E (800x600,60Hz) */
276      0x72, 0xF0, 0x58, 0x8C, 0x57, 0x73, 0xA0} }, /* ;
277                        (VCLK 40.0MHz) */
278    { {0x7D, 0x63, 0x81, 0x6E, 0x1D, 0x00, 0x06, 0x00, /* ;
279                        0F (800x600,72Hz) */
280      0x98, 0xF0, 0x7C, 0x82, 0x57, 0x99, 0x80} }, /* ;
281                        (VCLK 50.0MHz) */
282    { {0x7F, 0x63, 0x83, 0x69, 0x13, 0x00, 0x06, 0x00, /* ;
283                        10 (800x600,75Hz) */
284      0x6F, 0xF0, 0x58, 0x8B, 0x57, 0x70, 0xA0} }, /* ;
285                        (VCLK 49.5MHz) */
286    { {0x7E, 0x63, 0x82, 0x6B, 0x13, 0x00, 0x06, 0x00, /* ;
287                        11 (800x600,85Hz) */
288      0x75, 0xF0, 0x58, 0x8B, 0x57, 0x76, 0xA0} }, /* ;
289                        (VCLK 56.25MHz) */
290    { {0x81, 0x63, 0x85, 0x6D, 0x18, 0x00, 0x06, 0x60, /* ;
291                        12 (800x600,100Hz) */
292      0x7A, 0xF0, 0x58, 0x8B, 0x57, 0x7B, 0xA0} }, /* ;
293                        (VCLK 75.8MHz) */
294    { {0x83, 0x63, 0x87, 0x6E, 0x19, 0x00, 0x06, 0x60, /* ;
295                        13 (800x600,120Hz) */
296      0x81, 0xF0, 0x58, 0x8B, 0x57, 0x82, 0xA0} }, /* ;
297                        (VCLK 79.411MHz) */
298    { {0x85, 0x63, 0x89, 0x6F, 0x1A, 0x00, 0x06, 0x60, /* ;
299                        14 (800x600,160Hz) */
300      0x91, 0xF0, 0x58, 0x8B, 0x57, 0x92, 0xA0} }, /* ;
301                        (VCLK 105.822MHz) */
302    { {0x99, 0x7F, 0x9D, 0x84, 0x1A, 0x00, 0x02, 0x00,
303      0x96, 0x1F, 0x7F, 0x83, 0x7F, 0x97, 0x10} }, /* 0x15 */
304    { {0xA3, 0x7F, 0x87, 0x86, 0x97, 0x00, 0x02, 0x00,
305      0x24, 0xF5, 0x02, 0x88, 0xFF, 0x25, 0x90} }, /* 0x16 */
306    { {0xA1, 0x7F, 0x85, 0x86, 0x97, 0x00, 0x02, 0x00,
307      0x24, 0xF5, 0x02, 0x88, 0xFF, 0x25, 0x90} }, /* 0x17 */
308    { {0x9F, 0x7F, 0x83, 0x85, 0x91, 0x00, 0x02, 0x00,
309      0x1E, 0xF5, 0x00, 0x83, 0xFF, 0x1F, 0x90} }, /* 0x18 */
310    { {0xA7, 0x7F, 0x8B, 0x89, 0x95, 0x00, 0x02, 0x00,
311      0x26, 0xF5, 0x00, 0x83, 0xFF, 0x27, 0x90} }, /* 0x19 */
312    { {0xA9, 0x7F, 0x8D, 0x8C, 0x9A, 0x00, 0x02, 0x62,
313      0x2C, 0xF5, 0x00, 0x83, 0xFF, 0x2D, 0x14} }, /* 0x1a */
314    { {0xAB, 0x7F, 0x8F, 0x8D, 0x9B, 0x00, 0x02, 0x62,
315      0x35, 0xF5, 0x00, 0x83, 0xFF, 0x36, 0x14} }, /* 0x1b */
316    { {0xCF, 0x9F, 0x93, 0xB2, 0x01, 0x00, 0x03, 0x00,
317      0x14, 0xBA, 0x00, 0x83, 0xFF, 0x15, 0x00} }, /* 0x1c */
318    { {0xCE, 0x9F, 0x92, 0xA9, 0x17, 0x00, 0x07, 0x00,
319      0x28, 0x5A, 0x00, 0x83, 0xFF, 0x29, 0x89} }, /* 0x1d */
320    { {0xCE, 0x9F, 0x92, 0xA5, 0x17, 0x00, 0x07, 0x00,
321      0x28, 0x5A, 0x00, 0x83, 0xFF, 0x29, 0x89} }, /* 0x1e */
322    { {0xD3, 0x9F, 0x97, 0xAB, 0x1F, 0x00, 0x07, 0x00,
323      0x2E, 0x5A, 0x00, 0x83, 0xFF, 0x2F, 0x89} }, /* 0x1f */
324    { {0x09, 0xC7, 0x8D, 0xD3, 0x0B, 0x01, 0x04, 0x00,
325      0xE0, 0x10, 0xB0, 0x83, 0xAF, 0xE1, 0x2F} }, /* 0x20 */
326    { {0x09, 0xC7, 0x8D, 0xD3, 0x0B, 0x01, 0x04, 0x00,
327      0xE0, 0x10, 0xB0, 0x83, 0xAF, 0xE1, 0x2F} }, /* 0x21 */
328    { {0x09, 0xC7, 0x8D, 0xD3, 0x0B, 0x01, 0x04, 0x00,
329      0xE0, 0x10, 0xB0, 0x83, 0xAF, 0xE1, 0x2F} }, /* 0x22 */
330    { {0x09, 0xC7, 0x8D, 0xD3, 0x0B, 0x01, 0x04, 0x00,
331      0xE0, 0x10, 0xB0, 0x83, 0xAF, 0xE1, 0x2F} }, /* 0x23 */
332    { {0x09, 0xC7, 0x8D, 0xD3, 0x0B, 0x01, 0x04, 0x00,
333      0xE0, 0x10, 0xB0, 0x83, 0xAF, 0xE1, 0x2F} }, /* 0x24 */
334    { {0x09, 0xC7, 0x8D, 0xD3, 0x0B, 0x01, 0x04, 0x00,
335      0xE0, 0x10, 0xB0, 0x83, 0xAF, 0xE1, 0x2F} }, /* 0x25 */
336    { {0x09, 0xC7, 0x8D, 0xD3, 0x0B, 0x01, 0x04, 0x00,
337      0xE0, 0x10, 0xB0, 0x83, 0xAF, 0xE1, 0x2F} }, /* 0x26 */
338    { {0x40, 0xEF, 0x84, 0x03, 0x1D, 0x41, 0x01, 0x00,
339      0xDA, 0x1F, 0xA0, 0x83, 0x9F, 0xDB, 0x1F} }, /* 0x27 */
340    { {0x43, 0xEF, 0x87, 0x06, 0x00, 0x41, 0x05, 0x62,
341      0xD4, 0x1F, 0xA0, 0x83, 0x9F, 0xD5, 0x9F} }, /* 0x28 */
342    { {0x45, 0xEF, 0x89, 0x07, 0x01, 0x41, 0x05, 0x62,
343      0xD9, 0x1F, 0xA0, 0x83, 0x9F, 0xDA, 0x9F} }, /* 0x29 */
344    { {0x40, 0xEF, 0x84, 0x03, 0x1D, 0x41, 0x01, 0x00,
345      0xDA, 0x1F, 0xA0, 0x83, 0x9F, 0xDB, 0x1F} }, /* 0x2a */
346    { {0x40, 0xEF, 0x84, 0x03, 0x1D, 0x41, 0x01, 0x00,
347      0xDA, 0x1F, 0xA0, 0x83, 0x9F, 0xDB, 0x1F} }, /* 0x2b */
348    { {0x40, 0xEF, 0x84, 0x03, 0x1D, 0x41, 0x01, 0x00,
349      0xDA, 0x1F, 0xA0, 0x83, 0x9F, 0xDB, 0x1F} }, /* 0x2c */
350    { {0x59, 0xFF, 0x9D, 0x17, 0x13, 0x41, 0x05, 0x44,
351      0x33, 0xBA, 0x00, 0x83, 0xFF, 0x34, 0x0F} }, /* 0x2d */
352    { {0x5B, 0xFF, 0x9F, 0x18, 0x14, 0x41, 0x05, 0x44,
353      0x38, 0xBA, 0x00, 0x83, 0xFF, 0x39, 0x0F} }, /* 0x2e */
354    { {0x5B, 0xFF, 0x9F, 0x18, 0x14, 0x41, 0x05, 0x44,
355      0x3D, 0xBA, 0x00, 0x83, 0xFF, 0x3E, 0x0F} }, /* 0x2f */
356    { {0x5D, 0xFF, 0x81, 0x19, 0x95, 0x41, 0x05, 0x44,
357      0x41, 0xBA, 0x00, 0x84, 0xFF, 0x42, 0x0F} }, /* 0x30 */
358    { {0x55, 0xFF, 0x99, 0x0D, 0x0C, 0x41, 0x05, 0x00,
359      0x3E, 0xBA, 0x00, 0x84, 0xFF, 0x3F, 0x0F} }, /* 0x31 */
360    { {0x7F, 0x63, 0x83, 0x6C, 0x1C, 0x00, 0x06, 0x00,
361      0x72, 0xBA, 0x27, 0x8B, 0xDF, 0x73, 0x80} }, /* 0x32 */
362    { {0x7F, 0x63, 0x83, 0x69, 0x13, 0x00, 0x06, 0x00,
363      0x6F, 0xBA, 0x26, 0x89, 0xDF, 0x6F, 0x80} }, /* 0x33 */
364    { {0x7F, 0x63, 0x82, 0x6B, 0x13, 0x00, 0x06, 0x00,
365      0x75, 0xBA, 0x29, 0x8C, 0xDF, 0x75, 0x80} }, /* 0x34 */
366    { {0xA3, 0x7F, 0x87, 0x86, 0x97, 0x00, 0x02, 0x00,
367      0x24, 0xF1, 0xAF, 0x85, 0x3F, 0x25, 0xB0} }, /* 0x35 */
368    { {0x9F, 0x7F, 0x83, 0x85, 0x91, 0x00, 0x02, 0x00,
369      0x1E, 0xF1, 0xAD, 0x81, 0x3F, 0x1F, 0xB0} }, /* 0x36 */
370    { {0xA7, 0x7F, 0x88, 0x89, 0x15, 0x00, 0x02, 0x00,
371      0x26, 0xF1, 0xB1, 0x85, 0x3F, 0x27, 0xB0} }, /* 0x37 */
372    { {0xCE, 0x9F, 0x92, 0xA9, 0x17, 0x00, 0x07, 0x00,
373      0x28, 0xC4, 0x7A, 0x8E, 0xCF, 0x29, 0xA1} }, /* 0x38 */
374    { {0xCE, 0x9F, 0x92, 0xA5, 0x17, 0x00, 0x07, 0x00,
375      0x28, 0xD4, 0x7A, 0x8E, 0xCF, 0x29, 0xA1} }, /* 0x39 */
376    { {0xD3, 0x9F, 0x97, 0xAB, 0x1F, 0x00, 0x07, 0x00,
377      0x2E, 0xD4, 0x7D, 0x81, 0xCF, 0x2F, 0xA1} }, /* 0x3a */
378    { {0xDC, 0x9F, 0x00, 0xAB, 0x19, 0x00, 0x07, 0x00,
379      0xE6, 0xEF, 0xC0, 0xC3, 0xBF, 0xE7, 0x90} }, /* 0x3b */
380    { {0x6B, 0x59, 0x8F, 0x5E, 0x8C, 0x00, 0x05, 0x00,
381      0x0B, 0x3E, 0xE9, 0x8B, 0xE7, 0x04, 0x00} }, /* 0x3c */
382    { {0x7B, 0x63, 0x9F, 0x6A, 0x93, 0x00, 0x05, 0x00,
383      0x6F, 0xF0, 0x58, 0x8A, 0x57, 0x70, 0xA0} }, /* 0x3d */
384    { {0x86, 0x6A, 0x8a, 0x74, 0x06, 0x00, 0x02, 0x00,
385      0x8c, 0x15, 0x4f, 0x83, 0xef, 0x8d, 0x30} }, /* 0x3e */
386    { {0x81, 0x6A, 0x85, 0x70, 0x00, 0x00, 0x02, 0x00,
387      0x0f, 0x3e, 0xeb, 0x8e, 0xdf, 0x10, 0x00} }, /* 0x3f */
388    { {0xCE, 0x9F, 0x92, 0xA9, 0x17, 0x00, 0x07, 0x00,
389      0x20, 0xF5, 0x03, 0x88, 0xFF, 0x21, 0x90} }, /* 0x40 */
390    { {0xE6, 0xAE, 0x8A, 0xBD, 0x90, 0x00, 0x03, 0x00,
391      0x3D, 0x10, 0x1A, 0x8D, 0x19, 0x3E, 0x2F} }, /* 0x41 */
392    { {0xB9, 0x8F, 0x9D, 0x9B, 0x8A, 0x00, 0x06, 0x00,
393      0x7D, 0xFF, 0x60, 0x83, 0x5F, 0x7E, 0x90} }, /* 0x42 */
394    { {0xC3, 0x8F, 0x87, 0x9B, 0x0B, 0x00, 0x07, 0x00,
395      0x82, 0xFF, 0x60, 0x83, 0x5F, 0x83, 0x90} }, /* 0x43 */
396    { {0xAD, 0x7F, 0x91, 0x8E, 0x9C, 0x00, 0x02, 0x82,
397      0x49, 0xF5, 0x00, 0x83, 0xFF, 0x4A, 0x90} }, /* 0x44 */
398    { {0xCD, 0x9F, 0x91, 0xA7, 0x19, 0x00, 0x07, 0x60,
399      0xE6, 0xFF, 0xC0, 0x83, 0xBF, 0xE7, 0x90} }, /* 0x45 */
400    { {0xD3, 0x9F, 0x97, 0xAB, 0x1F, 0x00, 0x07, 0x60,
401      0xF1, 0xFF, 0xC0, 0x83, 0xBF, 0xF2, 0x90} }, /* 0x46 */
402    { {0xD7, 0x9F, 0x9B, 0xAC, 0x1E, 0x00, 0x07, 0x00,
403      0x03, 0xDE, 0xC0, 0x84, 0xBF, 0x04, 0x90} } /* 0x47 */
404};
405
406static unsigned char XGI_CH7017LV1024x768[] = {
407    0x60, 0x02, 0x00, 0x07, 0x40, 0xED,
408    0xA3, 0xC8, 0xC7, 0xAC, 0xE0, 0x02};
409static unsigned char XGI_CH7017LV1400x1050[] = {
410    0x60, 0x03, 0x11, 0x00, 0x40, 0xE3,
411    0xAD, 0xDB, 0xF6, 0xAC, 0xE0, 0x02};
412
413/*add for new UNIVGABIOS*/
414static struct SiS_LCDData XGI_StLCD1024x768Data[] = {
415    {62, 25, 800, 546, 1344, 806},
416    {32, 15, 930, 546, 1344, 806},
417    {62, 25, 800, 546, 1344, 806}, /*chiawenfordot9->dot8*/
418    {104, 45, 945, 496, 1344, 806},
419    {62, 25, 800, 546, 1344, 806},
420    {31, 18, 1008, 624, 1344, 806},
421    {1, 1, 1344, 806, 1344, 806}
422};
423
424static struct SiS_LCDData XGI_ExtLCD1024x768Data[] = {
425    {42, 25, 1536, 419, 1344, 806},
426    {48, 25, 1536, 369, 1344, 806},
427    {42, 25, 1536, 419, 1344, 806},
428    {48, 25, 1536, 369, 1344, 806},
429    {12, 5, 896, 500, 1344, 806},
430    {42, 25, 1024, 625, 1344, 806},
431    {1, 1, 1344, 806, 1344, 806},
432    {12, 5, 896, 500, 1344, 806},
433    {42, 25, 1024, 625, 1344, 806},
434    {1, 1, 1344, 806, 1344, 806},
435    {12, 5, 896, 500, 1344, 806},
436    {42, 25, 1024, 625, 1344, 806},
437    {1, 1, 1344, 806, 1344, 806}
438};
439
440static struct SiS_LCDData XGI_CetLCD1024x768Data[] = {
441    {1, 1, 1344, 806, 1344, 806}, /* ; 00 (320x200,320x400,
442                           640x200,640x400) */
443    {1, 1, 1344, 806, 1344, 806}, /* 01 (320x350,640x350) */
444    {1, 1, 1344, 806, 1344, 806}, /* 02 (360x400,720x400) */
445    {1, 1, 1344, 806, 1344, 806}, /* 03 (720x350) */
446    {1, 1, 1344, 806, 1344, 806}, /* 04 (640x480x60Hz) */
447    {1, 1, 1344, 806, 1344, 806}, /* 05 (800x600x60Hz) */
448    {1, 1, 1344, 806, 1344, 806} /* 06 (1024x768x60Hz) */
449};
450
451static struct SiS_LCDData XGI_StLCD1280x1024Data[] = {
452    {22, 5, 800, 510, 1650, 1088},
453    {22, 5, 800, 510, 1650, 1088},
454    {176, 45, 900, 510, 1650, 1088},
455    {176, 45, 900, 510, 1650, 1088},
456    {22, 5, 800, 510, 1650, 1088},
457    {13, 5, 1024, 675, 1560, 1152},
458    {16, 9, 1266, 804, 1688, 1072},
459    {1, 1, 1688, 1066, 1688, 1066}
460};
461
462static struct SiS_LCDData XGI_ExtLCD1280x1024Data[] = {
463    {211, 60, 1024, 501, 1688, 1066},
464    {211, 60, 1024, 508, 1688, 1066},
465    {211, 60, 1024, 501, 1688, 1066},
466    {211, 60, 1024, 508, 1688, 1066},
467    {211, 60, 1024, 500, 1688, 1066},
468    {211, 75, 1024, 625, 1688, 1066},
469    {211, 120, 1280, 798, 1688, 1066},
470    {1, 1, 1688, 1066, 1688, 1066}
471};
472
473static struct SiS_LCDData XGI_CetLCD1280x1024Data[] = {
474    {1, 1, 1688, 1066, 1688, 1066}, /* 00 (320x200,320x400,
475                           640x200,640x400) */
476    {1, 1, 1688, 1066, 1688, 1066}, /* 01 (320x350,640x350) */
477    {1, 1, 1688, 1066, 1688, 1066}, /* 02 (360x400,720x400) */
478    {1, 1, 1688, 1066, 1688, 1066}, /* 03 (720x350) */
479    {1, 1, 1688, 1066, 1688, 1066}, /* 04 (640x480x60Hz) */
480    {1, 1, 1688, 1066, 1688, 1066}, /* 05 (800x600x60Hz) */
481    {1, 1, 1688, 1066, 1688, 1066}, /* 06 (1024x768x60Hz) */
482    {1, 1, 1688, 1066, 1688, 1066}, /* 07 (1280x1024x60Hz) */
483    {1, 1, 1688, 1066, 1688, 1066} /* 08 (1400x1050x60Hz) */
484};
485
486static struct SiS_LCDData xgifb_lcd_1400x1050[] = {
487    {211, 100, 2100, 408, 1688, 1066}, /* 00 (320x200,320x400,
488                           640x200,640x400) */
489    {211, 64, 1536, 358, 1688, 1066}, /* 01 (320x350,640x350) */
490    {211, 100, 2100, 408, 1688, 1066}, /* 02 (360x400,720x400) */
491    {211, 64, 1536, 358, 1688, 1066}, /* 03 (720x350) */
492    {211, 48, 840, 488, 1688, 1066}, /* 04 (640x480x60Hz) */
493    {211, 72, 1008, 609, 1688, 1066}, /* 05 (800x600x60Hz) */
494    {211, 128, 1400, 776, 1688, 1066}, /* 06 (1024x768x60Hz) */
495    {1, 1, 1688, 1066, 1688, 1066}, /* 07 (1280x1024x60Hz
496                          w/o Scaling) */
497    {1, 1, 1688, 1066, 1688, 1066} /* 08 (1400x1050x60Hz) */
498};
499
500static struct SiS_LCDData XGI_ExtLCD1600x1200Data[] = {
501    {4, 1, 1620, 420, 2160, 1250}, /* 00 (320x200,320x400,
502                         640x200,640x400)*/
503    {27, 7, 1920, 375, 2160, 1250}, /* 01 (320x350,640x350) */
504    {4, 1, 1620, 420, 2160, 1250}, /* 02 (360x400,720x400)*/
505    {27, 7, 1920, 375, 2160, 1250}, /* 03 (720x350) */
506    {27, 4, 800, 500, 2160, 1250}, /* 04 (640x480x60Hz) */
507    {4, 1, 1080, 625, 2160, 1250}, /* 05 (800x600x60Hz) */
508    {5, 2, 1350, 800, 2160, 1250}, /* 06 (1024x768x60Hz) */
509    {27, 16, 1500, 1064, 2160, 1250}, /* 07 (1280x1024x60Hz) */
510    {9, 7, 1920, 1106, 2160, 1250}, /* 08 (1400x1050x60Hz) */
511    {1, 1, 2160, 1250, 2160, 1250} /* 09 (1600x1200x60Hz) ;302lv */
512};
513
514static struct SiS_LCDData XGI_StLCD1600x1200Data[] = {
515    {27, 4, 800, 500, 2160, 1250}, /* 00 (320x200,320x400,
516                          640x200,640x400) */
517    {27, 4, 800, 500, 2160, 1250}, /* 01 (320x350,640x350) */
518    {27, 4, 800, 500, 2160, 1250}, /* 02 (360x400,720x400) */
519    {27, 4, 800, 500, 2160, 1250}, /* 03 (720x350) */
520    {27, 4, 800, 500, 2160, 1250}, /* 04 (320x240,640x480) */
521    {4, 1, 1080, 625, 2160, 1250}, /* 05 (400x300,800x600) */
522    {5, 2, 1350, 800, 2160, 1250}, /* 06 (512x384,1024x768) */
523    {135, 88, 1600, 1100, 2160, 1250}, /* 07 (1280x1024) */
524    {1, 1, 1800, 1500, 2160, 1250}, /* 08 (1400x1050) */
525    {1, 1, 2160, 1250, 2160, 1250} /* 09 (1600x1200) */
526};
527
528static struct SiS_LCDData XGI_CetLCD1400x1050Data[] = {
529    {1, 1, 1688, 1066, 1688, 1066}, /* 00 (320x200,320x400,
530                           640x200,640x400) */
531    {1, 1, 1688, 1066, 1688, 1066}, /* 01 (320x350,640x350) */
532    {1, 1, 1688, 1066, 1688, 1066}, /* 02 (360x400,720x400) */
533    {1, 1, 1688, 1066, 1688, 1066}, /* 03 (720x350) */
534    {1, 1, 1688, 1066, 1688, 1066}, /* 04 (640x480x60Hz) */
535    {1, 1, 1688, 1066, 1688, 1066}, /* 05 (800x600x60Hz) */
536    {1, 1, 1688, 1066, 1688, 1066}, /* 06 (1024x768x60Hz) */
537    {1, 1, 1688, 1066, 1688, 1066}, /* 07 (1280x1024x60Hz) */
538    {1, 1, 1688, 1066, 1688, 1066} /* 08 (1400x1050x60Hz) */
539};
540
541static struct SiS_LCDData XGI_NoScalingData[] = {
542    {1, 1, 800, 449, 800, 449},
543    {1, 1, 800, 449, 800, 449},
544    {1, 1, 900, 449, 900, 449},
545    {1, 1, 900, 449, 900, 449},
546    {1, 1, 800, 525, 800, 525},
547    {1, 1, 1056, 628, 1056, 628},
548    {1, 1, 1344, 806, 1344, 806},
549    {1, 1, 1688, 1066, 1688, 1066}
550};
551
552static struct SiS_LCDData XGI_ExtLCD1024x768x75Data[] = {
553    {42, 25, 1536, 419, 1344, 806}, /* ; 00 (320x200,320x400,
554                         640x200,640x400) */
555    {48, 25, 1536, 369, 1344, 806}, /* ; 01 (320x350,640x350) */
556    {42, 25, 1536, 419, 1344, 806}, /* ; 02 (360x400,720x400) */
557    {48, 25, 1536, 369, 1344, 806}, /* ; 03 (720x350) */
558    {8, 5, 1312, 500, 1312, 800}, /* ; 04 (640x480x75Hz) */
559    {41, 25, 1024, 625, 1312, 800}, /* ; 05 (800x600x75Hz) */
560    {1, 1, 1312, 800, 1312, 800} /* ; 06 (1024x768x75Hz) */
561};
562
563static struct SiS_LCDData XGI_CetLCD1024x768x75Data[] = {
564    {1, 1, 1312, 800, 1312, 800}, /* ; 00 (320x200,320x400,
565                           640x200,640x400) */
566    {1, 1, 1312, 800, 1312, 800}, /* ; 01 (320x350,640x350) */
567    {1, 1, 1312, 800, 1312, 800}, /* ; 02 (360x400,720x400) */
568    {1, 1, 1312, 800, 1312, 800}, /* ; 03 (720x350) */
569    {1, 1, 1312, 800, 1312, 800}, /* ; 04 (640x480x75Hz) */
570    {1, 1, 1312, 800, 1312, 800}, /* ; 05 (800x600x75Hz) */
571    {1, 1, 1312, 800, 1312, 800} /* ; 06 (1024x768x75Hz) */
572};
573
574static struct SiS_LCDData xgifb_lcd_1280x1024x75[] = {
575    {211, 60, 1024, 501, 1688, 1066}, /* ; 00 (320x200,320x400,
576                             640x200,640x400) */
577    {211, 60, 1024, 508, 1688, 1066}, /* ; 01 (320x350,640x350) */
578    {211, 60, 1024, 501, 1688, 1066}, /* ; 02 (360x400,720x400) */
579    {211, 60, 1024, 508, 1688, 1066}, /* ; 03 (720x350) */
580    {211, 45, 768, 498, 1688, 1066}, /* ; 04 (640x480x75Hz) */
581    {211, 75, 1024, 625, 1688, 1066}, /* ; 05 (800x600x75Hz) */
582    {211, 120, 1280, 798, 1688, 1066}, /* ; 06 (1024x768x75Hz) */
583    {1, 1, 1688, 1066, 1688, 1066} /* ; 07 (1280x1024x75Hz) */
584};
585
586static struct SiS_LCDData XGI_CetLCD1280x1024x75Data[] = {
587    {1, 1, 1688, 1066, 1688, 1066}, /* ; 00 (320x200,320x400,
588                         640x200,640x400) */
589    {1, 1, 1688, 1066, 1688, 1066}, /* ; 01 (320x350,640x350) */
590    {1, 1, 1688, 1066, 1688, 1066}, /* ; 02 (360x400,720x400) */
591    {1, 1, 1688, 1066, 1688, 1066}, /* ; 03 (720x350) */
592    {1, 1, 1688, 1066, 1688, 1066}, /* ; 04 (640x480x75Hz) */
593    {1, 1, 1688, 1066, 1688, 1066}, /* ; 05 (800x600x75Hz) */
594    {1, 1, 1688, 1066, 1688, 1066}, /* ; 06 (1024x768x75Hz) */
595    {1, 1, 1688, 1066, 1688, 1066} /* ; 07 (1280x1024x75Hz) */
596};
597
598static struct SiS_LCDData XGI_NoScalingDatax75[] = {
599    {1, 1, 800, 449, 800, 449}, /* ; 00 (320x200, 320x400,
600                         640x200, 640x400) */
601    {1, 1, 800, 449, 800, 449}, /* ; 01 (320x350, 640x350) */
602    {1, 1, 900, 449, 900, 449}, /* ; 02 (360x400, 720x400) */
603    {1, 1, 900, 449, 900, 449}, /* ; 03 (720x350) */
604    {1, 1, 840, 500, 840, 500}, /* ; 04 (640x480x75Hz) */
605    {1, 1, 1056, 625, 1056, 625}, /* ; 05 (800x600x75Hz) */
606    {1, 1, 1312, 800, 1312, 800}, /* ; 06 (1024x768x75Hz) */
607    {1, 1, 1688, 1066, 1688, 1066}, /* ; 07 (1280x1024x75Hz) */
608    {1, 1, 1688, 1066, 1688, 1066}, /* ; 08 (1400x1050x75Hz)*/
609    {1, 1, 2160, 1250, 2160, 1250}, /* ; 09 (1600x1200x75Hz) */
610    {1, 1, 1688, 806, 1688, 806} /* ; 0A (1280x768x75Hz) */
611};
612
613static struct XGI_LCDDesStruct XGI_ExtLCDDes1024x768Data[] = {
614    {9, 1057, 0, 771}, /* ; 00 (320x200,320x400,640x200,640x400) */
615    {9, 1057, 0, 771}, /* ; 01 (320x350,640x350) */
616    {9, 1057, 0, 771}, /* ; 02 (360x400,720x400) */
617    {9, 1057, 0, 771}, /* ; 03 (720x350) */
618    {9, 1057, 0, 771}, /* ; 04 (640x480x60Hz) */
619    {9, 1057, 0, 771}, /* ; 05 (800x600x60Hz) */
620    {9, 1057, 805, 770} /* ; 06 (1024x768x60Hz) */
621};
622
623static struct XGI_LCDDesStruct XGI_StLCDDes1024x768Data[] = {
624    {9, 1057, 737, 703}, /* ; 00 (320x200,320x400,640x200,640x400) */
625    {9, 1057, 686, 651}, /* ; 01 (320x350,640x350) */
626    {9, 1057, 737, 703}, /* ; 02 (360x400,720x400) */
627    {9, 1057, 686, 651}, /* ; 03 (720x350) */
628    {9, 1057, 776, 741}, /* ; 04 (640x480x60Hz) */
629    {9, 1057, 0, 771}, /* ; 05 (800x600x60Hz) */
630    {9, 1057, 805, 770} /* ; 06 (1024x768x60Hz) */
631};
632
633static struct XGI_LCDDesStruct XGI_CetLCDDes1024x768Data[] = {
634    {1152, 856, 622, 587}, /* ; 00 (320x200,320x400,640x200,640x400) */
635    {1152, 856, 597, 562}, /* ; 01 (320x350,640x350) */
636    {1152, 856, 622, 587}, /* ; 02 (360x400,720x400) */
637    {1152, 856, 597, 562}, /* ; 03 (720x350) */
638    {1152, 856, 662, 627}, /* ; 04 (640x480x60Hz) */
639    {1232, 936, 722, 687}, /* ; 05 (800x600x60Hz) */
640    {0, 1048, 805, 770} /* ; 06 (1024x768x60Hz) */
641};
642
643static struct XGI_LCDDesStruct XGI_ExtLCDDLDes1280x1024Data[] = {
644    {18, 1346, 981, 940}, /* 00 (320x200,320x400,640x200,640x400) */
645    {18, 1346, 926, 865}, /* 01 (320x350,640x350) */
646    {18, 1346, 981, 940}, /* 02 (360x400,720x400) */
647    {18, 1346, 926, 865}, /* 03 (720x350) */
648    {18, 1346, 0, 1025}, /* 04 (640x480x60Hz) */
649    {18, 1346, 0, 1025}, /* 05 (800x600x60Hz) */
650    {18, 1346, 1065, 1024}, /* 06 (1024x768x60Hz) */
651    {18, 1346, 1065, 1024} /* 07 (1280x1024x60Hz) */
652};
653
654static struct XGI_LCDDesStruct XGI_StLCDDLDes1280x1024Data[] = {
655    {18, 1346, 970, 907}, /* 00 (320x200,320x400,640x200,640x400) */
656    {18, 1346, 917, 854}, /* 01 (320x350,640x350) */
657    {18, 1346, 970, 907}, /* 02 (360x400,720x400) */
658    {18, 1346, 917, 854}, /* 03 (720x350) */
659    {18, 1346, 0, 1025}, /* 04 (640x480x60Hz) */
660    {18, 1346, 0, 1025}, /* 05 (800x600x60Hz) */
661    {18, 1346, 1065, 1024}, /* 06 (1024x768x60Hz) */
662    {18, 1346, 1065, 1024} /* 07 (1280x1024x60Hz) */
663};
664
665static struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024Data[] = {
666    {1368, 1008, 752, 711}, /* 00 (320x200,320x400,640x200,640x400) */
667    {1368, 1008, 729, 688}, /* 01 (320x350,640x350) */
668    {1368, 1008, 752, 711}, /* 02 (360x400,720x400) */
669    {1368, 1008, 729, 688}, /* 03 (720x350) */
670    {1368, 1008, 794, 753}, /* 04 (640x480x60Hz) */
671    {1448, 1068, 854, 813}, /* 05 (800x600x60Hz) */
672    {1560, 1200, 938, 897}, /* 06 (1024x768x60Hz) */
673    {18, 1346, 1065, 1024} /* 07 (1280x1024x60Hz) */
674};
675
676static struct XGI_LCDDesStruct XGI_ExtLCDDes1280x1024Data[] = {
677    {9, 1337, 981, 940}, /* ; 00 (320x200,320x400,640x200,640x400) */
678    {9, 1337, 926, 884}, /* ; 01 (320x350,640x350) alan, 2003/09/30 */
679    {9, 1337, 981, 940}, /* ; 02 (360x400,720x400) */
680    {9, 1337, 926, 884}, /* ; 03 (720x350) alan, 2003/09/30 */
681    {9, 1337, 0, 1025}, /* ; 04 (640x480x60Hz) */
682    {9, 1337, 0, 1025}, /* ; 05 (800x600x60Hz) */
683    {9, 1337, 1065, 1024}, /* ; 06 (1024x768x60Hz) */
684    {9, 1337, 1065, 1024} /* ; 07 (1280x1024x60Hz) */
685};
686
687static struct XGI_LCDDesStruct XGI_StLCDDes1280x1024Data[] = {
688    {9, 1337, 970, 907}, /* ; 00 (320x200,320x400,640x200,640x400) */
689    {9, 1337, 917, 854}, /* ; 01 (320x350,640x350) */
690    {9, 1337, 970, 907}, /* ; 02 (360x400,720x400) */
691    {9, 1337, 917, 854}, /* ; 03 (720x350) */
692    {9, 1337, 0, 1025}, /* ; 04 (640x480x60Hz) */
693    {9, 1337, 0, 1025}, /* ; 05 (800x600x60Hz) */
694    {9, 1337, 1065, 1024}, /* ; 06 (1024x768x60Hz) */
695    {9, 1337, 1065, 1024} /* ; 07 (1280x1024x60Hz) */
696};
697
698static struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024Data[] = {
699    {1368, 1008, 752, 711}, /* 00 (320x200,320x400,640x200,640x400) */
700    {1368, 1008, 729, 688}, /* 01 (320x350,640x350) */
701    {1368, 1008, 752, 711}, /* 02 (360x400,720x400) */
702    {1368, 1008, 729, 688}, /* 03 (720x350) */
703    {1368, 1008, 794, 753}, /* 04 (640x480x60Hz) */
704    {1448, 1068, 854, 813}, /* 05 (800x600x60Hz) */
705    {1560, 1200, 938, 897}, /* 06 (1024x768x60Hz) */
706    {9, 1337, 1065, 1024} /* 07 (1280x1024x60Hz) */
707};
708
709static struct XGI_LCDDesStruct xgifb_lcddldes_1400x1050[] = {
710    {18, 1464, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
711    {18, 1464, 0, 1051}, /* 01 (320x350,640x350) */
712    {18, 1464, 0, 1051}, /* 02 (360x400,720x400) */
713    {18, 1464, 0, 1051}, /* 03 (720x350) */
714    {18, 1464, 0, 1051}, /* 04 (640x480x60Hz) */
715    {18, 1464, 0, 1051}, /* 05 (800x600x60Hz) */
716    {18, 1464, 0, 1051}, /* 06 (1024x768x60Hz) */
717    {1646, 1406, 1053, 1038}, /* 07 (1280x1024x60Hz) */
718    {18, 1464, 0, 1051} /* 08 (1400x1050x60Hz) */
719};
720
721static struct XGI_LCDDesStruct xgifb_lcddes_1400x1050[] = {
722    {9, 1455, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
723    {9, 1455, 0, 1051}, /* 01 (320x350,640x350) */
724    {9, 1455, 0, 1051}, /* 02 (360x400,720x400) */
725    {9, 1455, 0, 1051}, /* 03 (720x350) */
726    {9, 1455, 0, 1051}, /* 04 (640x480x60Hz) */
727    {9, 1455, 0, 1051}, /* 05 (800x600x60Hz) */
728    {9, 1455, 0, 1051}, /* 06 (1024x768x60Hz) */
729    {1637, 1397, 1053, 1038}, /* 07 (1280x1024x60Hz) */
730    {9, 1455, 0, 1051} /* 08 (1400x1050x60Hz) */
731};
732
733static struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data[] = {
734    {1308, 1068, 781, 766}, /* 00 (320x200,320x400,640x200,640x400) */
735    {1308, 1068, 781, 766}, /* 01 (320x350,640x350) */
736    {1308, 1068, 781, 766}, /* 02 (360x400,720x400) */
737    {1308, 1068, 781, 766}, /* 03 (720x350) */
738    {1308, 1068, 781, 766}, /* 04 (640x480x60Hz) */
739    {1388, 1148, 841, 826}, /* 05 (800x600x60Hz) */
740    {1490, 1250, 925, 910}, /* 06 (1024x768x60Hz) */
741    {1646, 1406, 1053, 1038}, /* 07 (1280x1024x60Hz) */
742    {18, 1464, 0, 1051} /* 08 (1400x1050x60Hz) */
743};
744
745static struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data2[] = {
746    {0, 1448, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
747    {0, 1448, 0, 1051}, /* 01 (320x350,640x350) */
748    {0, 1448, 0, 1051}, /* 02 (360x400,720x400) */
749    {0, 1448, 0, 1051}, /* 03 (720x350) */
750    {0, 1448, 0, 1051} /* 04 (640x480x60Hz) */
751};
752
753static struct XGI_LCDDesStruct XGI_ExtLCDDLDes1600x1200Data[] = {
754    {18, 1682, 0, 1201}, /* 00 (320x200,320x400,640x200,640x400) */
755    {18, 1682, 0, 1201}, /* 01 (320x350,640x350) */
756    {18, 1682, 0, 1201}, /* 02 (360x400,720x400) */
757    {18, 1682, 0, 1201}, /* 03 (720x350) */
758    {18, 1682, 0, 1201}, /* 04 (640x480x60Hz) */
759    {18, 1682, 0, 1201}, /* 05 (800x600x60Hz) */
760    {18, 1682, 0, 1201}, /* 06 (1024x768x60Hz) */
761    {18, 1682, 0, 1201}, /* 07 (1280x1024x60Hz) */
762    {18, 1682, 0, 1201}, /* 08 (1400x1050x60Hz) */
763    {18, 1682, 0, 1201} /* 09 (1600x1200x60Hz) */
764};
765
766static struct XGI_LCDDesStruct XGI_StLCDDLDes1600x1200Data[] = {
767    {18, 1682, 1150, 1101}, /* 00 (320x200,320x400,640x200,640x400) */
768    {18, 1682, 1083, 1034}, /* 01 (320x350,640x350) */
769    {18, 1682, 1150, 1101}, /* 02 (360x400,720x400) */
770    {18, 1682, 1083, 1034}, /* 03 (720x350) */
771    {18, 1682, 0, 1201}, /* 04 (640x480x60Hz) */
772    {18, 1682, 0, 1201}, /* 05 (800x600x60Hz) */
773    {18, 1682, 0, 1201}, /* 06 (1024x768x60Hz) */
774    {18, 1682, 1232, 1183}, /* 07 (1280x1024x60Hz) */
775    {18, 1682, 0, 1201}, /* 08 (1400x1050x60Hz) */
776    {18, 1682, 0, 1201} /* 09 (1600x1200x60Hz) */
777};
778
779static struct XGI_LCDDesStruct XGI_ExtLCDDes1600x1200Data[] = {
780    {9, 1673, 0, 1201}, /* 00 (320x200,320x400,640x200,640x400) */
781    {9, 1673, 0, 1201}, /* 01 (320x350,640x350) */
782    {9, 1673, 0, 1201}, /* 02 (360x400,720x400) */
783    {9, 1673, 0, 1201}, /* 03 (720x350) */
784    {9, 1673, 0, 1201}, /* 04 (640x480x60Hz) */
785    {9, 1673, 0, 1201}, /* 05 (800x600x60Hz) */
786    {9, 1673, 0, 1201}, /* 06 (1024x768x60Hz) */
787    {9, 1673, 0, 1201}, /* 07 (1280x1024x60Hz) */
788    {9, 1673, 0, 1201}, /* 08 (1400x1050x60Hz) */
789    {9, 1673, 0, 1201} /* 09 (1600x1200x60Hz) */
790};
791
792static struct XGI_LCDDesStruct XGI_StLCDDes1600x1200Data[] = {
793    {9, 1673, 1150, 1101}, /* 00 (320x200,320x400,640x200,640x400) */
794    {9, 1673, 1083, 1034}, /* 01 (320x350,640x350) */
795    {9, 1673, 1150, 1101}, /* 02 (360x400,720x400) */
796    {9, 1673, 1083, 1034}, /* 03 (720x350) */
797    {9, 1673, 0, 1201}, /* 04 (640x480x60Hz) */
798    {9, 1673, 0, 1201}, /* 05 (800x600x60Hz) */
799    {9, 1673, 0, 1201}, /* 06 (1024x768x60Hz) */
800    {9, 1673, 1232, 1183}, /* 07 (1280x1024x60Hz) */
801    {9, 1673, 0, 1201}, /* 08 (1400x1050x60Hz) */
802    {9, 1673, 0, 1201} /* 09 (1600x1200x60Hz) */
803};
804
805static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesData[] = {
806    {9, 657, 448, 405, 96, 2}, /* 00 (320x200,320x400,
807                          640x200,640x400) */
808    {9, 657, 448, 355, 96, 2}, /* 01 (320x350,640x350) */
809    {9, 657, 448, 405, 96, 2}, /* 02 (360x400,720x400) */
810    {9, 657, 448, 355, 96, 2}, /* 03 (720x350) */
811    {9, 657, 1, 483, 96, 2}, /* 04 (640x480x60Hz) */
812    {9, 849, 627, 600, 128, 4}, /* 05 (800x600x60Hz) */
813    {9, 1057, 805, 770, 0136, 6}, /* 06 (1024x768x60Hz) */
814    {9, 1337, 0, 1025, 112, 3}, /* 07 (1280x1024x60Hz) */
815    {9, 1457, 0, 1051, 112, 3}, /* 08 (1400x1050x60Hz)*/
816    {9, 1673, 0, 1201, 192, 3}, /* 09 (1600x1200x60Hz) */
817    {9, 1337, 0, 771, 112, 6} /* 0A (1280x768x60Hz) */
818};
819
820/* ;;1024x768x75Hz */
821static struct XGI_LCDDesStruct xgifb_lcddes_1024x768x75[] = {
822    {9, 1049, 0, 769}, /* ; 00 (320x200,320x400,640x200,640x400) */
823    {9, 1049, 0, 769}, /* ; 01 (320x350,640x350) */
824    {9, 1049, 0, 769}, /* ; 02 (360x400,720x400) */
825    {9, 1049, 0, 769}, /* ; 03 (720x350) */
826    {9, 1049, 0, 769}, /* ; 04 (640x480x75Hz) */
827    {9, 1049, 0, 769}, /* ; 05 (800x600x75Hz) */
828    {9, 1049, 0, 769} /* ; 06 (1024x768x75Hz) */
829};
830
831/* ;;1024x768x75Hz */
832static struct XGI_LCDDesStruct XGI_CetLCDDes1024x768x75Data[] = {
833    {1152, 856, 622, 587}, /* ; 00 (320x200,320x400,640x200,640x400) */
834    {1152, 856, 597, 562}, /* ; 01 (320x350,640x350) */
835    {1192, 896, 622, 587}, /* ; 02 (360x400,720x400) */
836    {1192, 896, 597, 562}, /* ; 03 (720x350) */
837    {1129, 857, 656, 625}, /* ; 04 (640x480x75Hz) */
838    {1209, 937, 716, 685}, /* ; 05 (800x600x75Hz) */
839    {9, 1049, 0, 769} /* ; 06 (1024x768x75Hz) */
840};
841
842/* ;;1280x1024x75Hz */
843static struct XGI_LCDDesStruct xgifb_lcddldes_1280x1024x75[] = {
844    {18, 1314, 0, 1025}, /* ; 00 (320x200,320x400,640x200,640x400) */
845    {18, 1314, 0, 1025}, /* ; 01 (320x350,640x350) */
846    {18, 1314, 0, 1025}, /* ; 02 (360x400,720x400) */
847    {18, 1314, 0, 1025}, /* ; 03 (720x350) */
848    {18, 1314, 0, 1025}, /* ; 04 (640x480x60Hz) */
849    {18, 1314, 0, 1025}, /* ; 05 (800x600x60Hz) */
850    {18, 1314, 0, 1025}, /* ; 06 (1024x768x60Hz) */
851    {18, 1314, 0, 1025} /* ; 07 (1280x1024x60Hz) */
852};
853
854/* 1280x1024x75Hz */
855static struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024x75Data[] = {
856    {1368, 1008, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */
857    {1368, 1008, 729, 688}, /* ; 01 (320x350,640x350) */
858    {1408, 1048, 752, 711}, /* ; 02 (360x400,720x400) */
859    {1408, 1048, 729, 688}, /* ; 03 (720x350) */
860    {1377, 985, 794, 753}, /* ; 04 (640x480x75Hz) */
861    {1457, 1065, 854, 813}, /* ; 05 (800x600x75Hz) */
862    {1569, 1177, 938, 897}, /* ; 06 (1024x768x75Hz) */
863    {18, 1314, 0, 1025} /* ; 07 (1280x1024x75Hz) */
864};
865
866/* ;;1280x1024x75Hz */
867static struct XGI_LCDDesStruct xgifb_lcddes_1280x1024x75[] = {
868    {9, 1305, 0, 1025}, /* ; 00 (320x200,320x400,640x200,640x400) */
869    {9, 1305, 0, 1025}, /* ; 01 (320x350,640x350) */
870    {9, 1305, 0, 1025}, /* ; 02 (360x400,720x400) */
871    {9, 1305, 0, 1025}, /* ; 03 (720x350) */
872    {9, 1305, 0, 1025}, /* ; 04 (640x480x60Hz) */
873    {9, 1305, 0, 1025}, /* ; 05 (800x600x60Hz) */
874    {9, 1305, 0, 1025}, /* ; 06 (1024x768x60Hz) */
875    {9, 1305, 0, 1025} /* ; 07 (1280x1024x60Hz) */
876};
877
878/* 1280x1024x75Hz */
879static struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024x75Data[] = {
880    {1368, 1008, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */
881    {1368, 1008, 729, 688}, /* ; 01 (320x350,640x350) */
882    {1408, 1048, 752, 711}, /* ; 02 (360x400,720x400) */
883    {1408, 1048, 729, 688}, /* ; 03 (720x350) */
884    {1377, 985, 794, 753}, /* ; 04 (640x480x75Hz) */
885    {1457, 1065, 854, 813}, /* ; 05 (800x600x75Hz) */
886    {1569, 1177, 938, 897}, /* ; 06 (1024x768x75Hz) */
887    {9, 1305, 0, 1025} /* ; 07 (1280x1024x75Hz) */
888};
889
890/* Scaling LCD 75Hz */
891static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesDatax75[] = {
892    {9, 657, 448, 405, 96, 2}, /* ; 00 (320x200,320x400,
893                           640x200,640x400) */
894    {9, 657, 448, 355, 96, 2}, /* ; 01 (320x350,640x350) */
895    {9, 738, 448, 405, 108, 2}, /* ; 02 (360x400,720x400) */
896    {9, 738, 448, 355, 108, 2}, /* ; 03 (720x350) */
897    {9, 665, 0, 481, 64, 3}, /* ; 04 (640x480x75Hz) */
898    {9, 825, 0, 601, 80, 3}, /* ; 05 (800x600x75Hz) */
899    {9, 1049, 0, 769, 96, 3}, /* ; 06 (1024x768x75Hz) */
900    {9, 1305, 0, 1025, 144, 3}, /* ; 07 (1280x1024x75Hz) */
901    {9, 1457, 0, 1051, 112, 3}, /* ; 08 (1400x1050x60Hz)*/
902    {9, 1673, 0, 1201, 192, 3}, /* ; 09 (1600x1200x75Hz) */
903    {9, 1337, 0, 771, 112, 6} /* ; 0A (1280x768x60Hz) */
904};
905
906static struct XGI330_TVDataStruct XGI_StPALData[] = {
907    {1, 1, 864, 525, 1270, 400, 100, 0, 760},
908    {1, 1, 864, 525, 1270, 350, 100, 0, 760},
909    {1, 1, 864, 525, 1270, 400, 0, 0, 720},
910    {1, 1, 864, 525, 1270, 350, 0, 0, 720},
911    {1, 1, 864, 525, 1270, 480, 50, 0, 760},
912    {1, 1, 864, 525, 1270, 600, 50, 0, 0}
913};
914
915static struct XGI330_TVDataStruct XGI_ExtPALData[] = {
916    {2, 1, 1080, 463, 1270, 500, 50, 0, 50},
917    {15, 7, 1152, 413, 1270, 500, 50, 0, 50},
918    {2, 1, 1080, 463, 1270, 500, 50, 0, 50},
919    {15, 7, 1152, 413, 1270, 500, 50, 0, 50},
920    {2, 1, 900, 543, 1270, 500, 0, 0, 50},
921    {4, 3, 1080, 663, 1270, 500, 438, 0, 438},
922    {1, 1, 1125, 831, 1270, 500, 686, 0, 686}, /*301b*/
923    {3, 2, 1080, 619, 1270, 540, 438, 0, 438}
924};
925
926static struct XGI330_TVDataStruct XGI_StNTSCData[] = {
927    {1, 1, 858, 525, 1270, 400, 50, 0, 760},
928    {1, 1, 858, 525, 1270, 350, 50, 0, 640},
929    {1, 1, 858, 525, 1270, 400, 0, 0, 720},
930    {1, 1, 858, 525, 1270, 350, 0, 0, 720},
931    {1, 1, 858, 525, 1270, 480, 0, 0, 760}
932};
933
934static struct XGI330_TVDataStruct XGI_ExtNTSCData[] = {
935    {9, 5, 1001, 453, 1270, 420, 171, 0, 171},
936    {12, 5, 858, 403, 1270, 420, 171, 0, 171},
937    {9, 5, 1001, 453, 1270, 420, 171, 0, 171},
938    {12, 5, 858, 403, 1270, 420, 171, 0, 171},
939    {143, 80, 836, 523, 1270, 420, 224, 0, 0},
940    {143, 120, 1008, 643, 1270, 420, 0, 1, 0},
941    {1, 1, 1120, 821, 1516, 420, 0, 1, 0}, /*301b*/
942    {2, 1, 858, 503, 1584, 480, 0, 1, 0},
943    {3, 2, 1001, 533, 1270, 420, 0, 0, 0}
944};
945
946static struct XGI330_TVDataStruct XGI_St1HiTVData[] = {
947    {1, 1, 892, 563, 690, 800, 0, 0, 0}, /* 00 (320x200,320x400,
948                              640x200,640x400) */
949    {1, 1, 892, 563, 690, 700, 0, 0, 0}, /* 01 (320x350,640x350) */
950    {1, 1, 1000, 563, 785, 800, 0, 0, 0}, /* 02 (360x400,720x400) */
951    {1, 1, 1000, 563, 785, 700, 0, 0, 0}, /* 03 (720x350) */
952    {1, 1, 892, 563, 690, 960, 0, 0, 0}, /* 04 (320x240,640x480) */
953    {8, 5, 1050, 683, 1648, 960, 0x150, 1, 0} /* 05 (400x300,800x600) */
954};
955
956static struct XGI330_TVDataStruct XGI_St2HiTVData[] = {
957    {3, 1, 840, 483, 1648, 960, 0x032, 0, 0}, /* 00 (320x200,320x400,
958                              640x200,640x400) */
959    {1, 1, 892, 563, 690, 700, 0, 0, 0}, /* 01 (320x350,640x350) */
960    {3, 1, 840, 483, 1648, 960, 0x032, 0, 0}, /* 02 (360x400,720x400) */
961    {1, 1, 1000, 563, 785, 700, 0, 0, 0}, /* 03 (720x350) */
962    {5, 2, 840, 563, 1648, 960, 0x08D, 1, 0}, /* 04 (320x240,640x480) */
963    {8, 5, 1050, 683, 1648, 960, 0x17C, 1, 0} /* 05 (400x300,800x600) */
964};
965
966static struct XGI330_TVDataStruct XGI_ExtHiTVData[] = {
967    {6, 1, 840, 563, 1632, 960, 0, 0, 0}, /* 00 (320x200,320x400,
968                                 640x200,640x400) */
969    {3, 1, 960, 563, 1632, 960, 0, 0, 0}, /* 01 (320x350,640x350) */
970    {3, 1, 840, 483, 1632, 960, 0, 0, 0}, /* 02 (360x400,720x400) */
971    {3, 1, 960, 563, 1632, 960, 0, 0, 0}, /* 03 (720x350) */
972    {5, 1, 840, 563, 1648, 960, 0x166, 1, 0}, /* 04 (320x240,640x480) */
973    {16, 5, 1050, 683, 1648, 960, 0x143, 1, 0}, /* 05 (400x300,800x600) */
974    {25, 12, 1260, 851, 1648, 960, 0x032, 0, 0}, /* 06 (512x384,1024x768)*/
975    {5, 4, 1575, 1124, 1648, 960, 0x128, 0, 0}, /* 07 (1280x1024) */
976    {4, 1, 1050, 563, 1548, 960, 0x143, 1, 0}, /* 08 (800x480) */
977    {5, 2, 1400, 659, 1648, 960, 0x032, 0, 0}, /* 09 (1024x576) */
978    {8, 5, 1750, 803, 1648, 960, 0x128, 0, 0} /* 0A (1280x720) */
979};
980
981static struct XGI330_TVDataStruct XGI_ExtYPbPr525iData[] = {
982    { 9, 5, 1001, 453, 1270, 420, 171, 0, 171},
983    { 12, 5, 858, 403, 1270, 420, 171, 0, 171},
984    { 9, 5, 1001, 453, 1270, 420, 171, 0, 171},
985    { 12, 5, 858, 403, 1270, 420, 171, 0, 171},
986    {143, 80, 836, 523, 1250, 420, 224, 0, 0},
987    {143, 120, 1008, 643, 1250, 420, 0, 1, 0},
988    { 1, 1, 1120, 821, 1516, 420, 0, 1, 0}, /*301b*/
989    { 2, 1, 858, 503, 1584, 480, 0, 1, 0},
990    { 3, 2, 1001, 533, 1250, 420, 0, 0, 0}
991};
992
993static struct XGI330_TVDataStruct XGI_StYPbPr525iData[] = {
994    {1, 1, 858, 525, 1270, 400, 50, 0, 760},
995    {1, 1, 858, 525, 1270, 350, 50, 0, 640},
996    {1, 1, 858, 525, 1270, 400, 0, 0, 720},
997    {1, 1, 858, 525, 1270, 350, 0, 0, 720},
998    {1, 1, 858, 525, 1270, 480, 0, 0, 760},
999};
1000
1001static struct XGI330_TVDataStruct XGI_ExtYPbPr525pData[] = {
1002    { 9, 5, 1001, 453, 1270, 420, 171, 0, 171},
1003    { 12, 5, 858, 403, 1270, 420, 171, 0, 171},
1004    { 9, 5, 1001, 453, 1270, 420, 171, 0, 171},
1005    { 12, 5, 858, 403, 1270, 420, 171, 0, 171},
1006    {143, 80, 836, 523, 1270, 420, 224, 0, 0},
1007    {143, 120, 1008, 643, 1270, 420, 0, 1, 0},
1008    { 1, 1, 1120, 821, 1516, 420, 0, 1, 0}, /*301b*/
1009    { 2, 1, 858, 503, 1584, 480, 0, 1, 0},
1010    { 3, 2, 1001, 533, 1270, 420, 0, 0, 0}
1011};
1012
1013static struct XGI330_TVDataStruct XGI_StYPbPr525pData[] = {
1014    {1, 1, 1716, 525, 1270, 400, 50, 0, 760},
1015    {1, 1, 1716, 525, 1270, 350, 50, 0, 640},
1016    {1, 1, 1716, 525, 1270, 400, 0, 0, 720},
1017    {1, 1, 1716, 525, 1270, 350, 0, 0, 720},
1018    {1, 1, 1716, 525, 1270, 480, 0, 0, 760},
1019};
1020
1021static struct XGI330_TVDataStruct XGI_ExtYPbPr750pData[] = {
1022    { 3, 1, 935, 470, 1130, 680, 50, 0, 0}, /* 00 (320x200,320x400,
1023                             640x200,640x400) */
1024    {24, 7, 935, 420, 1130, 680, 50, 0, 0}, /* 01 (320x350,640x350) */
1025    { 3, 1, 935, 470, 1130, 680, 50, 0, 0}, /* 02 (360x400,720x400) */
1026    {24, 7, 935, 420, 1130, 680, 50, 0, 0}, /* 03 (720x350) */
1027    { 2, 1, 1100, 590, 1130, 640, 50, 0, 0}, /* 04 (320x240,640x480) */
1028    { 3, 2, 1210, 690, 1130, 660, 50, 0, 0}, /* 05 (400x300,800x600) */
1029    { 1, 1, 1375, 878, 1130, 640, 638, 0, 0}, /* 06 (1024x768) */
1030    { 2, 1, 858, 503, 1130, 480, 0, 1, 0}, /* 07 (720x480) */
1031    { 5, 4, 1815, 570, 1130, 660, 50, 0, 0},
1032    { 5, 3, 1100, 686, 1130, 640, 50, 1, 0},
1033    {10, 9, 1320, 830, 1130, 640, 50, 0, 0}
1034};
1035
1036static struct XGI330_TVDataStruct XGI_StYPbPr750pData[] = {
1037    {1, 1, 1650, 750, 1280, 400, 50, 0, 760},
1038    {1, 1, 1650, 750, 1280, 350, 50, 0, 640},
1039    {1, 1, 1650, 750, 1280, 400, 0, 0, 720},
1040    {1, 1, 1650, 750, 1280, 350, 0, 0, 720},
1041    {1, 1, 1650, 750, 1280, 480, 0, 0, 760},
1042};
1043
1044static unsigned char XGI330_NTSCTiming[] = {
1045    0x17, 0x1d, 0x03, 0x09, 0x05, 0x06, 0x0c, 0x0c,
1046    0x94, 0x49, 0x01, 0x0a, 0x06, 0x0d, 0x04, 0x0a,
1047    0x06, 0x14, 0x0d, 0x04, 0x0a, 0x00, 0x85, 0x1b,
1048    0x0c, 0x50, 0x00, 0x97, 0x00, 0xda, 0x4a, 0x17,
1049    0x7d, 0x05, 0x4b, 0x00, 0x00, 0xe2, 0x00, 0x02,
1050    0x03, 0x0a, 0x65, 0x9d, 0x08, 0x92, 0x8f, 0x40,
1051    0x60, 0x80, 0x14, 0x90, 0x8c, 0x60, 0x14, 0x50,
1052    0x00, 0x40, 0x44, 0x00, 0xdb, 0x02, 0x3b, 0x00
1053};
1054
1055static unsigned char XGI330_PALTiming[] = {
1056    0x21, 0x5A, 0x35, 0x6e, 0x04, 0x38, 0x3d, 0x70,
1057    0x94, 0x49, 0x01, 0x12, 0x06, 0x3e, 0x35, 0x6d,
1058    0x06, 0x14, 0x3e, 0x35, 0x6d, 0x00, 0x45, 0x2b,
1059    0x70, 0x50, 0x00, 0x9b, 0x00, 0xd9, 0x5d, 0x17,
1060    0x7d, 0x05, 0x45, 0x00, 0x00, 0xe8, 0x00, 0x02,
1061    0x0d, 0x00, 0x68, 0xb0, 0x0b, 0x92, 0x8f, 0x40,
1062    0x60, 0x80, 0x14, 0x90, 0x8c, 0x60, 0x14, 0x63,
1063    0x00, 0x40, 0x3e, 0x00, 0xe1, 0x02, 0x28, 0x00
1064};
1065
1066static unsigned char XGI330_HiTVExtTiming[] = {
1067    0x2D, 0x60, 0x2C, 0x5F, 0x08, 0x31, 0x3A, 0x64,
1068    0x28, 0x02, 0x01, 0x3D, 0x06, 0x3E, 0x35, 0x6D,
1069    0x06, 0x14, 0x3E, 0x35, 0x6D, 0x00, 0xC5, 0x3F,
1070    0x64, 0x90, 0x33, 0x8C, 0x18, 0x36, 0x3E, 0x13,
1071    0x2A, 0xDE, 0x2A, 0x44, 0x40, 0x2A, 0x44, 0x40,
1072    0x8E, 0x8E, 0x82, 0x07, 0x0B,
1073    0x92, 0x0F, 0x40, 0x60, 0x80, 0x14, 0x90, 0x8C,
1074    0x60, 0x14, 0x3D, 0x63, 0x4F,
1075    0x27, 0x00, 0xfc, 0xff, 0x6a, 0x00
1076};
1077
1078static unsigned char XGI330_HiTVSt1Timing[] = {
1079    0x32, 0x65, 0x2C, 0x5F, 0x08, 0x31, 0x3A, 0x65,
1080    0x28, 0x02, 0x01, 0x3D, 0x06, 0x3E, 0x35, 0x6D,
1081    0x06, 0x14, 0x3E, 0x35, 0x6D, 0x00, 0xC5, 0x3F,
1082    0x65, 0x90, 0x7B, 0xA8, 0x03, 0xF0, 0x87, 0x03,
1083    0x11, 0x15, 0x11, 0xCF, 0x10, 0x11, 0xCF, 0x10,
1084    0x35, 0x35, 0x3B, 0x69, 0x1D,
1085    0x92, 0x0F, 0x40, 0x60, 0x80, 0x14, 0x90, 0x8C,
1086    0x60, 0x04, 0x86, 0xAF, 0x5D,
1087    0x0E, 0x00, 0xfc, 0xff, 0x2d, 0x00
1088};
1089
1090static unsigned char XGI330_HiTVSt2Timing[] = {
1091    0x32, 0x65, 0x2C, 0x5F, 0x08, 0x31, 0x3A, 0x64,
1092    0x28, 0x02, 0x01, 0x3D, 0x06, 0x3E, 0x35, 0x6D,
1093    0x06, 0x14, 0x3E, 0x35, 0x6D, 0x00, 0xC5, 0x3F,
1094    0x64, 0x90, 0x33, 0x8C, 0x18, 0x36, 0x3E, 0x13,
1095    0x2A, 0xDE, 0x2A, 0x44, 0x40, 0x2A, 0x44, 0x40,
1096    0x8E, 0x8E, 0x82, 0x07, 0x0B,
1097    0x92, 0x0F, 0x40, 0x60, 0x80, 0x14, 0x90, 0x8C,
1098    0x60, 0x14, 0x3D, 0x63, 0x4F,
1099    0x27, 0x00, 0xFC, 0xff, 0x6a, 0x00
1100};
1101
1102static unsigned char XGI330_HiTVTextTiming[] = {
1103    0x32, 0x65, 0x2C, 0x5F, 0x08, 0x31, 0x3A, 0x65,
1104    0x28, 0x02, 0x01, 0x3D, 0x06, 0x3E, 0x35, 0x6D,
1105    0x06, 0x14, 0x3E, 0x35, 0x6D, 0x00, 0xC5, 0x3F,
1106    0x65, 0x90, 0xE7, 0xBC, 0x03, 0x0C, 0x97, 0x03,
1107    0x14, 0x78, 0x14, 0x08, 0x20, 0x14, 0x08, 0x20,
1108    0xC8, 0xC8, 0x3B, 0xD2, 0x26,
1109    0x92, 0x0F, 0x40, 0x60, 0x80, 0x14, 0x90, 0x8C,
1110    0x60, 0x04, 0x96, 0x72, 0x5C,
1111    0x11, 0x00, 0xFC, 0xFF, 0x32, 0x00
1112};
1113
1114static unsigned char XGI330_YPbPr750pTiming[] = {
1115    0x30, 0x1d, 0xe8, 0x09, 0x09, 0xed, 0x0c, 0x0c,
1116    0x98, 0x0a, 0x01, 0x0c, 0x06, 0x0d, 0x04, 0x0a,
1117    0x06, 0x14, 0x0d, 0x04, 0x0a, 0x00, 0x85, 0x3f,
1118    0xed, 0x50, 0x70, 0x9f, 0x16, 0x59, 0x60, 0x13,
1119    0x27, 0x0b, 0x27, 0xfc, 0x30, 0x27, 0x1c, 0xb0,
1120    0x4b, 0x4b, 0x6f, 0x2f, 0x63,
1121    0x92, 0x0F, 0x40, 0x60, 0x80, 0x14, 0x90, 0x8C,
1122    0x60, 0x14, 0x73, 0x00, 0x40,
1123    0x11, 0x00, 0xfc, 0xff, 0x32, 0x00
1124};
1125
1126static unsigned char XGI330_YPbPr525pTiming[] = {
1127    0x3E, 0x11, 0x06, 0x09, 0x0b, 0x0c, 0x0c, 0x0c,
1128    0x98, 0x0a, 0x01, 0x0d, 0x06, 0x0d, 0x04, 0x0a,
1129    0x06, 0x14, 0x0d, 0x04, 0x0a, 0x00, 0x85, 0x3f,
1130    0x0c, 0x50, 0xb2, 0x9f, 0x16, 0x59, 0x4f, 0x13,
1131    0xad, 0x11, 0xad, 0x1d, 0x40, 0x8a, 0x3d, 0xb8,
1132    0x51, 0x5e, 0x60, 0x49, 0x7d,
1133    0x92, 0x0F, 0x40, 0x60, 0x80, 0x14, 0x90, 0x8C,
1134    0x60, 0x14, 0x4B, 0x43, 0x41,
1135    0x11, 0x00, 0xFC, 0xFF, 0x32, 0x00
1136};
1137
1138static unsigned char XGI330_YPbPr525iTiming[] = {
1139    0x1B, 0x21, 0x03, 0x09, 0x05, 0x06, 0x0C, 0x0C,
1140    0x94, 0x49, 0x01, 0x0A, 0x06, 0x0D, 0x04, 0x0A,
1141    0x06, 0x14, 0x0D, 0x04, 0x0A, 0x00, 0x85, 0x1B,
1142    0x0C, 0x50, 0x00, 0x97, 0x00, 0xDA, 0x4A, 0x17,
1143    0x7D, 0x05, 0x4B, 0x00, 0x00, 0xE2, 0x00, 0x02,
1144    0x03, 0x0A, 0x65, 0x9D, 0x08,
1145    0x92, 0x8F, 0x40, 0x60, 0x80, 0x14, 0x90, 0x8C,
1146    0x60, 0x14, 0x4B, 0x00, 0x40,
1147    0x44, 0x00, 0xDB, 0x02, 0x3B, 0x00
1148};
1149
1150static unsigned char XGI330_HiTVGroup3Data[] = {
1151    0x00, 0x1A, 0x22, 0x63, 0x62, 0x22, 0x08, 0x5F,
1152    0x05, 0x21, 0xB2, 0xB2, 0x55, 0x77, 0x2A, 0xA6,
1153    0x25, 0x2F, 0x47, 0xFA, 0xC8, 0xFF, 0x8E, 0x20,
1154    0x8C, 0x6E, 0x60, 0x2E, 0x58, 0x48, 0x72, 0x44,
1155    0x56, 0x36, 0x4F, 0x6E, 0x3F, 0x80, 0x00, 0x80,
1156    0x4F, 0x7F, 0x03, 0xA8, 0x7D, 0x20, 0x1A, 0xA9,
1157    0x14, 0x05, 0x03, 0x7E, 0x64, 0x31, 0x14, 0x75,
1158    0x18, 0x05, 0x18, 0x05, 0x4C, 0xA8, 0x01
1159};
1160
1161static unsigned char XGI330_HiTVGroup3Simu[] = {
1162    0x00, 0x1A, 0x22, 0x63, 0x62, 0x22, 0x08, 0x95,
1163    0xDB, 0x20, 0xB8, 0xB8, 0x55, 0x47, 0x2A, 0xA6,
1164    0x25, 0x2F, 0x47, 0xFA, 0xC8, 0xFF, 0x8E, 0x20,
1165    0x8C, 0x6E, 0x60, 0x15, 0x26, 0xD3, 0xE4, 0x11,
1166    0x56, 0x36, 0x4F, 0x6E, 0x3F, 0x80, 0x00, 0x80,
1167    0x67, 0x36, 0x01, 0x47, 0x0E, 0x10, 0xBE, 0xB4,
1168    0x01, 0x05, 0x03, 0x7E, 0x65, 0x31, 0x14, 0x75,
1169    0x18, 0x05, 0x18, 0x05, 0x4C, 0xA8, 0x01
1170};
1171
1172static unsigned char XGI330_HiTVGroup3Text[] = {
1173    0x00, 0x1A, 0x22, 0x63, 0x62, 0x22, 0x08, 0xA7,
1174    0xF5, 0x20, 0xCE, 0xCE, 0x55, 0x47, 0x2A, 0xA6,
1175    0x25, 0x2F, 0x47, 0xFA, 0xC8, 0xFF, 0x8E, 0x20,
1176    0x8C, 0x6E, 0x60, 0x18, 0x2C, 0x0C, 0x20, 0x22,
1177    0x56, 0x36, 0x4F, 0x6E, 0x3F, 0x80, 0x00, 0x80,
1178    0x93, 0x3C, 0x01, 0x50, 0x2F, 0x10, 0xF4, 0xCA,
1179    0x01, 0x05, 0x03, 0x7E, 0x65, 0x31, 0x14, 0x75,
1180    0x18, 0x05, 0x18, 0x05, 0x4C, 0xA8, 0x01
1181};
1182
1183static unsigned char XGI330_Ren525pGroup3[] = {
1184    0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13,
1185    0xB1, 0x41, 0x62, 0x62, 0xFF, 0xF4, 0x45, 0xa6,
1186    0x25, 0x2F, 0x67, 0xF6, 0xbf, 0xFF, 0x8E, 0x20,
1187    0xAC, 0xDA, 0x60, 0xFe, 0x6A, 0x9A, 0x06, 0x10,
1188    0xd1, 0x04, 0x18, 0x0a, 0xFF, 0x80, 0x00, 0x80,
1189    0x3c, 0x77, 0x00, 0xEF, 0xE0, 0x10, 0xB0, 0xE0,
1190    0x10, 0x4F, 0x0F, 0x0F, 0x05, 0x0F, 0x08, 0x6E,
1191    0x1a, 0x1F, 0x25, 0x2a, 0x4C, 0xAA, 0x01
1192};
1193
1194static unsigned char XGI330_Ren750pGroup3[] = {
1195    0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a,
1196    0x54, 0x41, 0xE7, 0xE7, 0xFF, 0xF4, 0x45, 0xa6,
1197    0x25, 0x2F, 0x67, 0xF6, 0xbf, 0xFF, 0x8E, 0x20,
1198    0xAC, 0x6A, 0x60, 0x2b, 0x52, 0xCD, 0x61, 0x10,
1199    0x51, 0x04, 0x18, 0x0a, 0x1F, 0x80, 0x00, 0x80,
1200    0xFF, 0xA4, 0x04, 0x2B, 0x94, 0x21, 0x72, 0x94,
1201    0x26, 0x05, 0x01, 0x0F, 0xed, 0x0F, 0x0A, 0x64,
1202    0x18, 0x1D, 0x23, 0x28, 0x4C, 0xAA, 0x01
1203};
1204
1205static struct SiS_LVDSData XGI_LVDS1024x768Data_1[] = {
1206    { 960, 438, 1344, 806}, /* 00 (320x200,320x400,640x200,640x400) */
1207    { 960, 388, 1344, 806}, /* 01 (320x350,640x350) */
1208    {1040, 438, 1344, 806}, /* 02 (360x400,720x400) */
1209    {1040, 388, 1344, 806}, /* 03 (720x350) */
1210    { 960, 518, 1344, 806}, /* 04 (320x240,640x480) */
1211    {1120, 638, 1344, 806}, /* 05 (400x300,800x600) */
1212    {1344, 806, 1344, 806} /* 06 (512x384,1024x768) */
1213};
1214
1215
1216static struct SiS_LVDSData XGI_LVDS1024x768Data_2[] = {
1217    {1344, 806, 1344, 806},
1218    {1344, 806, 1344, 806},
1219    {1344, 806, 1344, 806},
1220    {1344, 806, 1344, 806},
1221    {1344, 806, 1344, 806},
1222    {1344, 806, 1344, 806},
1223    {1344, 806, 1344, 806},
1224    {800, 449, 1280, 801},
1225    {800, 525, 1280, 813}
1226};
1227
1228static struct SiS_LVDSData XGI_LVDS1280x1024Data_1[] = {
1229    {1048, 442, 1688, 1066},
1230    {1048, 392, 1688, 1066},
1231    {1048, 442, 1688, 1066},
1232    {1048, 392, 1688, 1066},
1233    {1048, 522, 1688, 1066},
1234    {1208, 642, 1688, 1066},
1235    {1432, 810, 1688, 1066},
1236    {1688, 1066, 1688, 1066}
1237};
1238
1239static struct SiS_LVDSData XGI_LVDS1280x1024Data_2[] = {
1240    {1344, 806, 1344, 806},
1241    {1344, 806, 1344, 806},
1242    {1344, 806, 1344, 806},
1243    {1344, 806, 1344, 806},
1244    {1344, 806, 1344, 806},
1245    {1344, 806, 1344, 806},
1246    {1344, 806, 1344, 806},
1247    {800, 449, 1280, 801},
1248    {800, 525, 1280, 813}
1249};
1250
1251static struct SiS_LVDSData XGI_LVDS1400x1050Data_1[] = {
1252    {928, 416, 1688, 1066},
1253    {928, 366, 1688, 1066},
1254    {928, 416, 1688, 1066},
1255    {928, 366, 1688, 1066},
1256    {928, 496, 1688, 1066},
1257    {1088, 616, 1688, 1066},
1258    {1312, 784, 1688, 1066},
1259    {1568, 1040, 1688, 1066},
1260    {1688, 1066, 1688, 1066}
1261};
1262
1263static struct SiS_LVDSData XGI_LVDS1400x1050Data_2[] = {
1264    {1688, 1066, 1688, 1066},
1265    {1688, 1066, 1688, 1066},
1266    {1688, 1066, 1688, 1066},
1267    {1688, 1066, 1688, 1066},
1268    {1688, 1066, 1688, 1066},
1269    {1688, 1066, 1688, 1066},
1270    {1688, 1066, 1688, 1066},
1271    {1688, 1066, 1688, 1066},
1272    {1688, 1066, 1688, 1066}
1273};
1274
1275/* ;;[ycchen] 12/05/02 LCDHTxLCDVT=2048x1320 */
1276static struct SiS_LVDSData XGI_LVDS1600x1200Data_1[] = {
1277    {1088, 520, 2048, 1320}, /* 00 (320x200,320x400,640x200,640x400) */
1278    {1088, 470, 2048, 1320}, /* 01 (320x350,640x350) */
1279    {1088, 520, 2048, 1320}, /* 02 (360x400,720x400) */
1280    {1088, 470, 2048, 1320}, /* 03 (720x350) */
1281    {1088, 600, 2048, 1320}, /* 04 (320x240,640x480) */
1282    {1248, 720, 2048, 1320}, /* 05 (400x300,800x600) */
1283    {1472, 888, 2048, 1320}, /* 06 (512x384,1024x768) */
1284    {1728, 1144, 2048, 1320}, /* 07 (640x512,1280x1024) */
1285    {1848, 1170, 2048, 1320}, /* 08 (1400x1050) */
1286    {2048, 1320, 2048, 1320} /* 09 (1600x1200) */
1287};
1288
1289static struct SiS_LVDSData XGI_LVDSNoScalingData[] = {
1290    { 800, 449, 800, 449}, /* 00 (320x200,320x400,640x200,640x400) */
1291    { 800, 449, 800, 449}, /* 01 (320x350,640x350) */
1292    { 800, 449, 800, 449}, /* 02 (360x400,720x400) */
1293    { 800, 449, 800, 449}, /* 03 (720x350) */
1294    { 800, 525, 800, 525}, /* 04 (640x480x60Hz) */
1295    {1056, 628, 1056, 628}, /* 05 (800x600x60Hz) */
1296    {1344, 806, 1344, 806}, /* 06 (1024x768x60Hz) */
1297    {1688, 1066, 1688, 1066}, /* 07 (1280x1024x60Hz) */
1298    {1688, 1066, 1688, 1066}, /* 08 (1400x1050x60Hz) */
1299    {2160, 1250, 2160, 1250}, /* 09 (1600x1200x60Hz) */
1300    {1688, 806, 1688, 806} /* 0A (1280x768x60Hz) */
1301};
1302
1303static struct SiS_LVDSData XGI_LVDS1024x768Data_1x75[] = {
1304    { 960, 438, 1312, 800}, /* 00 (320x200,320x400,640x200,640x400) */
1305    { 960, 388, 1312, 800}, /* 01 (320x350,640x350) */
1306    {1040, 438, 1312, 800}, /* 02 (360x400,720x400) */
1307    {1040, 388, 1312, 800}, /* 03 (720x350) */
1308    { 928, 512, 1312, 800}, /* 04 (320x240,640x480) */
1309    {1088, 632, 1312, 800}, /* 05 (400x300,800x600) */
1310    {1312, 800, 1312, 800}, /* 06 (512x384,1024x768) */
1311};
1312
1313
1314static struct SiS_LVDSData XGI_LVDS1024x768Data_2x75[] = {
1315    {1312, 800, 1312, 800}, /* ; 00 (320x200,320x400,640x200,640x400) */
1316    {1312, 800, 1312, 800}, /* ; 01 (320x350,640x350) */
1317    {1312, 800, 1312, 800}, /* ; 02 (360x400,720x400) */
1318    {1312, 800, 1312, 800}, /* ; 03 (720x350) */
1319    {1312, 800, 1312, 800}, /* ; 04 (320x240,640x480) */
1320    {1312, 800, 1312, 800}, /* ; 05 (400x300,800x600) */
1321    {1312, 800, 1312, 800}, /* ; 06 (512x384,1024x768) */
1322};
1323
1324static struct SiS_LVDSData XGI_LVDS1280x1024Data_1x75[] = {
1325    {1048, 442, 1688, 1066 }, /* ; 00 (320x200,320x400,640x200,640x400) */
1326    {1048, 392, 1688, 1066 }, /* ; 01 (320x350,640x350) */
1327    {1128, 442, 1688, 1066 }, /* ; 02 (360x400,720x400) */
1328    {1128, 392, 1688, 1066 }, /* ; 03 (720x350) */
1329    {1048, 522, 1688, 1066 }, /* ; 04 (320x240,640x480) */
1330    {1208, 642, 1688, 1066 }, /* ; 05 (400x300,800x600) */
1331    {1432, 810, 1688, 1066 }, /* ; 06 (512x384,1024x768) */
1332    {1688, 1066, 1688, 1066 }, /* ; 06; 07 (640x512,1280x1024) */
1333};
1334
1335static struct SiS_LVDSData XGI_LVDS1280x1024Data_2x75[] = {
1336    {1688, 1066, 1688, 1066 }, /* ; 00 (320x200,320x400,640x200,640x400) */
1337    {1688, 1066, 1688, 1066 }, /* ; 01 (320x350,640x350) */
1338    {1688, 1066, 1688, 1066 }, /* ; 02 (360x400,720x400) */
1339    {1688, 1066, 1688, 1066 }, /* ; 03 (720x350) */
1340    {1688, 1066, 1688, 1066 }, /* ; 04 (320x240,640x480) */
1341    {1688, 1066, 1688, 1066 }, /* ; 05 (400x300,800x600) */
1342    {1688, 1066, 1688, 1066 }, /* ; 06 (512x384,1024x768) */
1343    {1688, 1066, 1688, 1066 }, /* ; 06; 07 (640x512,1280x1024) */
1344};
1345
1346static struct SiS_LVDSData XGI_LVDSNoScalingDatax75[] = {
1347    { 800, 449, 800, 449}, /* ; 00 (320x200,320x400,640x200,640x400) */
1348    { 800, 449, 800, 449}, /* ; 01 (320x350,640x350) */
1349    { 900, 449, 900, 449}, /* ; 02 (360x400,720x400) */
1350    { 900, 449, 900, 449}, /* ; 03 (720x350) */
1351    { 800, 500, 800, 500}, /* ; 04 (640x480x75Hz) */
1352    {1056, 625, 1056, 625}, /* ; 05 (800x600x75Hz) */
1353    {1312, 800, 1312, 800}, /* ; 06 (1024x768x75Hz) */
1354    {1688, 1066, 1688, 1066}, /* ; 07 (1280x1024x75Hz) */
1355    {1688, 1066, 1688, 1066}, /* ; 08 (1400x1050x75Hz)
1356                     ;;[ycchen] 12/19/02 */
1357    {2160, 1250, 2160, 1250}, /* ; 09 (1600x1200x75Hz) */
1358    {1688, 806, 1688, 806}, /* ; 0A (1280x768x75Hz) */
1359};
1360
1361static struct SiS_LVDSData XGI_LVDS1024x768Des_1[] = {
1362    {0, 1048, 0, 771}, /* 00 (320x200,320x400,640x200,640x400) */
1363    {0, 1048, 0, 771}, /* 01 (320x350,640x350) */
1364    {0, 1048, 0, 771}, /* 02 (360x400,720x400) */
1365    {0, 1048, 0, 771}, /* 03 (720x350) */
1366    {0, 1048, 0, 771}, /* 04 (640x480x60Hz) */
1367    {0, 1048, 0, 771}, /* 05 (800x600x60Hz) */
1368    {0, 1048, 805, 770} /* 06 (1024x768x60Hz) */
1369} ;
1370
1371static struct SiS_LVDSData XGI_LVDS1024x768Des_2[] = {
1372    {1142, 856, 622, 587}, /* 00 (320x200,320x400,640x200,640x400) */
1373    {1142, 856, 597, 562}, /* 01 (320x350,640x350) */
1374    {1142, 856, 622, 587}, /* 02 (360x400,720x400) */
1375    {1142, 856, 597, 562}, /* 03 (720x350) */
1376    {1142, 1048, 722, 687}, /* 04 (640x480x60Hz) */
1377    {1232, 936, 722, 687}, /* 05 (800x600x60Hz) */
1378    { 0, 1048, 805, 771} /* 06 (1024x768x60Hz) */
1379};
1380
1381static struct SiS_LVDSData XGI_LVDS1024x768Des_3[] = {
1382    {320, 24, 622, 587}, /* 00 (320x200,320x400,640x200,640x400) */
1383    {320, 24, 597, 562}, /* 01 (320x350,640x350) */
1384    {320, 24, 622, 587}, /* 02 (360x400,720x400) */
1385    {320, 24, 597, 562}, /* 03 (720x350) */
1386    {320, 24, 722, 687} /* 04 (640x480x60Hz) */
1387};
1388
1389static struct SiS_LVDSData XGI_LVDS1280x1024Des_1[] = {
1390    {0, 1328, 0, 1025}, /* 00 (320x200,320x400,640x200,640x400) */
1391    {0, 1328, 0, 1025}, /* 01 (320x350,640x350) */
1392    {0, 1328, 0, 1025}, /* 02 (360x400,720x400) */
1393    {0, 1328, 0, 1025}, /* 03 (720x350) */
1394    {0, 1328, 0, 1025}, /* 04 (640x480x60Hz) */
1395    {0, 1328, 0, 1025}, /* 05 (800x600x60Hz) */
1396    {0, 1328, 0, 1025}, /* 06 (1024x768x60Hz) */
1397    {0, 1328, 1065, 1024} /* 07 (1280x1024x60Hz) */
1398};
1399
1400 /* The Display setting for DE Mode Panel */
1401static struct SiS_LVDSData XGI_LVDS1280x1024Des_2[] = {
1402    {1368, 1008, 752, 711}, /* 00 (320x200,320x400,640x200,640x400) */
1403    {1368, 1008, 729, 688}, /* 01 (320x350,640x350) */
1404    {1408, 1048, 752, 711}, /* 02 (360x400,720x400) */
1405    {1408, 1048, 729, 688}, /* 03 (720x350) */
1406    {1368, 1008, 794, 753}, /* 04 (640x480x60Hz) */
1407    {1448, 1068, 854, 813}, /* 05 (800x600x60Hz) */
1408    {1560, 1200, 938, 897}, /* 06 (1024x768x60Hz) */
1409    {0000, 1328, 0, 1025} /* 07 (1280x1024x60Hz) */
1410};
1411
1412static struct SiS_LVDSData XGI_LVDS1400x1050Des_1[] = {
1413    {0, 1448, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
1414    {0, 1448, 0, 1051}, /* 01 (320x350,640x350) */
1415    {0, 1448, 0, 1051}, /* 02 (360x400,720x400) */
1416    {0, 1448, 0, 1051}, /* 03 (720x350) */
1417    {0, 1448, 0, 1051}, /* 04 (640x480x60Hz) */
1418    {0, 1448, 0, 1051}, /* 05 (800x600x60Hz) */
1419    {0, 1448, 0, 1051}, /* 06 (1024x768x60Hz) */
1420    {0, 1448, 0, 1051}, /* 07 (1280x1024x60Hz) */
1421    {0, 1448, 0, 1051} /* 08 (1400x1050x60Hz) */
1422};
1423
1424static struct SiS_LVDSData XGI_LVDS1400x1050Des_2[] = {
1425    {1308, 1068, 781, 766}, /* 00 (320x200,320x400,640x200,640x400) */
1426    {1308, 1068, 781, 766}, /* 01 (320x350,640x350) */
1427    {1308, 1068, 781, 766}, /* 02 (360x400,720x400) */
1428    {1308, 1068, 781, 766}, /* 03 (720x350) */
1429    {1308, 1068, 781, 766}, /* 04 (640x480x60Hz) */
1430    {1388, 1148, 841, 826}, /* 05 (800x600x60Hz) */
1431    {1490, 1250, 925, 910}, /* 06 (1024x768x60Hz) */
1432    {1608, 1368, 1053, 1038}, /* 07 (1280x1024x60Hz) */
1433    { 0, 1448, 0, 1051} /* 08 (1400x1050x60Hz) */
1434};
1435
1436static struct SiS_LVDSData XGI_LVDS1600x1200Des_1[] = {
1437    {0, 1664, 0, 1201}, /* 00 (320x200,320x400,640x200,640x400) */
1438    {0, 1664, 0, 1201}, /* 01 (320x350,640x350) */
1439    {0, 1664, 0, 1201}, /* 02 (360x400,720x400) */
1440    {0, 1664, 0, 1201}, /* 03 (720x350) */
1441    {0, 1664, 0, 1201}, /* 04 (640x480x60Hz) */
1442    {0, 1664, 0, 1201}, /* 05 (800x600x60Hz) */
1443    {0, 1664, 0, 1201}, /* 06 (1024x768x60Hz) */
1444    {0, 1664, 0, 1201}, /* 07 (1280x1024x60Hz) */
1445    {0, 1664, 0, 1201}, /* 08 (1400x1050x60Hz) */
1446    {0, 1664, 0, 1201} /* 09 (1600x1200x60Hz) */
1447};
1448
1449static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesData[] = {
1450    {0, 648, 448, 405, 96, 2}, /* 00 (320x200,320x400,
1451                          640x200,640x400) */
1452    {0, 648, 448, 355, 96, 2}, /* 01 (320x350,640x350) */
1453    {0, 648, 448, 405, 96, 2}, /* 02 (360x400,720x400) */
1454    {0, 648, 448, 355, 96, 2}, /* 03 (720x350) */
1455    {0, 648, 1, 483, 96, 2}, /* 04 (640x480x60Hz) */
1456    {0, 840, 627, 600, 128, 4}, /* 05 (800x600x60Hz) */
1457    {0, 1048, 805, 770, 136, 6}, /* 06 (1024x768x60Hz) */
1458    {0, 1328, 0, 1025, 112, 3}, /* 07 (1280x1024x60Hz) */
1459    {0, 1438, 0, 1051, 112, 3}, /* 08 (1400x1050x60Hz)*/
1460    {0, 1664, 0, 1201, 192, 3}, /* 09 (1600x1200x60Hz) */
1461    {0, 1328, 0, 0771, 112, 6} /* 0A (1280x768x60Hz) */
1462};
1463
1464/* ; 1024x768 Full-screen */
1465static struct SiS_LVDSData XGI_LVDS1024x768Des_1x75[] = {
1466    {0, 1040, 0, 769}, /* ; 00 (320x200,320x400,640x200,640x400) */
1467    {0, 1040, 0, 769}, /* ; 01 (320x350,640x350) */
1468    {0, 1040, 0, 769}, /* ; 02 (360x400,720x400) */
1469    {0, 1040, 0, 769}, /* ; 03 (720x350) */
1470    {0, 1040, 0, 769}, /* ; 04 (640x480x75Hz) */
1471    {0, 1040, 0, 769}, /* ; 05 (800x600x75Hz) */
1472    {0, 1040, 0, 769} /* ; 06 (1024x768x75Hz) */
1473};
1474
1475/* ; 1024x768 center-screen (Enh. Mode) */
1476static struct SiS_LVDSData XGI_LVDS1024x768Des_2x75[] = {
1477    {1142, 856, 622, 587}, /* 00 (320x200,320x400,640x200,640x400) */
1478    {1142, 856, 597, 562}, /* 01 (320x350,640x350) */
1479    {1142, 856, 622, 587}, /* 02 (360x400,720x400) */
1480    {1142, 856, 597, 562}, /* 03 (720x350) */
1481    {1142, 1048, 722, 687}, /* 04 (640x480x60Hz) */
1482    {1232, 936, 722, 687}, /* 05 (800x600x60Hz) */
1483    { 0, 1048, 805, 771} /* 06 (1024x768x60Hz) */
1484};
1485
1486/* ; 1024x768 center-screen (St.Mode) */
1487static struct SiS_LVDSData XGI_LVDS1024x768Des_3x75[] = {
1488    {320, 24, 622, 587}, /* ; 00 (320x200,320x400,640x200,640x400) */
1489    {320, 24, 597, 562}, /* ; 01 (320x350,640x350) */
1490    {320, 24, 622, 587}, /* ; 02 (360x400,720x400) */
1491    {320, 24, 597, 562}, /* ; 03 (720x350) */
1492    {320, 24, 722, 687} /* ; 04 (640x480x60Hz) */
1493};
1494
1495static struct SiS_LVDSData XGI_LVDS1280x1024Des_1x75[] = {
1496    {0, 1296, 0, 1025}, /* ; 00 (320x200,320x400,640x200,640x400) */
1497    {0, 1296, 0, 1025}, /* ; 01 (320x350,640x350) */
1498    {0, 1296, 0, 1025}, /* ; 02 (360x400,720x400) */
1499    {0, 1296, 0, 1025}, /* ; 03 (720x350) */
1500    {0, 1296, 0, 1025}, /* ; 04 (640x480x75Hz) */
1501    {0, 1296, 0, 1025}, /* ; 05 (800x600x75Hz) */
1502    {0, 1296, 0, 1025}, /* ; 06 (1024x768x75Hz) */
1503    {0, 1296, 0, 1025} /* ; 07 (1280x1024x75Hz) */
1504};
1505
1506/* The Display setting for DE Mode Panel */
1507/* Set DE as default */
1508static struct SiS_LVDSData XGI_LVDS1280x1024Des_2x75[] = {
1509    {1368, 976, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */
1510    {1368, 976, 729, 688}, /* ; 01 (320x350,640x350) */
1511    {1408, 976, 752, 711}, /* ; 02 (360x400,720x400) */
1512    {1408, 976, 729, 688}, /* ; 03 (720x350) */
1513    {1368, 976, 794, 753}, /* ; 04 (640x480x75Hz) */
1514    {1448, 1036, 854, 813}, /* ; 05 (800x600x75Hz) */
1515    {1560, 1168, 938, 897}, /* ; 06 (1024x768x75Hz) */
1516    { 0, 1296, 0, 1025} /* ; 07 (1280x1024x75Hz) */
1517};
1518
1519/* Scaling LCD 75Hz */
1520static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesDatax75[] = {
1521    {0, 648, 448, 405, 96, 2}, /* ; 00 (320x200,320x400,
1522                           640x200,640x400) */
1523    {0, 648, 448, 355, 96, 2}, /* ; 01 (320x350,640x350) */
1524    {0, 729, 448, 405, 108, 2}, /* ; 02 (360x400,720x400) */
1525    {0, 729, 448, 355, 108, 2}, /* ; 03 (720x350) */
1526    {0, 656, 0, 481, 64, 3}, /* ; 04 (640x480x75Hz) */
1527    {0, 816, 0, 601, 80, 3}, /* ; 05 (800x600x75Hz) */
1528    {0, 1040, 0, 769, 96, 3}, /* ; 06 (1024x768x75Hz) */
1529    {0, 1296, 0, 1025, 144, 3}, /* ; 07 (1280x1024x75Hz) */
1530    {0, 1448, 0, 1051, 112, 3}, /* ; 08 (1400x1050x75Hz) */
1531    {0, 1664, 0, 1201, 192, 3}, /* ; 09 (1600x1200x75Hz) */
1532    {0, 1328, 0, 771, 112, 6} /* ; 0A (1280x768x75Hz) */
1533};
1534
1535static struct SiS_LVDSData XGI_CHTVUNTSCData[] = {
1536    { 840, 600, 840, 600},
1537    { 840, 600, 840, 600},
1538    { 840, 600, 840, 600},
1539    { 840, 600, 840, 600},
1540    { 784, 600, 784, 600},
1541    {1064, 750, 1064, 750}
1542};
1543
1544static struct SiS_LVDSData XGI_CHTVONTSCData[] = {
1545    { 840, 525, 840, 525},
1546    { 840, 525, 840, 525},
1547    { 840, 525, 840, 525},
1548    { 840, 525, 840, 525},
1549    { 784, 525, 784, 525},
1550    {1040, 700, 1040, 700}
1551};
1552
1553static struct SiS_LVDSData XGI_CHTVUPALData[] = {
1554    {1008, 625, 1008, 625},
1555    {1008, 625, 1008, 625},
1556    {1008, 625, 1008, 625},
1557    {1008, 625, 1008, 625},
1558    { 840, 750, 840, 750},
1559    { 936, 836, 936, 836}
1560};
1561
1562static struct SiS_LVDSData XGI_CHTVOPALData[] = {
1563    {1008, 625, 1008, 625},
1564    {1008, 625, 1008, 625},
1565    {1008, 625, 1008, 625},
1566    {1008, 625, 1008, 625},
1567    {840, 625, 840, 625},
1568    {960, 750, 960, 750}
1569};
1570
1571/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1572static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_H[] = {
1573    { {0x4B, 0x27, 0x8F, 0x32, 0x1B, 0x00, 0x45, 0x00} }, /* 00 (320x) */
1574    { {0x4B, 0x27, 0x8F, 0x2B, 0x03, 0x00, 0x44, 0x00} }, /* 01 (360x) */
1575    { {0x55, 0x31, 0x99, 0x46, 0x1D, 0x00, 0x55, 0x00} }, /* 02 (400x) */
1576    { {0x63, 0x3F, 0x87, 0x4A, 0x93, 0x00, 0x01, 0x00} }, /* 03 (512x) */
1577    { {0x73, 0x4F, 0x97, 0x55, 0x86, 0x00, 0x05, 0x00} }, /* 04 (640x) */
1578    { {0x73, 0x4F, 0x97, 0x55, 0x86, 0x00, 0x05, 0x00} }, /* 05 (720x) */
1579    { {0x87, 0x63, 0x8B, 0x69, 0x1A, 0x00, 0x26, 0x00} }, /* 06 (800x) */
1580    { {0xA3, 0x7F, 0x87, 0x86, 0x97, 0x00, 0x02, 0x00} } /* 07 (1024x) */
1581};
1582
1583/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1584static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_H[] = {
1585    { {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00 } }, /* 00 (320x) */
1586    { {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00 } }, /* 01 (360x) */
1587    { {0x60, 0x31, 0x84, 0x3A, 0x88, 0x00, 0x01, 0x00 } }, /* 02 (400x) */
1588    { {0x6E, 0x3F, 0x92, 0x48, 0x96, 0x00, 0x01, 0x00 } }, /* 03 (512x) */
1589    { {0x7E, 0x4F, 0x82, 0x58, 0x06, 0x00, 0x06, 0x00 } }, /* 04 (640x) */
1590    { {0x7E, 0x4F, 0x82, 0x58, 0x06, 0x00, 0x06, 0x00 } }, /* 05 (720x) */
1591    { {0x92, 0x63, 0x96, 0x6C, 0x1A, 0x00, 0x06, 0x00 } }, /* 06 (800x) */
1592    { {0xAE, 0x7F, 0x92, 0x88, 0x96, 0x00, 0x02, 0x00 } }, /* 07 (1024x) */
1593    { {0xCE, 0x9F, 0x92, 0xA8, 0x16, 0x00, 0x07, 0x00 } } /* 08 (1280x) */
1594};
1595
1596/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1597static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_H[] = {
1598    { {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} }, /* 00 (320x) */
1599    { {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} }, /* 01 (360x) */
1600    { {0x63, 0x31, 0x87, 0x3D, 0x8E, 0x00, 0x01, 0x00} }, /* 02 (400x) */
1601    { {0x63, 0x3F, 0x87, 0x45, 0x96, 0x00, 0x01, 0x00} }, /* 03 (512x) */
1602    { {0xA3, 0x4F, 0x87, 0x6E, 0x9F, 0x00, 0x06, 0x00} }, /* 04 (640x) */
1603    { {0xA3, 0x4F, 0x87, 0x6E, 0x9F, 0x00, 0x06, 0x00} }, /* 05 (720x) */
1604    { {0xA3, 0x63, 0x87, 0x78, 0x89, 0x00, 0x02, 0x00} }, /* 06 (800x) */
1605    { {0xA3, 0x7F, 0x87, 0x86, 0x97, 0x00, 0x02, 0x00} } /* 07 (1024x) */
1606};
1607
1608/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1609static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_H[] = {
1610    { {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} }, /* 00 (320x) */
1611    { {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} }, /* 01 (360x) */
1612    { {0x7E, 0x40, 0x84, 0x49, 0x91, 0x00, 0x01, 0x00} }, /* 02 (400x) */
1613    { {0x7E, 0x47, 0x93, 0x50, 0x9E, 0x00, 0x01, 0x00} }, /* 03 (512x) */
1614    { {0xCE, 0x77, 0x8A, 0x80, 0x8E, 0x00, 0x02, 0x00} }, /* 04 (640x) */
1615    { {0xCE, 0x77, 0x8A, 0x80, 0x8E, 0x00, 0x02, 0x00} }, /* 05 (720x) */
1616    { {0xCE, 0x81, 0x94, 0x8A, 0x98, 0x00, 0x02, 0x00} }, /* 06 (800x) */
1617    { {0xCE, 0x8F, 0x82, 0x98, 0x06, 0x00, 0x07, 0x00} }, /* 07 (1024x) */
1618    { {0xCE, 0x9F, 0x92, 0xA8, 0x16, 0x00, 0x07, 0x00} } /* 08 (1280x) */
1619};
1620
1621/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1622static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_1_H[] = {
1623    { {0x47, 0x27, 0x8B, 0x2C, 0x1A, 0x00, 0x05, 0x00} }, /* 00 (320x) */
1624    { {0x47, 0x27, 0x8B, 0x30, 0x1E, 0x00, 0x05, 0x00} }, /* 01 (360x) */
1625    { {0x51, 0x31, 0x95, 0x36, 0x04, 0x00, 0x01, 0x00} }, /* 02 (400x) */
1626    { {0x5F, 0x3F, 0x83, 0x44, 0x92, 0x00, 0x01, 0x00} }, /* 03 (512x) */
1627    { {0x6F, 0x4F, 0x93, 0x54, 0x82, 0x00, 0x05, 0x00} }, /* 04 (640x) */
1628    { {0x6F, 0x4F, 0x93, 0x54, 0x82, 0x00, 0x05, 0x00} }, /* 05 (720x) */
1629    { {0x83, 0x63, 0x87, 0x68, 0x16, 0x00, 0x06, 0x00} }, /* 06 (800x) */
1630    { {0x9F, 0x7F, 0x83, 0x84, 0x92, 0x00, 0x02, 0x00} }, /* 07 (1024x) */
1631    { {0xBF, 0x9F, 0x83, 0xA4, 0x12, 0x00, 0x07, 0x00} }, /* 08 (1280x) */
1632    { {0xCE, 0xAE, 0x92, 0xB3, 0x01, 0x00, 0x03, 0x00} } /* 09 (1400x) */
1633};
1634
1635/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1636static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_2_H[] = {
1637    { {0x76, 0x3F, 0x83, 0x45, 0x8C, 0x00, 0x41, 0x00} }, /* 00 (320x) */
1638    { {0x76, 0x3F, 0x83, 0x45, 0x8C, 0x00, 0x41, 0x00} }, /* 01 (360x) */
1639    { {0x76, 0x31, 0x9A, 0x48, 0x9F, 0x00, 0x41, 0x00} }, /* 02 (400x) */
1640    { {0x76, 0x3F, 0x9A, 0x4F, 0x96, 0x00, 0x41, 0x00} }, /* 03 (512x) */
1641    { {0xCE, 0x7E, 0x82, 0x87, 0x9E, 0x00, 0x02, 0x00} }, /* 04 (640x) */
1642    { {0xCE, 0x7E, 0x82, 0x87, 0x9E, 0x00, 0x02, 0x00} }, /* 05 (720x) */
1643    { {0xCE, 0x63, 0x92, 0x96, 0x04, 0x00, 0x07, 0x00} }, /* 06 (800x) */
1644    { {0xCE, 0x7F, 0x92, 0xA4, 0x12, 0x00, 0x07, 0x00} }, /* 07 (1024x) */
1645    { {0xCE, 0x9F, 0x92, 0xB4, 0x02, 0x00, 0x03, 0x00} }, /* 08 (1280x) */
1646    { {0xCE, 0xAE, 0x92, 0xBC, 0x0A, 0x00, 0x03, 0x00} } /* 09 (1400x) */
1647};
1648
1649/* ;302lv channelA [ycchen] 12/05/02 LCDHT=2048 */
1650/* ; CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1651static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11600x1200_1_H[] = {
1652    { {0x5B, 0x27, 0x9F, 0x32, 0x0A, 0x00, 0x01, 0x00} }, /* 00 (320x) */
1653    { {0x5B, 0x27, 0x9F, 0x32, 0x0A, 0x00, 0x01, 0x00} }, /* 01 (360x) */
1654    { {0x65, 0x31, 0x89, 0x3C, 0x94, 0x00, 0x01, 0x00} }, /* 02 (400x) */
1655    { {0x73, 0x3F, 0x97, 0x4A, 0x82, 0x00, 0x05, 0x00} }, /* 03 (512x) */
1656    { {0x83, 0x4F, 0x87, 0x51, 0x09, 0x00, 0x06, 0x00} }, /* 04 (640x) */
1657    { {0x83, 0x4F, 0x87, 0x51, 0x09, 0x00, 0x06, 0x00} }, /* 05 (720x) */
1658    { {0x97, 0x63, 0x9B, 0x65, 0x1D, 0x00, 0x06, 0xF0} }, /* 06 (800x) */
1659    { {0xB3, 0x7F, 0x97, 0x81, 0x99, 0x00, 0x02, 0x00} }, /* 07 (1024x) */
1660    { {0xD3, 0x9F, 0x97, 0xA1, 0x19, 0x00, 0x07, 0x00} }, /* 08 (1280x) */
1661    { {0xE2, 0xAE, 0x86, 0xB9, 0x91, 0x00, 0x03, 0x00} }, /* 09 (1400x) */
1662    { {0xFB, 0xC7, 0x9F, 0xC9, 0x81, 0x00, 0x07, 0x00} } /* 0A (1600x) */
1663};
1664
1665/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
1666static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_V[] = {
1667    { {0x97, 0x1F, 0x60, 0x87, 0x5D, 0x83, 0x10} }, /* 00 (x350) */
1668    { {0xB4, 0x1F, 0x92, 0x89, 0x8F, 0xB5, 0x30} }, /* 01 (x400) */
1669    { {0x04, 0x3E, 0xE2, 0x89, 0xDF, 0x05, 0x00} }, /* 02 (x480) */
1670    { {0x7C, 0xF0, 0x5A, 0x8F, 0x57, 0x7D, 0xA0} }, /* 03 (x600) */
1671    { {0x24, 0xF5, 0x02, 0x88, 0xFF, 0x25, 0x90} } /* 04 (x768) */
1672};
1673
1674/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1675static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_V[] = {
1676    { {0x24, 0xBB, 0x31, 0x87, 0x5D, 0x25, 0x30} }, /* 00 (x350) */
1677    { {0x24, 0xBB, 0x4A, 0x80, 0x8F, 0x25, 0x30} }, /* 01 (x400) */
1678    { {0x24, 0xBB, 0x72, 0x88, 0xDF, 0x25, 0x30} }, /* 02 (x480) */
1679    { {0x24, 0xF1, 0xAE, 0x84, 0x57, 0x25, 0xB0} }, /* 03 (x600) */
1680    { {0x24, 0xF5, 0x02, 0x88, 0xFF, 0x25, 0x90} } /* 04 (x768) */
1681};
1682
1683/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1684static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_V[] = {
1685    { {0x86, 0x1F, 0x5E, 0x82, 0x5D, 0x87, 0x00} }, /* 00 (x350) */
1686    { {0xB8, 0x1F, 0x90, 0x84, 0x8F, 0xB9, 0x30} }, /* 01 (x400) */
1687    { {0x08, 0x3E, 0xE0, 0x84, 0xDF, 0x09, 0x00} }, /* 02 (x480) */
1688    { {0x80, 0xF0, 0x58, 0x8C, 0x57, 0x81, 0xA0} }, /* 03 (x600) */
1689    { {0x28, 0xF5, 0x00, 0x84, 0xFF, 0x29, 0x90} }, /* 04 (x768) */
1690    { {0x28, 0x5A, 0x13, 0x87, 0xFF, 0x29, 0xA9} } /* 05 (x1024) */
1691};
1692
1693/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1694static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_V[] = {
1695    { {0x28, 0xD2, 0xAF, 0x83, 0xAE, 0xD8, 0xA1} }, /* 00 (x350) */
1696    { {0x28, 0xD2, 0xC8, 0x8C, 0xC7, 0xF2, 0x81} }, /* 01 (x400) */
1697    { {0x28, 0xD2, 0xF0, 0x84, 0xEF, 0x1A, 0xB1} }, /* 02 (x480) */
1698    { {0x28, 0xDE, 0x2C, 0x8F, 0x2B, 0x56, 0x91} }, /* 03 (x600) */
1699    { {0x28, 0xDE, 0x80, 0x83, 0x7F, 0xAA, 0x91} }, /* 04 (x768) */
1700    { {0x28, 0x5A, 0x13, 0x87, 0xFF, 0x29, 0xA9} } /* 05 (x1024) */
1701};
1702
1703/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1704static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_1_V[] = {
1705    { {0x6C, 0x1F, 0x60, 0x84, 0x5D, 0x6D, 0x10} }, /* 00 (x350) */
1706    { {0x9E, 0x1F, 0x93, 0x86, 0x8F, 0x9F, 0x30} }, /* 01 (x400) */
1707    { {0xEE, 0x1F, 0xE2, 0x86, 0xDF, 0xEF, 0x10} }, /* 02 (x480) */
1708    { {0x66, 0xF0, 0x5A, 0x8e, 0x57, 0x67, 0xA0} }, /* 03 (x600) */
1709    { {0x0E, 0xF5, 0x02, 0x86, 0xFF, 0x0F, 0x90} }, /* 04 (x768) */
1710    { {0x0E, 0x5A, 0x02, 0x86, 0xFF, 0x0F, 0x89} }, /* 05 (x1024) */
1711    { {0x28, 0x10, 0x1A, 0x80, 0x19, 0x29, 0x0F} } /* 06 (x1050) */
1712};
1713
1714/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1715static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_2_V[] = {
1716    { {0x28, 0x92, 0xB6, 0x83, 0xB5, 0xCF, 0x81} }, /* 00 (x350) */
1717    { {0x28, 0x92, 0xD5, 0x82, 0xD4, 0xEE, 0x81} }, /* 01 (x400) */
1718    { {0x28, 0x92, 0xFD, 0x8A, 0xFC, 0x16, 0xB1} }, /* 02 (x480) */
1719    { {0x28, 0xD4, 0x39, 0x86, 0x57, 0x29, 0x81} }, /* 03 (x600) */
1720    { {0x28, 0xD4, 0x8D, 0x9A, 0xFF, 0x29, 0xA1} }, /* 04 (x768) */
1721    { {0x28, 0x5A, 0x0D, 0x9A, 0xFF, 0x29, 0xA9} }, /* 05 (x1024) */
1722    { {0x28, 0x10, 0x1A, 0x87, 0x19, 0x29, 0x8F} } /* 06 (x1050) */
1723};
1724
1725/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
1726static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11600x1200_1_V[] = {
1727    { {0xd4, 0x1F, 0x81, 0x84, 0x5D, 0xd5, 0x10} }, /* 00 (x350) */
1728    { {0x06, 0x3e, 0xb3, 0x86, 0x8F, 0x07, 0x20} }, /* 01 (x400) */
1729    { {0x56, 0xba, 0x03, 0x86, 0xDF, 0x57, 0x00} }, /* 02 (x480) */
1730    { {0xce, 0xF0, 0x7b, 0x8e, 0x57, 0xcf, 0xa0} }, /* 03 (x600) */
1731    { {0x76, 0xF5, 0x23, 0x86, 0xFF, 0x77, 0x90} }, /* 04 (x768) */
1732    { {0x76, 0x5A, 0x23, 0x86, 0xFF, 0x77, 0x89} }, /* 05 (x1024) */
1733    { {0x90, 0x10, 0x1A, 0x8E, 0x19, 0x91, 0x2F} }, /* 06 (x1050) */
1734    { {0x26, 0x11, 0xd3, 0x86, 0xaF, 0x27, 0x3f} } /* 07 (x1200) */
1735};
1736
1737/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1738static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_Hx75[] = {
1739    { {0x4B, 0x27, 0x8F, 0x32, 0x1B, 0x00, 0x45, 0x00} },/* ; 00 (320x) */
1740    { {0x4B, 0x27, 0x8F, 0x2B, 0x03, 0x00, 0x44, 0x00} },/* ; 01 (360x) */
1741    { {0x55, 0x31, 0x99, 0x46, 0x1D, 0x00, 0x55, 0x00} },/* ; 02 (400x) */
1742    { {0x63, 0x3F, 0x87, 0x4A, 0x93, 0x00, 0x01, 0x00} },/* ; 03 (512x) */
1743    { {0x6F, 0x4F, 0x93, 0x54, 0x80, 0x00, 0x05, 0x00} },/* ; 04 (640x) */
1744    { {0x6F, 0x4F, 0x93, 0x54, 0x80, 0x00, 0x05, 0x00} },/* ; 05 (720x) */
1745    { {0x83, 0x63, 0x87, 0x68, 0x14, 0x00, 0x26, 0x00} },/* ; 06 (800x) */
1746    { {0x9F, 0x7F, 0x83, 0x85, 0x91, 0x00, 0x02, 0x00} } /* ; 07 (1024x) */
1747};
1748
1749/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
1750static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_Vx75[] = {
1751    { {0x97, 0x1F, 0x60, 0x87, 0x5D, 0x83, 0x10} },/* ; 00 (x350) */
1752    { {0xB4, 0x1F, 0x92, 0x89, 0x8F, 0xB5, 0x30} },/* ; 01 (x400) */
1753    { {0xFE, 0x1F, 0xE0, 0x84, 0xDF, 0xFF, 0x10} },/* ; 02 (x480) */
1754    { {0x76, 0xF0, 0x58, 0x8C, 0x57, 0x77, 0xA0} },/* ; 03 (x600) */
1755    { {0x1E, 0xF5, 0x00, 0x83, 0xFF, 0x1F, 0x90} } /* ; 04 (x768) */
1756};
1757
1758/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1759static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_Hx75[] = {
1760    { {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} },/* ; 00 (320x) */
1761    { {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} },/* ; 01 (360x) */
1762    { {0x63, 0x31, 0x87, 0x3D, 0x8E, 0x00, 0x01, 0x00} },/* ; 02 (400x) */
1763    { {0x63, 0x3F, 0x87, 0x45, 0x96, 0x00, 0x01, 0x00} },/* ; 03 (512x) */
1764    { {0xA3, 0x4F, 0x87, 0x6E, 0x9F, 0x00, 0x06, 0x00} },/* ; 04 (640x) */
1765    { {0xA3, 0x4F, 0x87, 0x6E, 0x9F, 0x00, 0x06, 0x00} },/* ; 05 (720x) */
1766    { {0xA3, 0x63, 0x87, 0x78, 0x89, 0x00, 0x02, 0x00} },/* ; 06 (800x) */
1767    { {0xA3, 0x7F, 0x87, 0x86, 0x97, 0x00, 0x02, 0x00} } /* ; 07 (1024x) */
1768};
1769
1770/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1771static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_Vx75[] = {
1772    { {0x24, 0xBB, 0x31, 0x87, 0x5D, 0x25, 0x30} },/* ; 00 (x350) */
1773    { {0x24, 0xBB, 0x4A, 0x80, 0x8F, 0x25, 0x30} },/* ; 01 (x400) */
1774    { {0x24, 0xBB, 0x72, 0x88, 0xDF, 0x25, 0x30} },/* ; 02 (x480) */
1775    { {0x24, 0xF1, 0xAE, 0x84, 0x57, 0x25, 0xB0} },/* ; 03 (x600) */
1776    { {0x24, 0xF5, 0x02, 0x88, 0xFF, 0x25, 0x90} } /* ; 04 (x768) */
1777};
1778
1779/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1780static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_Hx75[] = {
1781    { {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00} },/* ; 00 (320x) */
1782    { {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00} },/* ; 01 (360x) */
1783    { {0x60, 0x31, 0x84, 0x3A, 0x88, 0x00, 0x01, 0x00} },/* ; 02 (400x) */
1784    { {0x6E, 0x3F, 0x92, 0x48, 0x96, 0x00, 0x01, 0x00} },/* ; 03 (512x) */
1785    { {0x7E, 0x4F, 0x82, 0x54, 0x06, 0x00, 0x06, 0x00} },/* ; 04 (640x) */
1786    { {0x7E, 0x4F, 0x82, 0x54, 0x06, 0x00, 0x06, 0x00} },/* ; 05 (720x) */
1787    { {0x92, 0x63, 0x96, 0x68, 0x1A, 0x00, 0x06, 0x00} },/* ; 06 (800x) */
1788    { {0xAE, 0x7F, 0x92, 0x84, 0x96, 0x00, 0x02, 0x00} },/* ; 07 (1024x) */
1789    { {0xCE, 0x9F, 0x92, 0xA5, 0x17, 0x00, 0x07, 0x00} } /* ; 08 (1280x) */
1790};
1791
1792/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1793static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_Vx75[] = {
1794    { {0x86, 0xD1, 0xBC, 0x80, 0xBB, 0xE5, 0x00} },/* ; 00 (x350) */
1795    { {0xB8, 0x1F, 0x90, 0x84, 0x8F, 0xB9, 0x30} },/* ; 01 (x400) */
1796    { {0x08, 0x3E, 0xE0, 0x84, 0xDF, 0x09, 0x00} },/* ; 02 (x480) */
1797    { {0x80, 0xF0, 0x58, 0x8C, 0x57, 0x81, 0xA0} },/* ; 03 (x600) */
1798    { {0x28, 0xF5, 0x00, 0x84, 0xFF, 0x29, 0x90} },/* ; 04 (x768) */
1799    { {0x28, 0x5A, 0x13, 0x87, 0xFF, 0x29, 0xA9} } /* ; 05 (x1024) */
1800};
1801/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
1802static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_Hx75[] = {
1803    { {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} },/* ; 00 (320x) */
1804    { {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} },/* ; 01 (360x) */
1805    { {0x7E, 0x40, 0x84, 0x49, 0x91, 0x00, 0x01, 0x00} },/* ; 02 (400x) */
1806    { {0x7E, 0x47, 0x93, 0x50, 0x9E, 0x00, 0x01, 0x00} },/* ; 03 (512x) */
1807    { {0xCE, 0x77, 0x8A, 0x80, 0x8E, 0x00, 0x02, 0x00} },/* ; 04 (640x) */
1808    { {0xCE, 0x77, 0x8A, 0x80, 0x8E, 0x00, 0x02, 0x00} },/* ; 05 (720x) */
1809    { {0xCE, 0x81, 0x94, 0x8A, 0x98, 0x00, 0x02, 0x00} },/* ; 06 (800x) */
1810    { {0xCE, 0x8F, 0x82, 0x98, 0x06, 0x00, 0x07, 0x00} },/* ; 07 (1024x) */
1811    { {0xCE, 0x9F, 0x92, 0xA8, 0x16, 0x00, 0x07, 0x00} } /* ; 08 (1280x) */
1812};
1813
1814/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
1815static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_Vx75[] = {
1816    { {0x28, 0xD2, 0xAF, 0x83, 0xAE, 0xD8, 0xA1} },/* ; 00 (x350) */
1817    { {0x28, 0xD2, 0xC8, 0x8C, 0xC7, 0xF2, 0x81} },/* ; 01 (x400) */
1818    { {0x28, 0xD2, 0xF0, 0x84, 0xEF, 0x1A, 0xB1} },/* ; 02 (x480) */
1819    { {0x28, 0xDE, 0x2C, 0x8F, 0x2B, 0x56, 0x91} },/* ; 03 (x600) */
1820    { {0x28, 0xDE, 0x80, 0x83, 0x7F, 0xAA, 0x91} },/* ; 04 (x768) */
1821    { {0x28, 0x5A, 0x13, 0x87, 0xFF, 0x29, 0xA9} } /* ; 05 (x1024) */
1822};
1823
1824/*add for new UNIVGABIOS*/
1825static struct XGI330_LCDDataTablStruct XGI_LCDDataTable[] = {
1826    {Panel_1024x768, 0x0019, 0x0001, 0}, /* XGI_ExtLCD1024x768Data */
1827    {Panel_1024x768, 0x0019, 0x0000, 1}, /* XGI_StLCD1024x768Data */
1828    {Panel_1024x768, 0x0018, 0x0010, 2}, /* XGI_CetLCD1024x768Data */
1829    {Panel_1280x1024, 0x0019, 0x0001, 3}, /* XGI_ExtLCD1280x1024Data */
1830    {Panel_1280x1024, 0x0019, 0x0000, 4}, /* XGI_StLCD1280x1024Data */
1831    {Panel_1280x1024, 0x0018, 0x0010, 5}, /* XGI_CetLCD1280x1024Data */
1832    {Panel_1400x1050, 0x0019, 0x0001, 6}, /* XGI_ExtLCD1400x1050Data */
1833    {Panel_1400x1050, 0x0019, 0x0000, 7}, /* XGI_StLCD1400x1050Data */
1834    {Panel_1400x1050, 0x0018, 0x0010, 8}, /* XGI_CetLCD1400x1050Data */
1835    {Panel_1600x1200, 0x0019, 0x0001, 9}, /* XGI_ExtLCD1600x1200Data */
1836    {Panel_1600x1200, 0x0019, 0x0000, 10}, /* XGI_StLCD1600x1200Data */
1837    {PanelRef60Hz, 0x0008, 0x0008, 11}, /* XGI_NoScalingData */
1838    {Panel_1024x768x75, 0x0019, 0x0001, 12}, /* XGI_ExtLCD1024x768x75Data */
1839    {Panel_1024x768x75, 0x0019, 0x0000, 13}, /* XGI_StLCD1024x768x75Data */
1840    {Panel_1024x768x75, 0x0018, 0x0010, 14}, /* XGI_CetLCD1024x768x75Data */
1841    /* XGI_ExtLCD1280x1024x75Data */
1842    {Panel_1280x1024x75, 0x0019, 0x0001, 15},
1843    /* XGI_StLCD1280x1024x75Data */
1844    {Panel_1280x1024x75, 0x0019, 0x0000, 16},
1845    /* XGI_CetLCD1280x1024x75Data */
1846    {Panel_1280x1024x75, 0x0018, 0x0010, 17},
1847    {PanelRef75Hz, 0x0008, 0x0008, 18}, /* XGI_NoScalingDatax75 */
1848    {0xFF, 0x0000, 0x0000, 0} /* End of table */
1849};
1850
1851static struct XGI330_LCDDataTablStruct XGI_LCDDesDataTable[] = {
1852    {Panel_1024x768, 0x0019, 0x0001, 0}, /* XGI_ExtLCDDes1024x768Data */
1853    {Panel_1024x768, 0x0019, 0x0000, 1}, /* XGI_StLCDDes1024x768Data */
1854    {Panel_1024x768, 0x0018, 0x0010, 2}, /* XGI_CetLCDDes1024x768Data */
1855    {Panel_1280x1024, 0x0019, 0x0001, 3}, /* XGI_ExtLCDDes1280x1024Data */
1856    {Panel_1280x1024, 0x0019, 0x0000, 4}, /* XGI_StLCDDes1280x1024Data */
1857    {Panel_1280x1024, 0x0018, 0x0010, 5}, /* XGI_CetLCDDes1280x1024Data */
1858    {Panel_1400x1050, 0x0019, 0x0001, 6}, /* XGI_ExtLCDDes1400x1050Data */
1859    {Panel_1400x1050, 0x0019, 0x0000, 7}, /* XGI_StLCDDes1400x1050Data */
1860    {Panel_1400x1050, 0x0418, 0x0010, 8}, /* XGI_CetLCDDes1400x1050Data */
1861    {Panel_1400x1050, 0x0418, 0x0410, 9}, /* XGI_CetLCDDes1400x1050Data2 */
1862    {Panel_1600x1200, 0x0019, 0x0001, 10}, /* XGI_ExtLCDDes1600x1200Data */
1863    {Panel_1600x1200, 0x0019, 0x0000, 11}, /* XGI_StLCDDes1600x1200Data */
1864    {PanelRef60Hz, 0x0008, 0x0008, 12}, /* XGI_NoScalingDesData */
1865    /* XGI_ExtLCDDes1024x768x75Data */
1866    {Panel_1024x768x75, 0x0019, 0x0001, 13},
1867    /* XGI_StLCDDes1024x768x75Data */
1868    {Panel_1024x768x75, 0x0019, 0x0000, 14},
1869    /* XGI_CetLCDDes1024x768x75Data */
1870    {Panel_1024x768x75, 0x0018, 0x0010, 15},
1871    /* XGI_ExtLCDDes1280x1024x75Data */
1872    {Panel_1280x1024x75, 0x0019, 0x0001, 16},
1873    /* XGI_StLCDDes1280x1024x75Data */
1874    {Panel_1280x1024x75, 0x0019, 0x0000, 17},
1875    /* XGI_CetLCDDes1280x1024x75Data */
1876    {Panel_1280x1024x75, 0x0018, 0x0010, 18},
1877    {PanelRef75Hz, 0x0008, 0x0008, 19}, /* XGI_NoScalingDesDatax75 */
1878    {0xFF, 0x0000, 0x0000, 0}
1879};
1880
1881static struct XGI330_LCDDataTablStruct xgifb_epllcd_crt1[] = {
1882    {Panel_1024x768, 0x0018, 0x0000, 0}, /* XGI_LVDSCRT11024x768_1 */
1883    {Panel_1024x768, 0x0018, 0x0010, 1}, /* XGI_LVDSCRT11024x768_2 */
1884    {Panel_1280x1024, 0x0018, 0x0000, 2}, /* XGI_LVDSCRT11280x1024_1 */
1885    {Panel_1280x1024, 0x0018, 0x0010, 3}, /* XGI_LVDSCRT11280x1024_2 */
1886    {Panel_1400x1050, 0x0018, 0x0000, 4}, /* XGI_LVDSCRT11400x1050_1 */
1887    {Panel_1400x1050, 0x0018, 0x0010, 5}, /* XGI_LVDSCRT11400x1050_2 */
1888    {Panel_1600x1200, 0x0018, 0x0000, 6}, /* XGI_LVDSCRT11600x1200_1 */
1889    {Panel_1024x768x75, 0x0018, 0x0000, 7}, /* XGI_LVDSCRT11024x768_1x75 */
1890    {Panel_1024x768x75, 0x0018, 0x0010, 8}, /* XGI_LVDSCRT11024x768_2x75 */
1891    {Panel_1280x1024x75, 0x0018, 0x0000, 9}, /*XGI_LVDSCRT11280x1024_1x75*/
1892    {Panel_1280x1024x75, 0x0018, 0x0010, 10},/*XGI_LVDSCRT11280x1024_2x75*/
1893    {0xFF, 0x0000, 0x0000, 0}
1894};
1895
1896static struct XGI330_LCDDataTablStruct XGI_EPLLCDDataPtr[] = {
1897    {Panel_1024x768, 0x0018, 0x0000, 0}, /* XGI_LVDS1024x768Data_1 */
1898    {Panel_1024x768, 0x0018, 0x0010, 1}, /* XGI_LVDS1024x768Data_2 */
1899    {Panel_1280x1024, 0x0018, 0x0000, 2}, /* XGI_LVDS1280x1024Data_1 */
1900    {Panel_1280x1024, 0x0018, 0x0010, 3}, /* XGI_LVDS1280x1024Data_2 */
1901    {Panel_1400x1050, 0x0018, 0x0000, 4}, /* XGI_LVDS1400x1050Data_1 */
1902    {Panel_1400x1050, 0x0018, 0x0010, 5}, /* XGI_LVDS1400x1050Data_2 */
1903    {Panel_1600x1200, 0x0018, 0x0000, 6}, /* XGI_LVDS1600x1200Data_1 */
1904    {PanelRef60Hz, 0x0008, 0x0008, 7}, /* XGI_LVDSNoScalingData */
1905    {Panel_1024x768x75, 0x0018, 0x0000, 8}, /* XGI_LVDS1024x768Data_1x75 */
1906    {Panel_1024x768x75, 0x0018, 0x0010, 9}, /* XGI_LVDS1024x768Data_2x75 */
1907    /* XGI_LVDS1280x1024Data_1x75 */
1908    {Panel_1280x1024x75, 0x0018, 0x0000, 10},
1909    /* XGI_LVDS1280x1024Data_2x75 */
1910    {Panel_1280x1024x75, 0x0018, 0x0010, 11},
1911    {PanelRef75Hz, 0x0008, 0x0008, 12}, /* XGI_LVDSNoScalingDatax75 */
1912    {0xFF, 0x0000, 0x0000, 0}
1913};
1914
1915static struct XGI330_LCDDataTablStruct XGI_EPLLCDDesDataPtr[] = {
1916    {Panel_1024x768, 0x0018, 0x0000, 0}, /* XGI_LVDS1024x768Des_1 */
1917    {Panel_1024x768, 0x0618, 0x0410, 1}, /* XGI_LVDS1024x768Des_3 */
1918    {Panel_1024x768, 0x0018, 0x0010, 2}, /* XGI_LVDS1024x768Des_2 */
1919    {Panel_1280x1024, 0x0018, 0x0000, 3}, /* XGI_LVDS1280x1024Des_1 */
1920    {Panel_1280x1024, 0x0018, 0x0010, 4}, /* XGI_LVDS1280x1024Des_2 */
1921    {Panel_1400x1050, 0x0018, 0x0000, 5}, /* XGI_LVDS1400x1050Des_1 */
1922    {Panel_1400x1050, 0x0018, 0x0010, 6}, /* XGI_LVDS1400x1050Des_2 */
1923    {Panel_1600x1200, 0x0018, 0x0000, 7}, /* XGI_LVDS1600x1200Des_1 */
1924    {PanelRef60Hz, 0x0008, 0x0008, 8}, /* XGI_LVDSNoScalingDesData */
1925    {Panel_1024x768x75, 0x0018, 0x0000, 9}, /* XGI_LVDS1024x768Des_1x75 */
1926    {Panel_1024x768x75, 0x0618, 0x0410, 10}, /* XGI_LVDS1024x768Des_3x75 */
1927    {Panel_1024x768x75, 0x0018, 0x0010, 11}, /* XGI_LVDS1024x768Des_2x75 */
1928    /* XGI_LVDS1280x1024Des_1x75 */
1929    {Panel_1280x1024x75, 0x0018, 0x0000, 12},
1930    /* XGI_LVDS1280x1024Des_2x75 */
1931    {Panel_1280x1024x75, 0x0018, 0x0010, 13},
1932    {PanelRef75Hz, 0x0008, 0x0008, 14}, /* XGI_LVDSNoScalingDesDatax75 */
1933    {0xFF, 0x0000, 0x0000, 0}
1934};
1935
1936static struct XGI330_LCDDataTablStruct XGI_EPLCHLCDRegPtr[] = {
1937    {Panel_1024x768, 0x0000, 0x0000, 0}, /* XGI_CH7017LV1024x768 */
1938    {Panel_1400x1050, 0x0000, 0x0000, 1}, /* XGI_CH7017LV1400x1050 */
1939    {0xFF, 0x0000, 0x0000, 0}
1940};
1941
1942static struct XGI330_TVDataTablStruct XGI_TVDataTable[] = {
1943    {0x09E1, 0x0001, 0}, /* XGI_ExtPALData */
1944    {0x09E1, 0x0000, 1}, /* XGI_ExtNTSCData */
1945    {0x09E1, 0x0801, 2}, /* XGI_StPALData */
1946    {0x09E1, 0x0800, 3}, /* XGI_StNTSCData */
1947    {0x49E0, 0x0100, 4}, /* XGI_ExtHiTVData */
1948    {0x49E0, 0x4100, 5}, /* XGI_St2HiTVData */
1949    {0x49E0, 0x4900, 13}, /* XGI_St1HiTVData */
1950    {0x09E0, 0x0020, 6}, /* XGI_ExtYPbPr525iData */
1951    {0x09E0, 0x0040, 7}, /* XGI_ExtYPbPr525pData */
1952    {0x09E0, 0x0080, 8}, /* XGI_ExtYPbPr750pData */
1953    {0x09E0, 0x0820, 9}, /* XGI_StYPbPr525iData */
1954    {0x09E0, 0x0840, 10}, /* XGI_StYPbPr525pData */
1955    {0x09E0, 0x0880, 11}, /* XGI_StYPbPr750pData */
1956    {0xffff, 0x0000, 12} /* END */
1957};
1958
1959/* Chrontel 7017 TV List */
1960static struct XGI330_TVDataTablStruct xgifb_chrontel_tv[] = {
1961    {0x0011, 0x0000, 0}, /* UNTSC */
1962    {0x0011, 0x0010, 1}, /* ONTSC */
1963    {0x0011, 0x0001, 2}, /* UPAL */
1964    {0x0011, 0x0011, 3}, /* OPAL */
1965    {0xFFFF, 0x0000, 4}
1966};
1967
1968static unsigned short LCDLenList[] = {
1969    LVDSCRT1Len_H,
1970    LVDSCRT1Len_V,
1971    LVDSDataLen,
1972    LCDDesDataLen,
1973    LCDDataLen,
1974    LCDDesDataLen,
1975    0,
1976    LCDDesDataLen,
1977    LCDDesDataLen,
1978    0
1979};
1980
1981/* Dual link only */
1982static struct XGI330_LCDCapStruct XGI_LCDDLCapList[] = {
1983/* LCDCap1024x768 */
1984    {Panel_1024x768, DefaultLCDCap, 0, 0x88, 0x06, VCLK65_315,
1985    0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
1986    0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
1987/* LCDCap1280x1024 */
1988    {Panel_1280x1024, XGI_LCDDualLink+DefaultLCDCap, StLCDBToA,
1989    0x70, 0x03, VCLK108_2_315,
1990    0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
1991    0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
1992/* LCDCap1400x1050 */
1993    {Panel_1400x1050, XGI_LCDDualLink+DefaultLCDCap, StLCDBToA,
1994    0x70, 0x03, VCLK108_2_315,
1995     0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
1996     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
1997/* LCDCap1600x1200 */
1998    {Panel_1600x1200, XGI_LCDDualLink+DefaultLCDCap, LCDToFull,
1999    0xC0, 0x03, VCLK162,
2000     0x43, 0x22, 0x70, 0x24, 0x02, 0x14, 0x0A, 0x02, 0x00,
2001     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2002/* LCDCap1024x768x75 */
2003    {Panel_1024x768x75, DefaultLCDCap, 0, 0x60, 0, VCLK78_75,
2004     0x2B, 0x61, 0x2B, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2005     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
2006/* LCDCap1280x1024x75 */
2007    {Panel_1280x1024x75, XGI_LCDDualLink+DefaultLCDCap, StLCDBToA,
2008     0x90, 0x03, VCLK135_5,
2009     0x54, 0x42, 0x4A, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2010     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2011/* LCDCapDefault */
2012    {0xFF, DefaultLCDCap, 0, 0x88, 0x06, VCLK65_315,
2013    0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
2014    0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10}
2015};
2016
2017static struct XGI330_LCDCapStruct XGI_LCDCapList[] = {
2018/* LCDCap1024x768 */
2019    {Panel_1024x768, DefaultLCDCap, 0, 0x88, 0x06, VCLK65_315,
2020    0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
2021    0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
2022/* LCDCap1280x1024 */
2023    {Panel_1280x1024, DefaultLCDCap, StLCDBToA,
2024    0x70, 0x03, VCLK108_2_315,
2025    0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
2026    0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2027/* LCDCap1400x1050 */
2028    {Panel_1400x1050, DefaultLCDCap, StLCDBToA,
2029     0x70, 0x03, VCLK108_2_315,
2030     0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
2031     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2032/* LCDCap1600x1200 */
2033    {Panel_1600x1200, DefaultLCDCap, LCDToFull,
2034     0xC0, 0x03, VCLK162,
2035     0x5A, 0x23, 0x5A, 0x23, 0x02, 0x14, 0x0A, 0x02, 0x00,
2036     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2037/* LCDCap1024x768x75 */
2038    {Panel_1024x768x75, DefaultLCDCap, 0, 0x60, 0, VCLK78_75,
2039     0x2B, 0x61, 0x2B, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2040     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
2041/* LCDCap1280x1024x75 */
2042    {Panel_1280x1024x75, DefaultLCDCap, StLCDBToA,
2043     0x90, 0x03, VCLK135_5,
2044     0x54, 0x42, 0x4A, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2045     0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2046/* LCDCapDefault */
2047    {0xFF, DefaultLCDCap, 0, 0x88, 0x06, VCLK65_315,
2048    0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
2049    0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10}
2050};
2051
2052static struct XGI_Ext2Struct XGI330_RefIndex[] = {
2053    {Mode32Bpp + SupportAllCRT2 + SyncPN, RES320x200, VCLK25_175,
2054    0x00, 0x10, 0x59, 320, 200},/* 00 */
2055    {Mode32Bpp + SupportAllCRT2 + SyncPN, RES320x200, VCLK25_175,
2056    0x00, 0x10, 0x00, 320, 400},/* 01 */
2057    {Mode32Bpp + SupportAllCRT2 + SyncNN, RES320x240, VCLK25_175,
2058    0x04, 0x20, 0x50, 320, 240},/* 02 */
2059    {Mode32Bpp + SupportAllCRT2 + SyncPP, RES400x300, VCLK40,
2060    0x05, 0x32, 0x51, 400, 300},/* 03 */
2061    {Mode32Bpp + NoSupportTV + SyncNN + SupportTV1024, RES512x384,
2062    VCLK65_315, 0x06, 0x43, 0x52, 512, 384},/* 04 */
2063    {Mode32Bpp + SupportAllCRT2 + SyncPN, RES640x400, VCLK25_175,
2064    0x00, 0x14, 0x2f, 640, 400},/* 05 */
2065    {Mode32Bpp + SupportAllCRT2 + SyncNN, RES640x480x60, VCLK25_175,
2066    0x04, 0x24, 0x2e, 640, 480},/* 06 640x480x60Hz (LCD 640x480x60z) */
2067    {Mode32Bpp + NoSupportHiVisionTV + SyncNN, RES640x480x72, VCLK31_5,
2068    0x04, 0x24, 0x2e, 640, 480},/* 07 640x480x72Hz (LCD 640x480x70Hz) */
2069    {Mode32Bpp + NoSupportHiVisionTV + SyncNN, RES640x480x75, VCLK31_5,
2070    0x47, 0x24, 0x2e, 640, 480},/* 08 640x480x75Hz (LCD 640x480x75Hz) */
2071    {Mode32Bpp + SupportRAMDAC2 + SyncNN, RES640x480x85, VCLK36,
2072    0x8A, 0x24, 0x2e, 640, 480},/* 09 640x480x85Hz */
2073    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES640x480x100, VCLK43_163,
2074    0x00, 0x24, 0x2e, 640, 480},/* 0a 640x480x100Hz */
2075    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES640x480x120, VCLK52_406,
2076    0x00, 0x24, 0x2e, 640, 480},/* 0b 640x480x120Hz */
2077    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES640x480x160, VCLK72_852,
2078    0x00, 0x24, 0x2e, 640, 480},/* 0c 640x480x160Hz */
2079    {Mode32Bpp + SupportRAMDAC2 + SyncNN, RES640x480x200, VCLK86_6,
2080    0x00, 0x24, 0x2e, 640, 480},/* 0d 640x480x200Hz */
2081    {Mode32Bpp + NoSupportLCD + SyncPP, RES800x600x56, VCLK36,
2082    0x05, 0x36, 0x6a, 800, 600},/* 0e 800x600x56Hz */
2083    {Mode32Bpp + NoSupportTV + SyncPP, RES800x600x60, VCLK40,
2084    0x05, 0x36, 0x6a, 800, 600},/* 0f 800x600x60Hz (LCD 800x600x60Hz) */
2085    {Mode32Bpp + NoSupportHiVisionTV + SyncPP, RES800x600x72, VCLK50,
2086    0x48, 0x36, 0x6a, 800, 600},/* 10 800x600x72Hz (LCD 800x600x70Hz) */
2087    {Mode32Bpp + NoSupportHiVisionTV + SyncPP, RES800x600x75, VCLK49_5,
2088    0x8B, 0x36, 0x6a, 800, 600},/* 11 800x600x75Hz (LCD 800x600x75Hz) */
2089    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES800x600x85, VCLK56_25,
2090    0x00, 0x36, 0x6a, 800, 600},/* 12 800x600x85Hz */
2091    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES800x600x100, VCLK68_179,
2092    0x00, 0x36, 0x6a, 800, 600},/* 13 800x600x100Hz */
2093    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES800x600x120, VCLK83_95,
2094    0x00, 0x36, 0x6a, 800, 600},/* 14 800x600x120Hz */
2095    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES800x600x160, VCLK116_406,
2096    0x00, 0x36, 0x6a, 800, 600},/* 15 800x600x160Hz */
2097    {Mode32Bpp + InterlaceMode + SyncPP, RES1024x768x43, VCLK44_9,
2098    0x00, 0x47, 0x37, 1024, 768},/* 16 1024x768x43Hz */
2099    /* 17 1024x768x60Hz (LCD 1024x768x60Hz) */
2100    {Mode32Bpp + NoSupportTV + SyncNN + SupportTV1024, RES1024x768x60,
2101    VCLK65_315, 0x06, 0x47, 0x37, 1024, 768},
2102    {Mode32Bpp + NoSupportHiVisionTV + SyncNN, RES1024x768x70, VCLK75,
2103    0x49, 0x47, 0x37, 1024, 768},/* 18 1024x768x70Hz (LCD 1024x768x70Hz) */
2104    {Mode32Bpp + NoSupportHiVisionTV + SyncPP, RES1024x768x75, VCLK78_75,
2105    0x00, 0x47, 0x37, 1024, 768},/* 19 1024x768x75Hz (LCD 1024x768x75Hz) */
2106    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES1024x768x85, VCLK94_5,
2107    0x8C, 0x47, 0x37, 1024, 768},/* 1a 1024x768x85Hz */
2108    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES1024x768x100, VCLK113_309,
2109    0x00, 0x47, 0x37, 1024, 768},/* 1b 1024x768x100Hz */
2110    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES1024x768x120, VCLK139_054,
2111    0x00, 0x47, 0x37, 1024, 768},/* 1c 1024x768x120Hz */
2112    {Mode32Bpp + SupportLCD + SyncPP, RES1280x960x60, VCLK108_2_315,
2113    0x08, 0x58, 0x7b, 1280, 960},/* 1d 1280x960x60Hz */
2114    {Mode32Bpp + InterlaceMode + SyncPP, RES1280x1024x43, VCLK78_75,
2115    0x00, 0x58, 0x3a, 1280, 1024},/* 1e 1280x1024x43Hz */
2116    {Mode32Bpp + NoSupportTV + SyncPP, RES1280x1024x60, VCLK108_2_315,
2117    0x07, 0x58, 0x3a, 1280, 1024},/*1f 1280x1024x60Hz (LCD 1280x1024x60Hz)*/
2118    {Mode32Bpp + NoSupportTV + SyncPP, RES1280x1024x75, VCLK135_5,
2119    0x00, 0x58, 0x3a, 1280, 1024},/*20 1280x1024x75Hz (LCD 1280x1024x75Hz)*/
2120    {Mode32Bpp + SyncPP, RES1280x1024x85, VCLK157_5,
2121    0x00, 0x58, 0x3a, 1280, 1024},/* 21 1280x1024x85Hz */
2122    /* 22 1600x1200x60Hz */
2123    {Mode32Bpp + SupportLCD + SyncPP + SupportCRT2in301C,
2124    RES1600x1200x60, VCLK162, 0x09, 0x7A, 0x3c, 1600, 1200},
2125    {Mode32Bpp + SyncPP + SupportCRT2in301C, RES1600x1200x65, VCLK175,
2126    0x00, 0x69, 0x3c, 1600, 1200},/* 23 1600x1200x65Hz */
2127    {Mode32Bpp + SyncPP + SupportCRT2in301C, RES1600x1200x70, VCLK189,
2128    0x00, 0x69, 0x3c, 1600, 1200},/* 24 1600x1200x70Hz */
2129    {Mode32Bpp + SyncPP + SupportCRT2in301C, RES1600x1200x75, VCLK202_5,
2130    0x00, 0x69, 0x3c, 1600, 1200},/* 25 1600x1200x75Hz */
2131    {Mode32Bpp + SyncPP, RES1600x1200x85, VCLK229_5,
2132    0x00, 0x69, 0x3c, 1600, 1200},/* 26 1600x1200x85Hz */
2133    {Mode32Bpp + SyncPP, RES1600x1200x100, VCLK269_655,
2134    0x00, 0x69, 0x3c, 1600, 1200},/* 27 1600x1200x100Hz */
2135    {Mode32Bpp + SyncPP, RES1600x1200x120, VCLK323_586,
2136    0x00, 0x69, 0x3c, 1600, 1200},/* 28 1600x1200x120Hz */
2137    {Mode32Bpp + SupportLCD + SyncNP, RES1920x1440x60, VCLK234,
2138    0x00, 0x00, 0x68, 1920, 1440},/* 29 1920x1440x60Hz */
2139    {Mode32Bpp + SyncPN, RES1920x1440x65, VCLK254_817,
2140    0x00, 0x00, 0x68, 1920, 1440},/* 2a 1920x1440x65Hz */
2141    {Mode32Bpp + SyncPN, RES1920x1440x70, VCLK277_015,
2142    0x00, 0x00, 0x68, 1920, 1440},/* 2b 1920x1440x70Hz */
2143    {Mode32Bpp + SyncPN, RES1920x1440x75, VCLK291_132,
2144    0x00, 0x00, 0x68, 1920, 1440},/* 2c 1920x1440x75Hz */
2145    {Mode32Bpp + SyncPN, RES1920x1440x85, VCLK330_615,
2146    0x00, 0x00, 0x68, 1920, 1440},/* 2d 1920x1440x85Hz */
2147    {Mode16Bpp + SyncPN, RES1920x1440x100, VCLK388_631,
2148    0x00, 0x00, 0x68, 1920, 1440},/* 2e 1920x1440x100Hz */
2149    {Mode32Bpp + SupportLCD + SyncPN, RES2048x1536x60, VCLK266_952,
2150    0x00, 0x00, 0x6c, 2048, 1536},/* 2f 2048x1536x60Hz */
2151    {Mode32Bpp + SyncPN, RES2048x1536x65, VCLK291_766,
2152    0x00, 0x00, 0x6c, 2048, 1536},/* 30 2048x1536x65Hz */
2153    {Mode32Bpp + SyncPN, RES2048x1536x70, VCLK315_195,
2154    0x00, 0x00, 0x6c, 2048, 1536},/* 31 2048x1536x70Hz */
2155    {Mode32Bpp + SyncPN, RES2048x1536x75, VCLK340_477,
2156    0x00, 0x00, 0x6c, 2048, 1536},/* 32 2048x1536x75Hz */
2157    {Mode16Bpp + SyncPN, RES2048x1536x85, VCLK375_847,
2158    0x00, 0x00, 0x6c, 2048, 1536},/* 33 2048x1536x85Hz */
2159    {Mode32Bpp + SupportHiVision + SupportRAMDAC2 +
2160     SyncPP + SupportYPbPr750p, RES800x480x60, VCLK39_77,
2161     0x08, 0x00, 0x70, 800, 480},/* 34 800x480x60Hz */
2162    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES800x480x75, VCLK49_5,
2163    0x08, 0x00, 0x70, 800, 480},/* 35 800x480x75Hz */
2164    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES800x480x85, VCLK56_25,
2165    0x08, 0x00, 0x70, 800, 480},/* 36 800x480x85Hz */
2166    {Mode32Bpp + SupportHiVision + SupportRAMDAC2 +
2167     SyncPP + SupportYPbPr750p, RES1024x576x60, VCLK65_315,
2168     0x09, 0x00, 0x71, 1024, 576},/* 37 1024x576x60Hz */
2169    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES1024x576x75, VCLK78_75,
2170    0x09, 0x00, 0x71, 1024, 576},/* 38 1024x576x75Hz */
2171    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES1024x576x85, VCLK94_5,
2172    0x09, 0x00, 0x71, 1024, 576},/* 39 1024x576x85Hz */
2173    {Mode32Bpp + SupportHiVision + SupportRAMDAC2 +
2174    SyncPP + SupportYPbPr750p, RES1280x720x60, VCLK108_2_315,
2175    0x0A, 0x00, 0x75, 1280, 720},/* 3a 1280x720x60Hz*/
2176    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES1280x720x75, VCLK135_5,
2177    0x0A, 0x00, 0x75, 1280, 720},/* 3b 1280x720x75Hz */
2178    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES1280x720x85, VCLK157_5,
2179    0x0A, 0x00, 0x75, 1280, 720},/* 3c 1280x720x85Hz */
2180    {Mode32Bpp + SupportTV + SyncNN, RES720x480x60, VCLK28_322,
2181    0x06, 0x00, 0x31, 720, 480},/* 3d 720x480x60Hz */
2182    {Mode32Bpp + SupportTV + SyncPP, RES720x576x56, VCLK36,
2183    0x06, 0x00, 0x32, 720, 576},/* 3e 720x576x56Hz */
2184    {Mode32Bpp + InterlaceMode + NoSupportLCD + SyncPP, RES856x480x79I,
2185    VCLK35_2, 0x00, 0x00, 0x00, 856, 480},/* 3f 856x480x79I */
2186    {Mode32Bpp + NoSupportLCD + SyncNN, RES856x480x60, VCLK35_2,
2187    0x00, 0x00, 0x00, 856, 480},/* 40 856x480x60Hz */
2188    {Mode32Bpp + NoSupportHiVisionTV + SyncPP, RES1280x768x60,
2189    VCLK79_411, 0x08, 0x48, 0x23, 1280, 768},/* 41 1280x768x60Hz */
2190    {Mode32Bpp + NoSupportHiVisionTV + SyncPP, RES1400x1050x60,
2191    VCLK122_61, 0x08, 0x69, 0x26, 1400, 1050},/* 42 1400x1050x60Hz */
2192    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES1152x864x60, VCLK80_350,
2193    0x37, 0x00, 0x20, 1152, 864},/* 43 1152x864x60Hz */
2194    {Mode32Bpp + SupportRAMDAC2 + SyncPP, RES1152x864x75, VCLK107_385,
2195    0x37, 0x00, 0x20, 1152, 864},/* 44 1152x864x75Hz */
2196    {Mode32Bpp + SupportLCD + SupportRAMDAC2 + SyncPP, RES1280x960x75,
2197    VCLK125_999, 0x3A, 0x88, 0x7b, 1280, 960},/* 45 1280x960x75Hz */
2198    {Mode32Bpp + SupportLCD + SupportRAMDAC2 + SyncPP, RES1280x960x85,
2199    VCLK148_5, 0x0A, 0x88, 0x7b, 1280, 960},/* 46 1280x960x85Hz */
2200    {Mode32Bpp + SupportLCD + SupportRAMDAC2 + SyncPP, RES1280x960x120,
2201    VCLK217_325, 0x3A, 0x88, 0x7b, 1280, 960},/* 47 1280x960x120Hz */
2202    {Mode32Bpp + SupportRAMDAC2 + SyncPN, RES1024x768x160, VCLK139_054,
2203    0x30, 0x47, 0x37, 1024, 768},/* 48 1024x768x160Hz */
2204};
2205
2206static unsigned char XGI330_ScreenOffset[] = {
2207    0x14, 0x19, 0x20, 0x28, 0x32, 0x40,
2208    0x50, 0x64, 0x78, 0x80, 0x2d, 0x35,
2209    0x57, 0x48
2210};
2211
2212static struct SiS_StResInfo_S XGI330_StResInfo[] = {
2213    {640, 400},
2214    {640, 350},
2215    {720, 400},
2216    {720, 350},
2217    {640, 480}
2218};
2219
2220static struct SiS_ModeResInfo_S XGI330_ModeResInfo[] = {
2221    { 320, 200, 8, 8},
2222    { 320, 240, 8, 8},
2223    { 320, 400, 8, 8},
2224    { 400, 300, 8, 8},
2225    { 512, 384, 8, 8},
2226    { 640, 400, 8, 16},
2227    { 640, 480, 8, 16},
2228    { 800, 600, 8, 16},
2229    {1024, 768, 8, 16},
2230    {1280, 1024, 8, 16},
2231    {1600, 1200, 8, 16},
2232    {1920, 1440, 8, 16},
2233    {2048, 1536, 8, 16},
2234    { 720, 480, 8, 16},
2235    { 720, 576, 8, 16},
2236    {1280, 960, 8, 16},
2237    { 800, 480, 8, 16},
2238    {1024, 576, 8, 16},
2239    {1280, 720, 8, 16},
2240    { 856, 480, 8, 16},
2241    {1280, 768, 8, 16},
2242    {1400, 1050, 8, 16},
2243    {1152, 864, 8, 16}
2244};
2245
2246static struct SiS_VCLKData XGI_VCLKData[] = {
2247    /* SR2B,SR2C,SR2D */
2248    {0x1B, 0xE1, 25}, /* 00 (25.175MHz) */
2249    {0x4E, 0xE4, 28}, /* 01 (28.322MHz) */
2250    {0x57, 0xE4, 31}, /* 02 (31.500MHz) */
2251    {0xC3, 0xC8, 36}, /* 03 (36.000MHz) */
2252    {0x42, 0xE2, 40}, /* 04 (40.000MHz) */
2253    {0xFE, 0xCD, 43}, /* 05 (43.163MHz) */
2254    {0x5D, 0xC4, 44}, /* 06 (44.900MHz) */
2255    {0x52, 0xE2, 49}, /* 07 (49.500MHz) */
2256    {0x53, 0xE2, 50}, /* 08 (50.000MHz) */
2257    {0x74, 0x67, 52}, /* 09 (52.406MHz) */
2258    {0x6D, 0x66, 56}, /* 0A (56.250MHz) */
2259    {0x6C, 0xC3, 65}, /* 0B (65.000MHz) */
2260    {0x46, 0x44, 67}, /* 0C (67.765MHz) */
2261    {0xB1, 0x46, 68}, /* 0D (68.179MHz) */
2262    {0xD3, 0x4A, 72}, /* 0E (72.852MHz) */
2263    {0x29, 0x61, 75}, /* 0F (75.000MHz) */
2264    {0x6E, 0x46, 76}, /* 10 (75.800MHz) */
2265    {0x2B, 0x61, 78}, /* 11 (78.750MHz) */
2266    {0x31, 0x42, 79}, /* 12 (79.411MHz) */
2267    {0xAB, 0x44, 83}, /* 13 (83.950MHz) */
2268    {0x46, 0x25, 84}, /* 14 (84.800MHz) */
2269    {0x78, 0x29, 86}, /* 15 (86.600MHz) */
2270    {0x62, 0x44, 94}, /* 16 (94.500MHz) */
2271    {0x2B, 0x41, 104}, /* 17 (104.998MHz) */
2272    {0x3A, 0x23, 105}, /* 18 (105.882MHz) */
2273    {0x70, 0x44, 108}, /* 19 (107.862MHz) */
2274    {0x3C, 0x23, 109}, /* 1A (109.175MHz) */
2275    {0x5E, 0x43, 113}, /* 1B (113.309MHz) */
2276    {0xBC, 0x44, 116}, /* 1C (116.406MHz) */
2277    {0xE0, 0x46, 132}, /* 1D (132.258MHz) */
2278    {0x54, 0x42, 135}, /* 1E (135.500MHz) */
2279    {0x9C, 0x22, 139}, /* 1F (139.275MHz) */
2280    {0x41, 0x22, 157}, /* 20 (157.500MHz) */
2281    {0x70, 0x24, 162}, /* 21 (161.793MHz) */
2282    {0x30, 0x21, 175}, /* 22 (175.000MHz) */
2283    {0x4E, 0x22, 189}, /* 23 (188.520MHz) */
2284    {0xDE, 0x26, 194}, /* 24 (194.400MHz) */
2285    {0x62, 0x06, 202}, /* 25 (202.500MHz) */
2286    {0x3F, 0x03, 229}, /* 26 (229.500MHz) */
2287    {0xB8, 0x06, 234}, /* 27 (233.178MHz) */
2288    {0x34, 0x02, 253}, /* 28 (252.699MHz) */
2289    {0x58, 0x04, 255}, /* 29 (254.817MHz) */
2290    {0x24, 0x01, 265}, /* 2A (265.728MHz) */
2291    {0x9B, 0x02, 267}, /* 2B (266.952MHz) */
2292    {0x70, 0x05, 270}, /* 2C (269.65567MHz) */
2293    {0x25, 0x01, 272}, /* 2D (272.04199MHz) */
2294    {0x9C, 0x02, 277}, /* 2E (277.015MHz) */
2295    {0x27, 0x01, 286}, /* 2F (286.359985MHz) */
2296    {0xB3, 0x04, 291}, /* 30 (291.13266MHz) */
2297    {0xBC, 0x05, 292}, /* 31 (291.766MHz) */
2298    {0xF6, 0x0A, 310}, /* 32 (309.789459MHz) */
2299    {0x95, 0x01, 315}, /* 33 (315.195MHz) */
2300    {0xF0, 0x09, 324}, /* 34 (323.586792MHz) */
2301    {0xFE, 0x0A, 331}, /* 35 (330.615631MHz) */
2302    {0xF3, 0x09, 332}, /* 36 (332.177612MHz) */
2303    {0x5E, 0x03, 340}, /* 37 (340.477MHz) */
2304    {0xE8, 0x07, 376}, /* 38 (375.847504MHz) */
2305    {0xDE, 0x06, 389}, /* 39 (388.631439MHz) */
2306    {0x52, 0x2A, 54}, /* 3A (54.000MHz) */
2307    {0x52, 0x6A, 27}, /* 3B (27.000MHz) */
2308    {0x62, 0x24, 70}, /* 3C (70.874991MHz) */
2309    {0x62, 0x64, 70}, /* 3D (70.1048912MHz) */
2310    {0xA8, 0x4C, 30}, /* 3E (30.1048912MHz) */
2311    {0x20, 0x26, 33}, /* 3F (33.7499957MHz) */
2312    {0x31, 0xc2, 39}, /* 40 (39.77MHz) */
2313    {0x11, 0x21, 30}, /* 41 (30MHz) }// NTSC 1024X768 */
2314    {0x2E, 0x48, 25}, /* 42 (25.175MHz) }// ScaleLCD */
2315    {0x24, 0x46, 25}, /* 43 (25.175MHz) */
2316    {0x26, 0x64, 28}, /* 44 (28.322MHz) */
2317    {0x37, 0x64, 40}, /* 45 (40.000MHz) */
2318    {0xA1, 0x42, 108}, /* 46 (95.000MHz) }// QVGA */
2319    {0x37, 0x61, 100}, /* 47 (100.00MHz) */
2320    {0x78, 0x27, 108}, /* 48 (108.200MHz) */
2321    {0xBF, 0xC8, 35}, /* 49 (35.2MHz) */
2322    {0x66, 0x43, 123}, /* 4A (122.61Mhz) */
2323    {0x2C, 0x61, 80}, /* 4B (80.350Mhz) */
2324    {0x3B, 0x61, 108}, /* 4C (107.385Mhz) */
2325    {0x69, 0x61, 191}, /* 4D (190.96MHz ) */
2326    {0x4F, 0x22, 192}, /* 4E (192.069MHz) */
2327    {0x28, 0x26, 322}, /* 4F (322.273MHz) */
2328    {0x5C, 0x6B, 27}, /* 50 (27.74HMz) */
2329    {0x57, 0x24, 126}, /* 51 (125.999MHz) */
2330    {0x5C, 0x42, 148}, /* 52 (148.5MHz) */
2331    {0x42, 0x61, 120}, /* 53 (120.839MHz) */
2332    {0x62, 0x61, 178}, /* 54 (178.992MHz) */
2333    {0x59, 0x22, 217}, /* 55 (217.325MHz) */
2334    {0x29, 0x01, 300}, /* 56 (299.505Mhz) */
2335    {0x52, 0x63, 74}, /* 57 (74.25MHz) */
2336    {0xFF, 0x00, 0} /* End mark */
2337};
2338
2339static struct SiS_VCLKData XGI_VBVCLKData[] = {
2340    {0x1B, 0xE1, 25}, /* 00 (25.175MHz) */
2341    {0x4E, 0xE4, 28}, /* 01 (28.322MHz) */
2342    {0x57, 0xE4, 31}, /* 02 (31.500MHz) */
2343    {0xC3, 0xC8, 36}, /* 03 (36.000MHz) */
2344    {0x42, 0x47, 40}, /* 04 (40.000MHz) */
2345    {0xFE, 0xCD, 43}, /* 05 (43.163MHz) */
2346    {0x5D, 0xC4, 44}, /* 06 (44.900MHz) */
2347    {0x52, 0x47, 49}, /* 07 (49.500MHz) */
2348    {0x53, 0x47, 50}, /* 08 (50.000MHz) */
2349    {0x74, 0x67, 52}, /* 09 (52.406MHz) */
2350    {0x6D, 0x66, 56}, /* 0A (56.250MHz) */
2351    {0x35, 0x62, 65}, /* 0B (65.000MHz) */
2352    {0x46, 0x44, 67}, /* 0C (67.765MHz) */
2353    {0xB1, 0x46, 68}, /* 0D (68.179MHz) */
2354    {0xD3, 0x4A, 72}, /* 0E (72.852MHz) */
2355    {0x29, 0x61, 75}, /* 0F (75.000MHz) */
2356    {0x6D, 0x46, 75}, /* 10 (75.800MHz) */
2357    {0x41, 0x43, 78}, /* 11 (78.750MHz) */
2358    {0x31, 0x42, 79}, /* 12 (79.411MHz) */
2359    {0xAB, 0x44, 83}, /* 13 (83.950MHz) */
2360    {0x46, 0x25, 84}, /* 14 (84.800MHz) */
2361    {0x78, 0x29, 86}, /* 15 (86.600MHz) */
2362    {0x62, 0x44, 94}, /* 16 (94.500MHz) */
2363    {0x2B, 0x22, 104}, /* 17 (104.998MHz) */
2364    {0x49, 0x24, 105}, /* 18 (105.882MHz) */
2365    {0xF8, 0x2F, 108}, /* 19 (108.279MHz) */
2366    {0x3C, 0x23, 109}, /* 1A (109.175MHz) */
2367    {0x5E, 0x43, 113}, /* 1B (113.309MHz) */
2368    {0xBC, 0x44, 116}, /* 1C (116.406MHz) */
2369    {0xE0, 0x46, 132}, /* 1D (132.258MHz) */
2370    {0xD4, 0x28, 135}, /* 1E (135.220MHz) */
2371    {0xEA, 0x2A, 139}, /* 1F (139.275MHz) */
2372    {0x41, 0x22, 157}, /* 20 (157.500MHz) */
2373    {0x70, 0x24, 162}, /* 21 (161.793MHz) */
2374    {0x30, 0x21, 175}, /* 22 (175.000MHz) */
2375    {0x4E, 0x22, 189}, /* 23 (188.520MHz) */
2376    {0xDE, 0x26, 194}, /* 24 (194.400MHz) */
2377    {0x70, 0x07, 202}, /* 25 (202.500MHz) */
2378    {0x3F, 0x03, 229}, /* 26 (229.500MHz) */
2379    {0xB8, 0x06, 234}, /* 27 (233.178MHz) */
2380    {0x34, 0x02, 253}, /* 28 (252.699997 MHz) */
2381    {0x58, 0x04, 255}, /* 29 (254.817MHz) */
2382    {0x24, 0x01, 265}, /* 2A (265.728MHz) */
2383    {0x9B, 0x02, 267}, /* 2B (266.952MHz) */
2384    {0x70, 0x05, 270}, /* 2C (269.65567 MHz) */
2385    {0x25, 0x01, 272}, /* 2D (272.041992 MHz) */
2386    {0x9C, 0x02, 277}, /* 2E (277.015MHz) */
2387    {0x27, 0x01, 286}, /* 2F (286.359985 MHz) */
2388    {0x3C, 0x02, 291}, /* 30 (291.132660 MHz) */
2389    {0xEF, 0x0A, 292}, /* 31 (291.766MHz) */
2390    {0xF6, 0x0A, 310}, /* 32 (309.789459 MHz) */
2391    {0x95, 0x01, 315}, /* 33 (315.195MHz) */
2392    {0xF0, 0x09, 324}, /* 34 (323.586792 MHz) */
2393    {0xFE, 0x0A, 331}, /* 35 (330.615631 MHz) */
2394    {0xF3, 0x09, 332}, /* 36 (332.177612 MHz) */
2395    {0xEA, 0x08, 340}, /* 37 (340.477MHz) */
2396    {0xE8, 0x07, 376}, /* 38 (375.847504 MHz) */
2397    {0xDE, 0x06, 389}, /* 39 (388.631439 MHz) */
2398    {0x52, 0x2A, 54}, /* 3A (54.000MHz) */
2399    {0x52, 0x6A, 27}, /* 3B (27.000MHz) */
2400    {0x62, 0x24, 70}, /* 3C (70.874991MHz) */
2401    {0x62, 0x64, 70}, /* 3D (70.1048912MHz) */
2402    {0xA8, 0x4C, 30}, /* 3E (30.1048912MHz) */
2403    {0x20, 0x26, 33}, /* 3F (33.7499957MHz) */
2404    {0x31, 0xc2, 39}, /* 40 (39.77MHz) */
2405    {0x11, 0x21, 30}, /* 41 (30MHz) }// NTSC 1024X768 */
2406    {0x2E, 0x48, 25}, /* 42 (25.175MHz) }// ScaleLCD */
2407    {0x24, 0x46, 25}, /* 43 (25.175MHz) */
2408    {0x26, 0x64, 28}, /* 44 (28.322MHz) */
2409    {0x37, 0x64, 40}, /* 45 (40.000MHz) */
2410    {0xA1, 0x42, 108}, /* 46 (95.000MHz) }// QVGA */
2411    {0x37, 0x61, 100}, /* 47 (100.00MHz) */
2412    {0x78, 0x27, 108}, /* 48 (108.200MHz) */
2413    {0xBF, 0xC8, 35 }, /* 49 (35.2MHz) */
2414    {0x66, 0x43, 123}, /* 4A (122.61Mhz) */
2415    {0x2C, 0x61, 80 }, /* 4B (80.350Mhz) */
2416    {0x3B, 0x61, 108}, /* 4C (107.385Mhz) */
2417    {0x69, 0x61, 191}, /* 4D (190.96MHz ) */
2418    {0x4F, 0x22, 192}, /* 4E (192.069MHz) */
2419    {0x28, 0x26, 322}, /* 4F (322.273MHz) */
2420    {0x5C, 0x6B, 27}, /* 50 (27.74HMz) */
2421    {0x57, 0x24, 126}, /* 51 (125.999MHz) */
2422    {0x5C, 0x42, 148}, /* 52 (148.5MHz) */
2423    {0x42, 0x61, 120}, /* 53 (120.839MHz) */
2424    {0x62, 0x61, 178}, /* 54 (178.992MHz) */
2425    {0x59, 0x22, 217}, /* 55 (217.325MHz) */
2426    {0x29, 0x01, 300}, /* 56 (299.505Mhz) */
2427    {0x52, 0x63, 74}, /* 57 (74.25MHz) */
2428    {0xFF, 0x00, 0} /* End mark */
2429};
2430
2431#define XGI301TVDelay 0x22
2432#define XGI301LCDDelay 0x12
2433
2434static unsigned char TVAntiFlickList[] = {/* NTSCAntiFlicker */
2435    0x04, /* ; 0 Adaptive */
2436    0x00, /* ; 1 new anti-flicker ? */
2437
2438    0x04, /* ; 0 Adaptive */
2439    0x08, /* ; 1 new anti-flicker ? */
2440
2441    0x04, /* ; 0 ? */
2442    0x00 /* ; 1 new anti-flicker ? */
2443};
2444
2445
2446static unsigned char TVEdgeList[] = {
2447    0x00, /* ; 0 NTSC No Edge enhance */
2448    0x04, /* ; 1 NTSC Adaptive Edge enhance */
2449    0x00, /* ; 0 PAL No Edge enhance */
2450    0x04, /* ; 1 PAL Adaptive Edge enhance */
2451    0x00, /* ; 0 HiTV */
2452    0x00 /* ; 1 HiTV */
2453};
2454
2455static unsigned long TVPhaseList[] = {
2456    0x08BAED21, /* ; 0 NTSC phase */
2457    0x00E3052A, /* ; 1 PAL phase */
2458    0x9B2EE421, /* ; 2 PAL-M phase */
2459    0xBA3EF421, /* ; 3 PAL-N phase */
2460    0xA7A28B1E, /* ; 4 NTSC 1024x768 */
2461    0xE00A831E, /* ; 5 PAL-M 1024x768 */
2462    0x00000000, /* ; 6 reserved */
2463    0x00000000, /* ; 7 reserved */
2464    0xD67BF021, /* ; 8 NTSC phase */
2465    0xE986092A, /* ; 9 PAL phase */
2466    0xA4EFE621, /* ; A PAL-M phase */
2467    0x4694F621, /* ; B PAL-N phase */
2468    0x8BDE711C, /* ; C NTSC 1024x768 */
2469    0xE00A831E /* ; D PAL-M 1024x768 */
2470};
2471
2472static unsigned char NTSCYFilter1[] = {
2473    0x00, 0xF4, 0x10, 0x38, /* 0 : 320x text mode */
2474    0x00, 0xF4, 0x10, 0x38, /* 1 : 360x text mode */
2475    0xEB, 0x04, 0x25, 0x18, /* 2 : 640x text mode */
2476    0xF1, 0x04, 0x1F, 0x18, /* 3 : 720x text mode */
2477    0x00, 0xF4, 0x10, 0x38, /* 4 : 320x gra. mode */
2478    0xEB, 0x04, 0x25, 0x18, /* 5 : 640x gra. mode */
2479    0xEB, 0x15, 0x25, 0xF6 /* 6 : 800x gra. mode */
2480};
2481
2482static unsigned char PALYFilter1[] = {
2483    0x00, 0xF4, 0x10, 0x38, /* 0 : 320x text mode */
2484    0x00, 0xF4, 0x10, 0x38, /* 1 : 360x text mode */
2485    0xF1, 0xF7, 0x1F, 0x32, /* 2 : 640x text mode */
2486    0xF3, 0x00, 0x1D, 0x20, /* 3 : 720x text mode */
2487    0x00, 0xF4, 0x10, 0x38, /* 4 : 320x gra. mode */
2488    0xF1, 0xF7, 0x1F, 0x32, /* 5 : 640x gra. mode */
2489    0xFC, 0xFB, 0x14, 0x2A /* 6 : 800x gra. mode */
2490};
2491
2492static unsigned char xgifb_palmn_yfilter1[] = {
2493    0x00, 0xF4, 0x10, 0x38, /* 0 : 320x text mode */
2494    0x00, 0xF4, 0x10, 0x38, /* 1 : 360x text mode */
2495    0xEB, 0x04, 0x10, 0x18, /* 2 : 640x text mode */
2496    0xF7, 0x06, 0x19, 0x14, /* 3 : 720x text mode */
2497    0x00, 0xF4, 0x10, 0x38, /* 4 : 320x gra. mode */
2498    0xEB, 0x04, 0x25, 0x18, /* 5 : 640x gra. mode */
2499    0xEB, 0x15, 0x25, 0xF6, /* 6 : 800x gra. mode */
2500    0xFF, 0xFF, 0xFF, 0xFF /* End of Table */
2501};
2502
2503static unsigned char xgifb_yfilter2[] = {
2504    0xFF, 0x03, 0x02, 0xF6, 0xFC, 0x27, 0x46, /* 0 : 320x text mode */
2505    0x01, 0x02, 0xFE, 0xF7, 0x03, 0x27, 0x3C, /* 1 : 360x text mode */
2506    0xFF, 0x03, 0x02, 0xF6, 0xFC, 0x27, 0x46, /* 2 : 640x text mode */
2507    0x01, 0x02, 0xFE, 0xF7, 0x03, 0x27, 0x3C, /* 3 : 720x text mode */
2508    0xFF, 0x03, 0x02, 0xF6, 0xFC, 0x27, 0x46, /* 4 : 320x gra. mode */
2509    0xFF, 0x03, 0x02, 0xF6, 0xFC, 0x27, 0x46, /* 5 : 640x gra. mode */
2510    0x01, 0x01, 0xFC, 0xF8, 0x08, 0x26, 0x38, /* 6 : 800x gra. mode */
2511    0xFF, 0xFF, 0xFC, 0x00, 0x0F, 0x22, 0x28 /* 7 : 1024xgra. mode */
2512};
2513
2514static unsigned char XGI_NTSC1024AdjTime[] = {
2515    0xa7, 0x07, 0xf2, 0x6e, 0x17, 0x8b, 0x73, 0x53,
2516    0x13, 0x40, 0x34, 0xF4, 0x63, 0xBB, 0xCC, 0x7A,
2517    0x58, 0xe4, 0x73, 0xd0, 0x13
2518};
2519
2520static struct XGI301C_Tap4TimingStruct xgifb_tap4_timing[] = {
2521    {0, {
2522    0x00, 0x20, 0x00, 0x00, 0x7F, 0x20, 0x02, 0x7F, /* ; C0-C7 */
2523    0x7D, 0x20, 0x04, 0x7F, 0x7D, 0x1F, 0x06, 0x7E, /* ; C8-CF */
2524    0x7C, 0x1D, 0x09, 0x7E, 0x7C, 0x1B, 0x0B, 0x7E, /* ; D0-D7 */
2525    0x7C, 0x19, 0x0E, 0x7D, 0x7C, 0x17, 0x11, 0x7C, /* ; D8-DF */
2526    0x7C, 0x14, 0x14, 0x7C, 0x7C, 0x11, 0x17, 0x7C, /* ; E0-E7 */
2527    0x7D, 0x0E, 0x19, 0x7C, 0x7E, 0x0B, 0x1B, 0x7C, /* ; EA-EF */
2528    0x7E, 0x09, 0x1D, 0x7C, 0x7F, 0x06, 0x1F, 0x7C, /* ; F0-F7 */
2529    0x7F, 0x04, 0x20, 0x7D, 0x00, 0x02, 0x20, 0x7E /* ; F8-FF */
2530    }
2531    }
2532};
2533
2534static struct XGI301C_Tap4TimingStruct PALTap4Timing[] = {
2535    {600, {
2536        0x05, 0x19, 0x05, 0x7D, 0x03, 0x19, 0x06, 0x7E, /* ; C0-C7 */
2537        0x02, 0x19, 0x08, 0x7D, 0x01, 0x18, 0x0A, 0x7D, /* ; C8-CF */
2538        0x00, 0x18, 0x0C, 0x7C, 0x7F, 0x17, 0x0E, 0x7C, /* ; D0-D7 */
2539        0x7E, 0x16, 0x0F, 0x7D, 0x7E, 0x14, 0x11, 0x7D, /* ; D8-DF */
2540        0x7D, 0x13, 0x13, 0x7D, 0x7D, 0x11, 0x14, 0x7E, /* ; E0-E7 */
2541        0x7D, 0x0F, 0x16, 0x7E, 0x7D, 0x0E, 0x17, 0x7E, /* ; EA-EF */
2542        0x7D, 0x0C, 0x18, 0x7F, 0x7D, 0x0A, 0x18, 0x01, /* ; F0-F7 */
2543        0x7D, 0x08, 0x19, 0x02, 0x7D, 0x06, 0x19, 0x04 /* ; F8-FF */
2544        }
2545    },
2546    {768, {
2547        0x08, 0x12, 0x08, 0x7E, 0x07, 0x12, 0x09, 0x7E, /* ; C0-C7 */
2548        0x06, 0x12, 0x0A, 0x7E, 0x05, 0x11, 0x0B, 0x7F, /* ; C8-CF */
2549        0x04, 0x11, 0x0C, 0x7F, 0x03, 0x11, 0x0C, 0x00, /* ; D0-D7 */
2550        0x03, 0x10, 0x0D, 0x00, 0x02, 0x0F, 0x0E, 0x01, /* ; D8-DF */
2551        0x01, 0x0F, 0x0F, 0x01, 0x01, 0x0E, 0x0F, 0x02, /* ; E0-E7 */
2552        0x00, 0x0D, 0x10, 0x03, 0x7F, 0x0C, 0x11, 0x04, /* ; EA-EF */
2553        0x7F, 0x0C, 0x11, 0x04, 0x7F, 0x0B, 0x11, 0x05, /* ; F0-F7 */
2554        0x7E, 0x0A, 0x12, 0x06, 0x7E, 0x09, 0x12, 0x07 /* ; F8-FF */
2555        }
2556    },
2557    {0xFFFF, {
2558         0x04, 0x1A, 0x04, 0x7E, 0x02, 0x1B, 0x05, 0x7E, /* ; C0-C7 */
2559         0x01, 0x1A, 0x07, 0x7E, 0x00, 0x1A, 0x09, 0x7D, /* ; C8-CF */
2560         0x7F, 0x19, 0x0B, 0x7D, 0x7E, 0x18, 0x0D, 0x7D, /* ; D0-D7 */
2561         0x7D, 0x17, 0x10, 0x7C, 0x7D, 0x15, 0x12, 0x7C, /* ; D8-DF */
2562         0x7C, 0x14, 0x14, 0x7C, 0x7C, 0x12, 0x15, 0x7D, /* ; E0-E7 */
2563         0x7C, 0x10, 0x17, 0x7D, 0x7C, 0x0D, 0x18, 0x7F, /* ; EA-EF */
2564         0x7D, 0x0B, 0x19, 0x7F, 0x7D, 0x09, 0x1A, 0x00, /* ; F0-F7 */
2565         0x7D, 0x07, 0x1A, 0x02, 0x7E, 0x05, 0x1B, 0x02 /* ; F8-FF */
2566         }
2567    }
2568};
2569
2570static struct XGI301C_Tap4TimingStruct xgifb_ntsc_525_tap4_timing[] = {
2571    {480, {
2572        0x04, 0x1A, 0x04, 0x7E, 0x03, 0x1A, 0x06, 0x7D, /* ; C0-C7 */
2573        0x01, 0x1A, 0x08, 0x7D, 0x00, 0x19, 0x0A, 0x7D, /* ; C8-CF */
2574        0x7F, 0x19, 0x0C, 0x7C, 0x7E, 0x18, 0x0E, 0x7C, /* ; D0-D7 */
2575        0x7E, 0x17, 0x10, 0x7B, 0x7D, 0x15, 0x12, 0x7C, /* ; D8-DF */
2576        0x7D, 0x13, 0x13, 0x7D, 0x7C, 0x12, 0x15, 0x7D, /* ; E0-E7 */
2577        0x7C, 0x10, 0x17, 0x7D, 0x7C, 0x0E, 0x18, 0x7E, /* ; EA-EF */
2578        0x7D, 0x0C, 0x19, 0x7E, 0x7D, 0x0A, 0x19, 0x00, /* ; F0-F7 */
2579        0x7D, 0x08, 0x1A, 0x01, 0x7E, 0x06, 0x1A, 0x02 /* ; F8-FF */
2580        }
2581    },
2582    {600, {
2583        0x07, 0x14, 0x07, 0x7E, 0x06, 0x14, 0x09, 0x7D, /* ; C0-C7 */
2584        0x05, 0x14, 0x0A, 0x7D, 0x04, 0x13, 0x0B, 0x7E, /* ; C8-CF */
2585        0x03, 0x13, 0x0C, 0x7E, 0x02, 0x12, 0x0D, 0x7F, /* ; D0-D7 */
2586        0x01, 0x12, 0x0E, 0x7F, 0x01, 0x11, 0x0F, 0x7F, /* ; D8-DF */
2587        0x01, 0x10, 0x10, 0x00, 0x7F, 0x0F, 0x11, 0x01, /* ; E0-E7 */
2588        0x7F, 0x0E, 0x12, 0x01, 0x7E, 0x0D, 0x12, 0x03, /* ; EA-EF */
2589        0x7E, 0x0C, 0x13, 0x03, 0x7E, 0x0B, 0x13, 0x04, /* ; F0-F7 */
2590        0x7E, 0x0A, 0x14, 0x04, 0x7D, 0x09, 0x14, 0x06 /* ; F8-FF */
2591        }
2592    },
2593    {0xFFFF, {
2594         0x09, 0x0F, 0x09, 0x7F, 0x08, 0x0F, 0x09, 0x00, /* ; C0-C7 */
2595         0x07, 0x0F, 0x0A, 0x00, 0x06, 0x0F, 0x0A, 0x01, /* ; C8-CF */
2596         0x06, 0x0E, 0x0B, 0x01, 0x05, 0x0E, 0x0B, 0x02, /* ; D0-D7 */
2597         0x04, 0x0E, 0x0C, 0x02, 0x04, 0x0D, 0x0C, 0x03, /* ; D8-DF */
2598         0x03, 0x0D, 0x0D, 0x03, 0x02, 0x0C, 0x0D, 0x05, /* ; E0-E7 */
2599         0x02, 0x0C, 0x0E, 0x04, 0x01, 0x0B, 0x0E, 0x06, /* ; EA-EF */
2600         0x01, 0x0B, 0x0E, 0x06, 0x00, 0x0A, 0x0F, 0x07, /* ; F0-F7 */
2601         0x00, 0x0A, 0x0F, 0x07, 0x00, 0x09, 0x0F, 0x08 /* ; F8-FF */
2602         }
2603    }
2604};
2605
2606static struct XGI301C_Tap4TimingStruct YPbPr750pTap4Timing[] = {
2607    {0xFFFF, {
2608         0x05, 0x19, 0x05, 0x7D, 0x03, 0x19, 0x06, 0x7E, /* ; C0-C7 */
2609         0x02, 0x19, 0x08, 0x7D, 0x01, 0x18, 0x0A, 0x7D, /* ; C8-CF */
2610         0x00, 0x18, 0x0C, 0x7C, 0x7F, 0x17, 0x0E, 0x7C, /* ; D0-D7 */
2611         0x7E, 0x16, 0x0F, 0x7D, 0x7E, 0x14, 0x11, 0x7D, /* ; D8-DF */
2612         0x7D, 0x13, 0x13, 0x7D, 0x7D, 0x11, 0x14, 0x7E, /* ; E0-E7 */
2613         0x7D, 0x0F, 0x16, 0x7E, 0x7D, 0x0E, 0x17, 0x7E, /* ; EA-EF */
2614         0x7D, 0x0C, 0x18, 0x7F, 0x7D, 0x0A, 0x18, 0x01, /* ; F0-F7 */
2615         0x7D, 0x08, 0x19, 0x02, 0x7D, 0x06, 0x19, 0x04 /* F8-FF */
2616         }
2617    }
2618};
2619#endif
2620

Archive Download this file



interactive