1/* Copyright (C) 2003-2006 by XGI Technology, Taiwan.
2 *
3 * All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation on the rights to use, copy, modify, merge,
9 * publish, distribute, sublicense, and/or sell copies of the Software,
10 * and to permit persons to whom the Software is furnished to do so,
11 * subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial
15 * portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NON-INFRINGEMENT.  IN NO EVENT SHALL XGI AND/OR
21 *  ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 */
26
27
28#define  Tap4
29static const XGI_ECLKDataStruct XGI330_ECLKData[ECLK_SIZE]=
30{
31 { 0x5c,0x23,0x01,166},
32 { 0x5c,0x23,0x01,166},
33 { 0x7C,0x08,0x80,200},
34 { 0x79,0x06,0x80,250},
35 { 0x29,0x01,0x81,300},
36 { 0x29,0x01,0x81,300},
37 { 0x29,0x01,0x81,300},
38 { 0x29,0x01,0x81,300}
39};
40
41static const XGI_ECLKDataStruct XGI340_ECLKData[ECLK_SIZE]=
42{
43 { 0x7c,0x08,0x01,200},
44 { 0x7c,0x08,0x01,200},
45 { 0x7C,0x08,0x80,200},
46 { 0x79,0x06,0x80,250},
47 { 0x29,0x01,0x81,300},
48 { 0x29,0x01,0x81,300},
49 { 0x29,0x01,0x81,300},
50 { 0x29,0x01,0x81,300}
51};
52
53static const DRAM8Type XGI340_SR13[SR15_SIZE] = {
54    {0xb1, 0xb1, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR13 */
55    {0x6a, 0x5c, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR14 */
56    {0x31, 0x72, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR18 */
57    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}  /* SR1B */
58};
59
60static const DRAM8Type XGI340_CR41[CR40_SIZE] = {
61    {0x20, 0x91, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0 CR41 */
62    {0x04, 0x04, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 1 CR8A */
63    {0x04, 0x04, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 2 CR8B */
64    {0xb5, 0xc6, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00},
65    {0xf0, 0x90, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00},
66    {0xa4, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 5 CR68 */
67    {0x77, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 6 CR69 */
68    {0x77, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 7 CR6A */
69    {0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 8 CR6D */
70    {0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 9 CR80 */
71    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 10 CR81 */
72    {0x48, 0xaa, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 11 CR82 */
73    {0x77, 0x77, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 12 CR85 */
74    {0x88, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 13 CR86 */
75    {0x44, 0x43, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 14 CR90 */
76    {0x44, 0x55, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 15 CR91 */
77    {0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 16 CR92 */
78    {0x44, 0x45, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 17 CR93 */
79    {0x0A, 0x0A, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 18 CR94 */
80    {0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 19 CR95 */
81    {0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 20 CR96 */
82    {0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 21 CRC3 */
83    {0x03, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 22 CRC4 */
84    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}  /* 23 CRC5 */
85};
86
87/* Jong 10/04/2007; merge code */
88UCHAR XGI27_cr41[24][8]=
89{
90{0x20,0x60,0x60,0x00,0x00,0x00,0x00,0x00},/* 0 CR41 */
91{0x04,0x44,0x84,0x00,0x00,0x00,0x00,0x00},/* 1 CR8A */
92{0x04,0x40,0x84,0x00,0x00,0x00,0x00,0x00},/* 2 CR8B */
93{0xb5,0x03,0xa4,0x00,0x00,0x00,0x00,0x00},/* 3 CR40[7],CR99[2:0],CR45[3:0]*/
94{0xf0,0xf5,0xf0,0x00,0x00,0x00,0x00,0x00},/* 4 CR59 */
95{0xa4,0x1C,0x24,0x00,0x00,0x00,0x00,0x00},/* 5 CR68 */
96{0x77,0x77,0x44,0x00,0x00,0x00,0x00,0x00},/* 6 CR69 */
97{0x77,0x77,0x44,0x00,0x00,0x00,0x00,0x00},/* 7 CR6A */
98{0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00},/* 8 CR6D */
99{0x55,0x55,0x55,0x00,0x00,0x00,0x00,0x00},/* 9 CR80 */
100{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/* 10 CR81 */
101{0x48,0xa8,0x48,0x00,0x00,0x00,0x00,0x00},/* 11 CR82 */
102{0x77,0x88,0x77,0x00,0x00,0x00,0x00,0x00},/* 12 CR85 */
103{0x88,0x88,0x88,0x00,0x00,0x00,0x00,0x00},/* 13 CR86 */
104{0x44,0x32,0x44,0x00,0x00,0x00,0x00,0x00},/* 14 CR90 */
105{0x44,0x33,0x44,0x00,0x00,0x00,0x00,0x00},/* 15 CR91 */
106{0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00},/* 16 CR92 */
107{0x44,0x63,0x44,0x00,0x00,0x00,0x00,0x00},/* 17 CR93 */
108{0x0A,0x14,0x0A,0x00,0x00,0x00,0x00,0x00},/* 18 CR94 */
109{0x0C,0x0B,0x0C,0x00,0x00,0x00,0x00,0x00},/* 19 CR95 */
110{0x05,0x22,0x05,0x00,0x00,0x00,0x00,0x00},/* 20 CR96 */
111{0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00},/* 21 CRC3 */
112{0x03,0x00,0x02,0x00,0x00,0x00,0x00,0x00},/* 22 CRC4 */
113{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}/* 23 CRC5 */
114};
115
116UCHAR XGI340_CR6B[8][4]={
117    {0xaa, 0xaa, 0xaa, 0xaa},
118    {0xaa, 0xaa, 0xaa, 0xaa},
119    {0xaa, 0xaa, 0xaa, 0xaa},
120    {0x00, 0x00, 0x00, 0x00},
121    {0x00, 0x00, 0x00, 0x00},
122    {0x00, 0x00, 0x00, 0x00},
123    {0x00, 0x00, 0x00, 0x00},
124    {0x00, 0x00, 0x00, 0x00}
125};
126
127static const UCHAR XGI45_CR6E[CR6E_SIZE] = {
128    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
129};
130
131
132static const DRAM4Type XGI340_CR6E[CR6E_SIZE] = {
133    {0x00, 0x00, 0x00, 0x00},
134    {0x00, 0x00, 0x00, 0x00},
135    {0x00, 0x00, 0x00, 0x00},
136    {0x00, 0x00, 0x00, 0x00},
137    {0x00, 0x00, 0x00, 0x00},
138    {0x00, 0x00, 0x00, 0x00},
139    {0x00, 0x00, 0x00, 0x00},
140    {0x00, 0x00, 0x00, 0x00}
141};
142
143static const UCHAR XGI45_CR6F[CR6F_SIZE] = {
144    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
145};
146
147static const DRAM32Type XGI340_CR6F[CR6F_SIZE] = {
148    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
149     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
150     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
151     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
152    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
153     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
154     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
155     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
156    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
157     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
158     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
159     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
160    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
161     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
162     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
163     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
164    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
165     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
166     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
167     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
168    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
169     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
170     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
171     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
172    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
173     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
174     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
175     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
176    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
177     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
178     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
179     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
180};
181
182static const DRAM2Type XGI340_CR89[CR89_SIZE]={
183    {0xa0, 0x00},
184    {0xa0, 0x00},
185    {0xa0, 0x00},
186    {0x00, 0x00},
187    {0x00, 0x00},
188    {0x00, 0x00},
189    {0x00, 0x00},
190    {0x00, 0x00}
191};
192
193static const UCHAR XGI340_AGPReg[AGP_REG_SIZE] = {
194 /* CR47, CR48, CR49, CR4A */
195    0x28, 0x23, 0x00, 0x20,
196 /* CR4B, CR4C, CR70, CR71 */
197    0x00, 0x20, 0x00, 0x05,
198 /* CR74, CR75, CR76, CR77 */
199    0xd0, 0x10, 0x10, 0x00
200};
201
202static const UCHAR XGI340_SR16[4] = { 0x03, 0x83, 0x03, 0x83 };
203
204static const UCHAR XGI330_SR25[2] = { 0x00, 0x00 };
205static const UCHAR XGI330_SR31 = 0x40;
206static const UCHAR XGI330_SR32 = 0x11;
207static const UCHAR XG40_CRCF = 0x13;
208static const UCHAR XG40_DRAMTypeDefinition = 0xFF;
209
210static const XGI_StStruct XGI330_SModeIDTable[]=
211{
212 {0x01,0x9208,0x01,0x00,0x10,0x00,0x00,0x01,0x00},
213 {0x01,0x1210,0x14,0x01,0x00,0x01,0x00,0x01,0x00},
214 {0x01,0x1010,0x17,0x02,0x11,0x00,0x00,0x01,0x01},
215 {0x03,0x8208,0x03,0x00,0x14,0x00,0x00,0x01,0x02},
216 {0x03,0x0210,0x16,0x01,0x04,0x01,0x00,0x01,0x02},
217 {0x03,0x0010,0x18,0x02,0x15,0x00,0x00,0x01,0x03},
218 {0x05,0x9209,0x05,0x00,0x10,0x00,0x00,0x00,0x04},
219 {0x06,0x8209,0x06,0x00,0x14,0x00,0x00,0x00,0x05},
220 {0x07,0x0000,0x07,0x03,0x05,0x03,0x00,0x01,0x03},
221 {0x07,0x0000,0x19,0x02,0x15,0x02,0x00,0x01,0x03},
222 {0x0d,0x920a,0x0d,0x00,0x10,0x00,0x00,0x00,0x04},
223 {0x0e,0x820a,0x0e,0x00,0x14,0x00,0x00,0x00,0x05},
224 {0x0f,0x0202,0x11,0x01,0x04,0x01,0x00,0x00,0x05},
225 {0x10,0x0212,0x12,0x01,0x04,0x01,0x00,0x00,0x05},
226 {0x11,0x0212,0x1a,0x04,0x24,0x04,0x00,0x00,0x05},
227 {0x12,0x0212,0x1b,0x04,0x24,0x04,0x00,0x00,0x05},
228 {0x13,0x021b,0x1c,0x00,0x14,0x00,0x00,0x00,0x04},
229 {0x12,0x0010,0x18,0x02,0x24,0x02,0x00,0x00,0x05},/* St_CRT2CRTC2 not sure */
230 {0x12,0x0210,0x18,0x01,0x24,0x01,0x00,0x00,0x05},/* St_CRT2CRTC2 not sure */
231 {0xff,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
232};
233
234
235static const XGI_ExtStruct  XGI330_EModeIDTable[]=
236{
237 {0x6a,0x2212,0x0407,0x3a81,0x0102,0x08,0x07,0x00,0x00,0x07,0x0e},
238 {0x2e,0x0a1b,0x0306,0x3a57,0x0101,0x08,0x06,0x00,0x00,0x05,0x06},
239 {0x2f,0x0a1b,0x0305,0x3a50,0x0100,0x08,0x05,0x00,0x00,0x05,0x05},
240 {0x30,0x2a1b,0x0407,0x3a81,0x0103,0x08,0x07,0x00,0x00,0x07,0x0e},
241 {0x31,0x0a1b,0x030d,0x3b85,0x0000,0x08,0x0d,0x00,0x00,0x06,0x3d},
242 {0x32,0x0a1b,0x0a0e,0x3b8c,0x0000,0x08,0x0e,0x00,0x00,0x06,0x3e},
243 {0x33,0x0a1d,0x0a0d,0x3b85,0x0000,0x08,0x0d,0x00,0x00,0x06,0x3d},
244 {0x34,0x2a1d,0x0a0e,0x3b8c,0x0000,0x08,0x0e,0x00,0x00,0x06,0x3e},
245 {0x35,0x0a1f,0x0a0d,0x3b85,0x0000,0x08,0x0d,0x00,0x00,0x06,0x3d},
246 {0x36,0x2a1f,0x0a0e,0x3b8c,0x0000,0x08,0x0e,0x00,0x00,0x06,0x3e},
247 {0x37,0x0212,0x0508,0x3aab,0x0104,0x08,0x08,0x00,0x00,0x00,0x16},
248 {0x38,0x0a1b,0x0508,0x3aab,0x0105,0x08,0x08,0x00,0x00,0x00,0x16},
249 {0x3a,0x0e3b,0x0609,0x3adc,0x0107,0x08,0x09,0x00,0x00,0x00,0x1e},
250 {0x3c,0x0e3b,0x070a,0x3af2,0x0130,0x08,0x0a,0x00,0x00,0x00,0x22},	/* mode 1600x1200 add CRT2MODE [2003/10/07] */
251 {0x3d,0x0e7d,0x070a,0x3af2,0x0131,0x08,0x0a,0x00,0x00,0x00,0x22},	/* mode 1600x1200 add CRT2MODE */
252 {0x40,0x9a1c,0x0000,0x3a34,0x010d,0x08,0x00,0x00,0x00,0x04,0x00},
253 {0x41,0x9a1d,0x0000,0x3a34,0x010e,0x08,0x00,0x00,0x00,0x04,0x00},	/* ModeIdIndex = 0x10 */
254 {0x43,0x0a1c,0x0306,0x3a57,0x0110,0x08,0x06,0x00,0x00,0x05,0x06},
255 {0x44,0x0a1d,0x0306,0x3a57,0x0111,0x08,0x06,0x00,0x00,0x05,0x06},
256 {0x46,0x2a1c,0x0407,0x3a81,0x0113,0x08,0x07,0x00,0x00,0x07,0x0e},
257 {0x47,0x2a1d,0x0407,0x3a81,0x0114,0x08,0x07,0x00,0x00,0x07,0x0e},
258 {0x49,0x0a3c,0x0508,0x3aab,0x0116,0x08,0x08,0x00,0x00,0x00,0x16},
259 {0x4a,0x0a3d,0x0508,0x3aab,0x0117,0x08,0x08,0x00,0x00,0x00,0x16},
260 {0x4c,0x0e7c,0x0609,0x3adc,0x0119,0x08,0x09,0x00,0x00,0x00,0x1e},
261 {0x4d,0x0e7d,0x0609,0x3adc,0x011a,0x08,0x09,0x00,0x00,0x00,0x1e},
262 {0x50,0x9a1b,0x0001,0x3a3b,0x0132,0x08,0x01,0x00,0x00,0x04,0x02},
263 {0x51,0xba1b,0x0103,0x3a42,0x0133,0x08,0x03,0x00,0x00,0x07,0x03},
264 {0x52,0x9a1b,0x0204,0x3a49,0x0134,0x08,0x04,0x00,0x00,0x00,0x04},
265 {0x56,0x9a1d,0x0001,0x3a3b,0x0135,0x08,0x01,0x00,0x00,0x04,0x02},
266 {0x57,0xba1d,0x0103,0x3a42,0x0136,0x08,0x03,0x00,0x00,0x07,0x03},
267 {0x58,0x9a1d,0x0204,0x3a49,0x0137,0x08,0x04,0x00,0x00,0x00,0x04},
268 {0x59,0x9a1b,0x0000,0x3a34,0x0138,0x08,0x00,0x00,0x00,0x04,0x00},
269 {0x5A,0x021b,0x0014,0x3b83,0x0138,0x08,0x01,0x00,0x00,0x04,0x3f},	/* ModeIdIndex = 0x20 */
270 {0x5B,0x0a1d,0x0014,0x3b83,0x0135,0x08,0x01,0x00,0x00,0x04,0x3f},
271 {0x5d,0x0a1d,0x0305,0x3a50,0x0139,0x08,0x05,0x00,0x00,0x07,0x05},
272 {0x62,0x0a3f,0x0306,0x3a57,0x013a,0x08,0x06,0x00,0x00,0x05,0x06},
273 {0x63,0x2a3f,0x0407,0x3a81,0x013b,0x08,0x07,0x00,0x00,0x07,0x0e},
274 {0x64,0x0a7f,0x0508,0x3aab,0x013c,0x08,0x08,0x00,0x00,0x00,0x16},
275 {0x65,0x0eff,0x0609,0x3adc,0x013d,0x08,0x09,0x00,0x00,0x00,0x1e},
276 {0x66,0x0eff,0x070a,0x3af2,0x013e,0x08,0x0a,0x00,0x00,0x00,0x22},	/* mode 1600x1200 add CRT2MODE */
277 {0x68,0x067b,0x080b,0x3b17,0x013f,0x08,0x0b,0x00,0x00,0x00,0x29},
278 {0x69,0x06fd,0x080b,0x3b17,0x0140,0x08,0x0b,0x00,0x00,0x00,0x29},
279 {0x6b,0x07ff,0x080b,0x3b17,0x0141,0x10,0x0b,0x00,0x00,0x00,0x29},
280 {0x6c,0x067b,0x090c,0x3b37,0x0000,0x08,0x0c,0x00,0x00,0x00,0x2f},
281 {0x6d,0x06fd,0x090c,0x3b37,0x0000,0x10,0x0c,0x00,0x00,0x00,0x2f},
282 {0x6e,0x07ff,0x090c,0x3b37,0x0000,0x10,0x0c,0x00,0x00,0x00,0x2f},
283 {0x70,0x2a1b,0x0410,0x3b52,0x0000,0x08,0x10,0x00,0x00,0x07,0x34},
284 {0x71,0x0a1b,0x0511,0x3b63,0x0000,0x08,0x11,0x00,0x00,0x00,0x37},
285 {0x74,0x0a1d,0x0511,0x3b63,0x0000,0x08,0x11,0x00,0x00,0x00,0x37},	/* ModeIdIndex = 0x30 */
286 {0x75,0x0a3d,0x0612,0x3b74,0x0000,0x08,0x12,0x00,0x00,0x00,0x3a},
287 {0x76,0x2a1f,0x0410,0x3b52,0x0000,0x08,0x10,0x00,0x00,0x07,0x34},
288 {0x77,0x0a1f,0x0511,0x3b63,0x0000,0x08,0x11,0x00,0x00,0x00,0x37},
289 {0x78,0x0a3f,0x0612,0x3b74,0x0000,0x08,0x12,0x00,0x00,0x00,0x3a},
290 {0x79,0x0a3b,0x0612,0x3b74,0x0000,0x08,0x12,0x00,0x00,0x00,0x3a},
291 {0x7a,0x2a1d,0x0410,0x3b52,0x0000,0x08,0x10,0x00,0x00,0x07,0x34},
292 {0x7b,0x0e3b,0x060f,0x3ad0,0x0000,0x08,0x0f,0x00,0x00,0x00,0x1d},
293 {0x7c,0x0e7d,0x060f,0x3ad0,0x0000,0x08,0x0f,0x00,0x00,0x00,0x1d},
294 {0x7d,0x0eff,0x060f,0x3ad0,0x0000,0x08,0x0f,0x00,0x00,0x00,0x1d},
295 {0x20,0x0e3b,0x0D16,0x49e0,0x0000,0x08,0x16,0x00,0x00,0x00,0x43},
296 {0x21,0x0e7d,0x0D16,0x49e0,0x0000,0x08,0x16,0x00,0x00,0x00,0x43},
297 {0x22,0x0eff,0x0D16,0x49e0,0x0000,0x08,0x16,0x00,0x00,0x00,0x43},
298 {0x23,0x0e3b,0x0614,0x49d5,0x0000,0x08,0x14,0x00,0x00,0x00,0x41},
299 {0x24,0x0e7d,0x0614,0x49d5,0x0000,0x08,0x14,0x00,0x00,0x00,0x41},
300 {0x25,0x0eff,0x0614,0x49d5,0x0000,0x08,0x14,0x00,0x00,0x00,0x41},
301 {0x26,0x063b,0x0c15,0x49dc,0x0000,0x08,0x15,0x00,0x00,0x00,0x42},	/* ModeIdIndex = 0x40 */
302 {0x27,0x067d,0x0c15,0x49dc,0x0000,0x08,0x15,0x00,0x00,0x00,0x42},
303 {0x28,0x06ff,0x0c15,0x49dc,0x0000,0x08,0x15,0x00,0x00,0x00,0x42},
304 {0xff,0x0000,0x0000,0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00}
305};
306
307/* Jong 10/04/2007; merge code */
308TimingInfo SpecialModeTiming[]=
309{
310  {1280,110, 40,220,    720, 5,  5, 20,
311      74.18,     60,      0, 0
312  },
313  {1440, 80,152,232,    900, 1,  3, 28,
314    106.472,     60,      0, 0
315  },
316  {1920, 88, 44,148,    540, 2,  5, 15,
317      74.11,     60,      1, 0
318  },
319  {1920,120,208,328,   1080, 1,  3, 34,
320      172.8,     60,      0, 0
321  },
322  {1920,128,208,336,   1200, 1,  3, 38,
323     193.16,     60,      0, 0
324  },
325  {   0,  0,  0,  0,      0, 0,  0,  0,
326          0,      0,      0, 0
327  }
328};
329
330
331
332XGI_StandTableStruct XGI330_StandTable[]=
333{
334/* MD_0_200 */
335 {
336  0x28,0x18,0x08,0x0800,
337  {0x09,0x03,0x00,0x02},
338  0x63,
339  {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
340   0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
341   0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
342   0xff},
343  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
344   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
345   0x08,0x00,0x0f,0x00},
346  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
347   0xff}
348 },
349/* MD_1_200 */
350 {
351  0x28,0x18,0x08,0x0800,
352  {0x09,0x03,0x00,0x02},
353  0x63,
354  {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
355   0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
356   0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
357   0xff},
358  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
359   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
360   0x08,0x00,0x0f,0x00},
361  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
362   0xff}
363 },
364/* MD_2_200 */
365 {
366  0x50,0x18,0x08,0x1000,
367  {0x01,0x03,0x00,0x02},
368  0x63,
369  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
370   0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
371   0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
372   0xff},
373  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
374   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
375   0x08,0x00,0x0f,0x00},
376  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
377   0xff}
378 },
379/* MD_3_200 */
380 {
381  0x50,0x18,0x08,0x1000,
382  {0x01,0x03,0x00,0x02},
383  0x63,
384  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
385   0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
386   0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
387   0xff},
388  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
389   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
390   0x08,0x00,0x0f,0x00},
391  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
392   0xff}
393 },
394/* MD_4 */
395 {
396  0x28,0x18,0x08,0x4000,
397  {0x09,0x03,0x00,0x02},
398  0x63,
399  {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
400   0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
401   0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
402   0xff},
403  {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
404   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
405   0x01,0x00,0x03,0x00},
406  {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
407   0xff}
408 },
409/* MD_5 */
410 {
411  0x28,0x18,0x08,0x4000,
412  {0x09,0x03,0x00,0x02},
413  0x63,
414  {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
415   0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
416   0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
417   0xff},
418  {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
419   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
420   0x01,0x00,0x03,0x00},
421  {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
422   0xff}
423 },
424/* MD_6 */
425 {
426  0x50,0x18,0x08,0x4000,
427  {0x01,0x01,0x00,0x06},
428  0x63,
429  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
430   0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
431   0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xc2,
432   0xff},
433  {0x00,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
434   0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
435   0x01,0x00,0x01,0x00},
436  {0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x00,
437   0xff}
438 },
439/* MD_7 */
440 {
441  0x50,0x18,0x0e,0x1000,
442  {0x00,0x03,0x00,0x03},
443  0xa6,
444  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
445   0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
446   0x83,0x85,0x5d,0x28,0x0d,0x63,0xba,0xa3,
447   0xff},
448  {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
449   0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
450   0x0e,0x00,0x0f,0x08},
451  {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
452   0xff}
453 },
454/* MDA_DAC */
455 {
456  0x00,0x00,0x00,0x0000,
457  {0x00,0x00,0x00,0x15},
458  0x15,
459  {0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
460   0x15,0x15,0x15,0x15,0x15,0x15,0x3f,0x3f,
461   0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x00,0x00,
462   0x00},
463  {0x00,0x00,0x00,0x00,0x00,0x15,0x15,0x15,
464   0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
465   0x15,0x15,0x15,0x15},
466  {0x15,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
467   0x3f}
468 },
469/* CGA_DAC */
470 {
471  0x00,0x10,0x04,0x0114,
472  {0x11,0x09,0x15,0x00},
473  0x10,
474  {0x04,0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,
475   0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x2a,0x3a,
476   0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x10,
477   0x04},
478  {0x14,0x01,0x11,0x09,0x15,0x00,0x10,0x04,
479   0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,0x2e,
480   0x3e,0x2b,0x3b,0x2f},
481  {0x3f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
482   0x3f}
483 },
484/* EGA_DAC */
485 {
486  0x00,0x10,0x04,0x0114,
487  {0x11,0x05,0x15,0x20},
488  0x30,
489  {0x24,0x34,0x21,0x31,0x25,0x35,0x08,0x18,
490   0x0c,0x1c,0x09,0x19,0x0d,0x1d,0x28,0x38,
491   0x2c,0x3c,0x29,0x39,0x2d,0x3d,0x02,0x12,
492   0x06},
493  {0x16,0x03,0x13,0x07,0x17,0x22,0x32,0x26,
494   0x36,0x23,0x33,0x27,0x37,0x0a,0x1a,0x0e,
495   0x1e,0x0b,0x1b,0x0f},
496  {0x1f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
497   0x3f}
498 },
499/* VGA_DAC */
500 {
501  0x00,0x10,0x04,0x0114,
502  {0x11,0x09,0x15,0x2a},
503  0x3a,
504  {0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x05,
505   0x08,0x0b,0x0e,0x11,0x14,0x18,0x1c,0x20,
506   0x24,0x28,0x2d,0x32,0x38,0x3f,0x00,0x10,
507   0x1f},
508  {0x2f,0x3f,0x1f,0x27,0x2f,0x37,0x3f,0x2d,
509   0x31,0x36,0x3a,0x3f,0x00,0x07,0x0e,0x15,
510   0x1c,0x0e,0x11,0x15},
511  {0x18,0x1c,0x14,0x16,0x18,0x1a,0x1c,0x00,
512   0x04}
513 },
514 {
515  0x08,0x0c,0x10,0x0a08,
516  {0x0c,0x0e,0x10,0x0b},
517  0x0c,
518  {0x0d,0x0f,0x10,0x10,0x01,0x08,0x00,0x00,
519   0x00,0x00,0x01,0x00,0x02,0x02,0x01,0x00,
520   0x04,0x04,0x01,0x00,0x05,0x02,0x05,0x00,
521   0x06},
522  {0x01,0x06,0x05,0x06,0x00,0x08,0x01,0x08,
523   0x00,0x07,0x02,0x07,0x06,0x07,0x00,0x00,
524   0x00,0x00,0x00,0x00},
525  {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
526   0x00}
527 },
528/* MD_D */
529 {
530  0x28,0x18,0x08,0x2000,
531  {0x09,0x0f,0x00,0x06},
532  0x63,
533  {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
534   0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
535   0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xe3,
536   0xff},
537  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
538   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
539   0x01,0x00,0x0f,0x00},
540  {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
541   0xff}
542 },
543/* MD_E */
544 {
545  0x50,0x18,0x08,0x4000,
546  {0x01,0x0f,0x00,0x06},
547  0x63,
548  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
549   0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
550   0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xe3,
551   0xff},
552  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
553   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
554   0x01,0x00,0x0f,0x00},
555  {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
556   0xff}
557 },
558/* ExtVGATable */
559 {
560  0x00,0x00,0x00,0x0000,
561  {0x01,0x0f,0x00,0x0e},
562  0x23,
563  {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
564   0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
565   0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
566   0xff},
567  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
568   0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
569   0x01,0x00,0x00,0x00},
570  {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
571   0xff}
572 },
573/* ROM_SAVEPTR */
574 {
575  0x9f,0x3b,0x00,0x00c0,
576  {0x00,0x00,0x00,0x00},
577  0x00,
578  {0x00,0x00,0x00,0x00,0x00,0x00,0xbb,0x3f,
579   0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
580   0x00,0x00,0x1a,0x00,0xac,0x3e,0x00,0xc0,
581   0x00},
582  {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
583   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
584   0x00,0x00,0x00,0x00},
585  {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
586   0x00}
587 },
588/* MD_F */
589 {
590  0x50,0x18,0x0e,0x8000,
591  {0x01,0x0f,0x00,0x06},
592  0xa2,
593  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
594   0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
595   0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3,
596   0xff},
597  {0x00,0x08,0x00,0x00,0x18,0x18,0x00,0x00,
598   0x00,0x08,0x00,0x00,0x00,0x18,0x00,0x00,
599   0x0b,0x00,0x05,0x00},
600  {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,
601   0xff}
602 },
603/* MD_10 */
604 {
605  0x50,0x18,0x0e,0x8000,
606  {0x01,0x0f,0x00,0x06},
607  0xa3,
608  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
609   0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
610   0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3,
611   0xff},
612  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
613   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
614   0x01,0x00,0x0f,0x00},
615  {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
616   0xff}
617 },
618/* MD_0_350 */
619 {
620  0x28,0x18,0x0e,0x0800,
621  {0x09,0x03,0x00,0x02},
622  0xa3,
623  {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f,
624   0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
625   0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
626   0xff},
627  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
628   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
629   0x08,0x00,0x0f,0x00},
630  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
631   0xff}
632 },
633/* MD_1_350 */
634 {
635  0x28,0x18,0x0e,0x0800,
636  {0x09,0x03,0x00,0x02},
637  0xa3,
638  {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
639   0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
640   0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
641   0xff},
642  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
643   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
644   0x08,0x00,0x0f,0x00},
645  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
646   0xff}
647 },
648/* MD_2_350 */
649 {
650  0x50,0x18,0x0e,0x1000,
651  {0x01,0x03,0x00,0x02},
652  0xa3,
653  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
654   0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
655   0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
656   0xff},
657  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
658   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
659   0x08,0x00,0x0f,0x00},
660  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
661   0xff}
662 },
663/* MD_3_350 */
664 {
665  0x50,0x18,0x0e,0x1000,
666  {0x01,0x03,0x00,0x02},
667  0xa3,
668  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
669   0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
670   0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
671   0xff},
672  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
673   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
674   0x08,0x00,0x0f,0x00},
675  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
676   0xff}
677 },
678/* MD_0_1_400 */
679 {
680  0x28,0x18,0x10,0x0800,
681  {0x08,0x03,0x00,0x02},
682  0x67,
683  {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f,
684   0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
685   0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
686   0xff},
687  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
688   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
689   0x0c,0x00,0x0f,0x08},
690  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
691   0xff}
692 },
693/* MD_2_3_400 */
694 {
695  0x50,0x18,0x10,0x1000,
696  {0x00,0x03,0x00,0x02},
697  0x67,
698  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
699   0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
700   0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
701   0xff},
702  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
703   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
704   0x0c,0x00,0x0f,0x08},
705  {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
706   0xff}
707 },
708/* MD_7_400 */
709 {
710  0x50,0x18,0x10,0x1000,
711  {0x00,0x03,0x00,0x02},
712  0x66,
713  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
714   0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
715   0x9c,0x8e,0x8f,0x28,0x0f,0x96,0xb9,0xa3,
716   0xff},
717  {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
718   0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
719   0x0e,0x00,0x0f,0x08},
720  {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
721   0xff}
722 },
723/* MD_11 */
724 {
725  0x50,0x1d,0x10,0xa000,
726  {0x01,0x0f,0x00,0x06},
727  0xe3,
728  {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
729   0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
730   0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xc3,
731   0xff},
732  {0x00,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
733   0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
734   0x01,0x00,0x0f,0x00},
735  {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,
736   0xff}
737 },
738/* ExtEGATable */
739 {
740  0x50,0x1d,0x10,0xa000,
741  {0x01,0x0f,0x00,0x06},
742  0xe3,
743  {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
744   0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
745   0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xe3,
746   0xff},
747  {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
748   0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
749   0x01,0x00,0x0f,0x00},
750  {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
751   0xff}
752 },
753/* MD_13 */
754 {
755  0x28,0x18,0x08,0x2000,
756  {0x01,0x0f,0x00,0x0e},
757  0x63,
758  {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
759   0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,
760   0x9c,0x8e,0x8f,0x28,0x40,0x96,0xb9,0xa3,
761   0xff},
762  {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
763   0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
764   0x41,0x00,0x0f,0x00},
765  {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
766   0xff}
767 }
768};
769
770static const XGI_TimingHStruct XGI_TimingH[]=
771{{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};
772
773static const XGI_TimingVStruct XGI_TimingV[]=
774{{{0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};
775
776/* Jong 10/04/2007; merge code */
777XGI_XG21CRT1Struct XGI_UpdateCRT1Table[]=
778{
779 {0x01,0x27,0x91,0x8f,0xc0},	/* 00 */
780 {0x03,0x4f,0x83,0x8f,0xc0},	/* 01 */
781 {0x05,0x27,0x91,0x8f,0xc0},	/* 02 */
782 {0x06,0x4f,0x83,0x8f,0xc0},	/* 03 */
783 {0x07,0x4f,0x83,0x8f,0xc0},	/* 04 */
784 {0x0d,0x27,0x91,0x8f,0xc0},	/* 05 */
785 {0x0e,0x4f,0x83,0x8f,0xc0},	/* 06 */
786 {0x0f,0x4f,0x83,0x5d,0xc0},	/* 07 */
787 {0x10,0x4f,0x83,0x5d,0xc0},	/* 08 */
788 {0x11,0x4f,0x83,0xdf,0x0c},	/* 09 */
789 {0x12,0x4f,0x83,0xdf,0x0c},	/* 10 */
790 {0x13,0x4f,0x83,0x8f,0xc0},	/* 11 */
791 {0x2e,0x4f,0x83,0xdf,0x0c},	/* 12 */
792 {0x2e,0x4f,0x87,0xdf,0xc0},	/* 13 */
793 {0x2f,0x4f,0x83,0x8f,0xc0},	/* 14 */
794 {0x50,0x27,0x91,0xdf,0x0c},	/* 15 */
795 {0x59,0x27,0x91,0x8f,0xc0}	/* 16 */
796};
797
798static const XGI_CRT1TableStruct XGI_CRT1Table[]=
799{
800 {{0x2d,0x28,0x90,0x2c,0x90,0x00,0x04,0x00,
801    0xbf,0x1f,0x9c,0x8e,0x96,0xb9,0x30}}, /* 0x0 */
802 {{0x2d,0x28,0x90,0x2c,0x90,0x00,0x04,0x00,
803    0x0b,0x3e,0xe9,0x8b,0xe7,0x04,0x00}}, /* 0x1 */
804 {{0x3D,0x31,0x81,0x37,0x1F,0x00,0x05,0x00,
805    0x72,0xF0,0x58,0x8C,0x57,0x73,0xA0}}, /* 0x2 */
806 {{0x4F,0x3F,0x93,0x45,0x0D,0x00,0x01,0x00,
807    0x24,0xF5,0x02,0x88,0xFF,0x25,0x90}}, /* 0x3 */
808 {{0x5F,0x50,0x82,0x55,0x81,0x00,0x05,0x00,
809    0xBF,0x1F,0x9C,0x8E,0x96,0xB9,0x30}}, /* 0x4 */
810 {{0x5F,0x50,0x82,0x55,0x81,0x00,0x05,0x00,
811    0x0B,0x3E,0xE9,0x8B,0xE7,0x04,0x00}}, /* 0x5 */
812 {{0x63,0x50,0x86,0x56,0x9B,0x00,0x01,0x00,
813    0x06,0x3E,0xE8,0x8B,0xE7,0xFF,0x10}}, /* 0x6 */
814 {{0x64,0x4F,0x88,0x55,0x9D,0x00,0x01,0x00,
815    0xF2,0x1F,0xE0,0x83,0xDF,0xF3,0x10}}, /* 0x7 */
816 {{0x63,0x4F,0x87,0x5A,0x81,0x00,0x05,0x00,
817    0xFB,0x1F,0xE0,0x83,0xDF,0xFC,0x10}}, /* 0x8 */
818 {{0x65,0x4F,0x89,0x58,0x80,0x00,0x05,0x60,
819    0xFB,0x1F,0xE0,0x83,0xDF,0xFC,0x80}}, /* 0x9 */
820 {{0x65,0x4F,0x89,0x58,0x80,0x00,0x05,0x60,
821    0x01,0x3E,0xE0,0x83,0xDF,0x02,0x80}}, /* 0xa */
822 {{0x67,0x4F,0x8B,0x58,0x81,0x00,0x05,0x60,
823    0x0D,0x3E,0xE0,0x83,0xDF,0x0E,0x90}}, /* 0xb */
824 {{0x65,0x4F,0x89,0x57,0x9F,0x00,0x01,0x00,
825   0xFB,0x1F,0xE6,0x8A,0xDF,0xFC,0x10}}, /* 0xc */
826 {{0x7B,0x63,0x9F,0x6A,0x93,0x00,0x05,0x00,    /* ; 0D (800x600,56Hz) */
827    0x6F,0xF0,0x58,0x8A,0x57,0x70,0xA0}},         /* ; (VCLK 36.0MHz) */
828 {{0x7F,0x63,0x83,0x6C,0x1C,0x00,0x06,0x00,    /* ; 0E (800x600,60Hz) */
829    0x72,0xF0,0x58,0x8C,0x57,0x73,0xA0}},         /* ; (VCLK 40.0MHz) */
830 {{0x7D,0x63,0x81,0x6E,0x1D,0x00,0x06,0x00,    /* ; 0F (800x600,72Hz) */
831    0x98,0xF0,0x7C,0x82,0x57,0x99,0x80}},         /* ; (VCLK 50.0MHz) */
832 {{0x7F,0x63,0x83,0x69,0x13,0x00,0x06,0x00,    /* ; 10 (800x600,75Hz) */
833    0x6F,0xF0,0x58,0x8B,0x57,0x70,0xA0}},         /* ; (VCLK 49.5MHz) */
834 {{0x7E,0x63,0x82,0x6B,0x13,0x00,0x06,0x00,    /* ; 11 (800x600,85Hz) */
835    0x75,0xF0,0x58,0x8B,0x57,0x76,0xA0}},         /* ; (VCLK 56.25MHz) */
836 {{0x81,0x63,0x85,0x6D,0x18,0x00,0x06,0x60,    /* ; 12 (800x600,100Hz) */
837    0x7A,0xF0,0x58,0x8B,0x57,0x7B,0xA0}},         /* ; (VCLK 75.8MHz) */
838 {{0x83,0x63,0x87,0x6E,0x19,0x00,0x06,0x60,    /* ; 13 (800x600,120Hz) */
839    0x81,0xF0,0x58,0x8B,0x57,0x82,0xA0}},         /* ; (VCLK 79.411MHz) */
840 {{0x85,0x63,0x89,0x6F,0x1A,0x00,0x06,0x60,    /* ; 14 (800x600,160Hz) */
841   0x91,0xF0,0x58,0x8B,0x57,0x92,0xA0}},         /* ; (VCLK 105.822MHz) */
842 {{0x99,0x7F,0x9D,0x84,0x1A,0x00,0x02,0x00,
843    0x96,0x1F,0x7F,0x83,0x7F,0x97,0x10}}, /* 0x15 */
844 {{0xA3,0x7F,0x87,0x86,0x97,0x00,0x02,0x00,
845    0x24,0xF5,0x02,0x88,0xFF,0x25,0x90}}, /* 0x16 */
846 {{0xA1,0x7F,0x85,0x86,0x97,0x00,0x02,0x00,
847    0x24,0xF5,0x02,0x88,0xFF,0x25,0x90}}, /* 0x17 */
848 {{0x9F,0x7F,0x83,0x85,0x91,0x00,0x02,0x00,
849    0x1E,0xF5,0x00,0x83,0xFF,0x1F,0x90}}, /* 0x18 */
850 {{0xA7,0x7F,0x8B,0x89,0x95,0x00,0x02,0x00,
851    0x26,0xF5,0x00,0x83,0xFF,0x27,0x90}}, /* 0x19 */
852 {{0xA9,0x7F,0x8D,0x8C,0x9A,0x00,0x02,0x62,
853    0x2C,0xF5,0x00,0x83,0xFF,0x2D,0x14}}, /* 0x1a */
854 {{0xAB,0x7F,0x8F,0x8D,0x9B,0x00,0x02,0x62,
855    0x35,0xF5,0x00,0x83,0xFF,0x36,0x14}}, /* 0x1b */
856 {{0xCF,0x9F,0x93,0xB2,0x01,0x00,0x03,0x00,
857    0x14,0xBA,0x00,0x83,0xFF,0x15,0x00}}, /* 0x1c */
858 {{0xCE,0x9F,0x92,0xA9,0x17,0x00,0x07,0x00,
859    0x28,0x5A,0x00,0x83,0xFF,0x29,0x89}}, /* 0x1d */
860 {{0xCE,0x9F,0x92,0xA5,0x17,0x00,0x07,0x00,
861    0x28,0x5A,0x00,0x83,0xFF,0x29,0x89}}, /* 0x1e */
862 {{0xD3,0x9F,0x97,0xAB,0x1F,0x00,0x07,0x00,
863    0x2E,0x5A,0x00,0x83,0xFF,0x2F,0x89}}, /* 0x1f */
864 {{0x09,0xC7,0x8D,0xD3,0x0B,0x01,0x04,0x00,
865    0xE0,0x10,0xB0,0x83,0xAF,0xE1,0x2F}}, /* 0x20 */
866 {{0x09,0xC7,0x8D,0xD3,0x0B,0x01,0x04,0x00,
867    0xE0,0x10,0xB0,0x83,0xAF,0xE1,0x2F}}, /* 0x21 */
868 {{0x09,0xC7,0x8D,0xD3,0x0B,0x01,0x04,0x00,
869    0xE0,0x10,0xB0,0x83,0xAF,0xE1,0x2F}}, /* 0x22 */
870 {{0x09,0xC7,0x8D,0xD3,0x0B,0x01,0x04,0x00,
871    0xE0,0x10,0xB0,0x83,0xAF,0xE1,0x2F}}, /* 0x23 */
872 {{0x09,0xC7,0x8D,0xD3,0x0B,0x01,0x04,0x00,
873    0xE0,0x10,0xB0,0x83,0xAF,0xE1,0x2F}}, /* 0x24 */
874 {{0x09,0xC7,0x8D,0xD3,0x0B,0x01,0x04,0x00,
875    0xE0,0x10,0xB0,0x83,0xAF,0xE1,0x2F}}, /* 0x25 */
876 {{0x09,0xC7,0x8D,0xD3,0x0B,0x01,0x04,0x00,
877    0xE0,0x10,0xB0,0x83,0xAF,0xE1,0x2F}}, /* 0x26 */
878 {{0x40,0xEF,0x84,0x03,0x1D,0x41,0x01,0x00,
879    0xDA,0x1F,0xA0,0x83,0x9F,0xDB,0x1F}}, /* 0x27 */
880 {{0x43,0xEF,0x87,0x06,0x00,0x41,0x05,0x62,
881    0xD4,0x1F,0xA0,0x83,0x9F,0xD5,0x9F}}, /* 0x28 */
882 {{0x45,0xEF,0x89,0x07,0x01,0x41,0x05,0x62,
883    0xD9,0x1F,0xA0,0x83,0x9F,0xDA,0x9F}}, /* 0x29 */
884 {{0x40,0xEF,0x84,0x03,0x1D,0x41,0x01,0x00,
885    0xDA,0x1F,0xA0,0x83,0x9F,0xDB,0x1F}}, /* 0x2a */
886 {{0x40,0xEF,0x84,0x03,0x1D,0x41,0x01,0x00,
887    0xDA,0x1F,0xA0,0x83,0x9F,0xDB,0x1F}}, /* 0x2b */
888 {{0x40,0xEF,0x84,0x03,0x1D,0x41,0x01,0x00,
889    0xDA,0x1F,0xA0,0x83,0x9F,0xDB,0x1F}}, /* 0x2c */
890 {{0x59,0xFF,0x9D,0x17,0x13,0x41,0x05,0x44,
891    0x33,0xBA,0x00,0x83,0xFF,0x34,0x0F}}, /* 0x2d */
892 {{0x5B,0xFF,0x9F,0x18,0x14,0x41,0x05,0x44,
893    0x38,0xBA,0x00,0x83,0xFF,0x39,0x0F}}, /* 0x2e */
894 {{0x5B,0xFF,0x9F,0x18,0x14,0x41,0x05,0x44,
895    0x3D,0xBA,0x00,0x83,0xFF,0x3E,0x0F}}, /* 0x2f */
896 {{0x5D,0xFF,0x81,0x19,0x95,0x41,0x05,0x44,
897    0x41,0xBA,0x00,0x84,0xFF,0x42,0x0F}}, /* 0x30 */
898 {{0x55,0xFF,0x99,0x0D,0x0C,0x41,0x05,0x00,
899    0x3E,0xBA,0x00,0x84,0xFF,0x3F,0x0F}}, /* 0x31 */
900 {{0x7F,0x63,0x83,0x6C,0x1C,0x00,0x06,0x00,
901    0x72,0xBA,0x27,0x8B,0xDF,0x73,0x80}}, /* 0x32 */
902 {{0x7F,0x63,0x83,0x69,0x13,0x00,0x06,0x00,
903    0x6F,0xBA,0x26,0x89,0xDF,0x6F,0x80}}, /* 0x33 */
904 {{0x7F,0x63,0x82,0x6B,0x13,0x00,0x06,0x00,
905    0x75,0xBA,0x29,0x8C,0xDF,0x75,0x80}}, /* 0x34 */
906 {{0xA3,0x7F,0x87,0x86,0x97,0x00,0x02,0x00,
907    0x24,0xF1,0xAF,0x85,0x3F,0x25,0xB0}}, /* 0x35 */
908 {{0x9F,0x7F,0x83,0x85,0x91,0x00,0x02,0x00,
909    0x1E,0xF1,0xAD,0x81,0x3F,0x1F,0xB0}}, /* 0x36 */
910 {{0xA7,0x7F,0x88,0x89,0x15,0x00,0x02,0x00,
911    0x26,0xF1,0xB1,0x85,0x3F,0x27,0xB0}}, /* 0x37 */
912 {{0xCE,0x9F,0x92,0xA9,0x17,0x00,0x07,0x00,
913    0x28,0xC4,0x7A,0x8E,0xCF,0x29,0xA1}}, /* 0x38 */
914 {{0xCE,0x9F,0x92,0xA5,0x17,0x00,0x07,0x00,
915    0x28,0xD4,0x7A,0x8E,0xCF,0x29,0xA1}}, /* 0x39 */
916 {{0xD3,0x9F,0x97,0xAB,0x1F,0x00,0x07,0x00,
917    0x2E,0xD4,0x7D,0x81,0xCF,0x2F,0xA1}}, /* 0x3a */
918 {{0xDC,0x9F,0x00,0xAB,0x19,0x00,0x07,0x00,
919    0xE6,0xEF,0xC0,0xC3,0xBF,0xE7,0x90}}, /* 0x3b */
920 {{0x6B,0x59,0x8F,0x5E,0x8C,0x00,0x05,0x00,
921    0x0B,0x3E,0xE9,0x8B,0xE7,0x04,0x00}}, /* 0x3c */
922 {{0x7B,0x63,0x9F,0x6A,0x93,0x00,0x05,0x00,
923    0x6F,0xF0,0x58,0x8A,0x57,0x70,0xA0}}, /* 0x3d */
924 {{0x86,0x6A,0x8a,0x74,0x06,0x00,0x02,0x00,
925    0x8c,0x15,0x4f,0x83,0xef,0x8d,0x30}}, /* 0x3e */
926 {{0x81,0x6A,0x85,0x70,0x00,0x00,0x02,0x00,
927    0x0f,0x3e,0xeb,0x8e,0xdf,0x10,0x00}}, /* 0x3f */
928 {{0xCE,0x9F,0x92,0xA9,0x17,0x00,0x07,0x00,
929    0x20,0xF5,0x03,0x88,0xFF,0x21,0x90}}, /* 0x40 */
930 {{0xE6,0xAE,0x8A,0xBD,0x90,0x00,0x03,0x00,
931    0x3D,0x10,0x1A,0x8D,0x19,0x3E,0x2F}}, /* 0x41 */
932 {{0xB9,0x8F,0x9D,0x9B,0x8A,0x00,0x06,0x00,
933    0x7D,0xFF,0x60,0x83,0x5F,0x7E,0x90}}, /* 0x42 */
934 {{0xC3,0x8F,0x87,0x9B,0x0B,0x00,0x07,0x00,
935    0x82,0xFF,0x60,0x83,0x5F,0x83,0x90}},  /* 0x43 */
936 {{0xAD,0x7F,0x91,0x8E,0x9C,0x00,0x02,0x82,
937    0x49,0xF5,0x00,0x83,0xFF,0x4A,0x90}},  /* 0x44 */
938 {{0xCD,0x9F,0x91,0xA7,0x19,0x00,0x07,0x60,
939    0xE6,0xFF,0xC0,0x83,0xBF,0xE7,0x90}},  /* 0x45 */
940 {{0xD3,0x9F,0x97,0xAB,0x1F,0x00,0x07,0x60,
941    0xF1,0xFF,0xC0,0x83,0xBF,0xF2,0x90}},  /* 0x46 */
942 {{0xD7,0x9F,0x9B,0xAC,0x1E,0x00,0x07,0x00,
943    0x03,0xDE,0xC0,0x84,0xBF,0x04,0x90}}  /* 0x47 */
944};
945
946static const XGI330_CHTVRegDataStruct XGI_CHTVRegUNTSC[] = {
947                /* Index:000h,001h,002h,004h,003h,005h,006h,007h,008h,015h,01Fh,00Ch,00Dh,00Eh,00Fh,010h */
948                {{      0x4A,0x77,0xBB,0x94,0x84,0x48,0xFE,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 00 (640x200,640x400) */
949                {{      0x4A,0x77,0xBB,0x94,0x84,0x48,0xFE,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 01 (640x350) */
950                {{      0x4A,0x77,0xBB,0x94,0x84,0x48,0xFE,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 02 (720x400) */
951                {{      0x4A,0x77,0xBB,0x94,0x84,0x48,0xFE,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 03 (720x350) */
952                {{      0x6A,0x77,0xBB,0x6E,0x84,0x2E,0x02,0x5A,0x04,0x00,0x80,0x20,0x7E,0x80,0x97,0x00  }},/* 04 (640x480) ;;5/6/02 */
953                {{      0xCF,0x77,0xB7,0xC8,0x84,0x3B,0x02,0x5A,0x04,0x00,0x80,0x19,0x88,0xAE,0xA3,0x00  }},/* 05 (800x600) ;;1/12/02 */
954                {{      0xEE,0x77,0xBB,0x66,0x87,0x32,0x01,0x5A,0x04,0x00,0x80,0x1B,0xD4,0x2F,0x6F,0x00  }}/* 06 (1024x768) ;;5/6/02 */
955          };
956
957static const XGI330_CHTVRegDataStruct XGI_CHTVRegONTSC[]= {
958                /* Index:000h,001h,002h,004h,003h,005h,006h,007h,008h,015h,01Fh,00Ch,00Dh,00Eh,00Fh,010h */
959                {{      0x49,0x77,0xBB,0x7B,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 00 (640x200,640x400) */
960                {{      0x49,0x77,0xBB,0x7B,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 01 (640x350) */
961                {{      0x49,0x77,0xBB,0x7B,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 02 (720x400) */
962                {{      0x49,0x77,0xBB,0x7B,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* 03 (720x350) */
963                {{      0x69,0x77,0xBB,0x6E,0x84,0x1E,0x00,0x5A,0x04,0x00,0x80,0x25,0x1A,0x80,0x26,0x00  }},/* 04 (640x480) ;;5/6/02 */
964                {{      0xCE,0x77,0xB7,0xB6,0x83,0x2C,0x02,0x5A,0x04,0x00,0x80,0x1C,0x00,0x82,0x97,0x00  }},/* 05 (800x600) ;;5/6/02 */
965                {{      0xED,0x77,0xBB,0x66,0x8C,0x21,0x02,0x5A,0x04,0x00,0x80,0x1F,0xA0,0x7E,0x73,0x00  }}/* 06 (1024x768) ;;5/6/02 */
966          };
967
968static const XGI330_CHTVRegDataStruct XGI_CHTVRegUPAL[]=  {
969                /* Index:000h,001h,002h,004h,003h,005h,006h,007h,008h,015h,01Fh,00Ch,00Dh,00Eh,00Fh,010h */
970                {{      0x41,0x7F,0xB7,0x34,0xAD,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* ; 00 (640x200,640x400) */
971                {{      0x41,0x7F,0xB7,0x80,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* ; 01 (640x350) */
972                {{      0x41,0x7F,0xB7,0x34,0xAD,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* ; 02 (720x400) */
973                {{      0x41,0x7F,0xB7,0x12,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01  }},/* ; 03 (720x350) */
974                {{      0x61,0x7F,0xB7,0x99,0x84,0x35,0x04,0x5A,0x05,0x00,0x80,0x26,0x2A,0x55,0x5D,0x00  }},/* ; 04 (640x480) */
975                {{      0xC3,0x7F,0xB7,0x7A,0x84,0x40,0x02,0x5A,0x05,0x00,0x80,0x1F,0x84,0x3D,0x28,0x00  }},/* ; 05 (800x600) ;;1/12/02 */
976                {{      0xE5,0x7F,0xB7,0x1D,0xA7,0x3E,0x04,0x5A,0x05,0x00,0x80,0x20,0x3E,0xE4,0x22,0x00  }}/* ; 06 (1024x768) ;;1/12/02 */
977	  };
978
979static const XGI330_CHTVRegDataStruct XGI_CHTVRegOPAL[]={
980                /* Index:000,0x01,0x02,0x04,0x03,0x05,0x06,0x07,0x08,0x15,0x1F,0x0C,0x0D,0x0E,0x0F,0x10h */
981                {{      0x41,0x7F,0xB7,0x36,0xAD,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01 }},/* 00 (640x200,640x400) */
982                {{      0x41,0x7F,0xB7,0x86,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01 }},/* 01 (640x350) */
983                {{      0x41,0x7F,0xB7,0x36,0xAD,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01 }},/* 02 (720x400) */
984                {{      0x41,0x7F,0xB7,0x86,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01 }},/* 03 (720x350) */
985                {{      0x61,0x7F,0xB7,0x99,0x84,0x35,0x04,0x5A,0x05,0x00,0x80,0x26,0x2A,0x55,0x5D,0x00 }},/* 04 (640x480) */
986                {{      0xC1,0x7F,0xB7,0x4D,0x8C,0x1E,0x31,0x5A,0x05,0x00,0x80,0x26,0x78,0x19,0x34,0x00 }},/* 05 (800x600) ;;1/12/02 */
987                {{      0xE4,0x7F,0xB7,0x1E,0xAF,0x29,0x37,0x5A,0x05,0x00,0x80,0x25,0x8C,0xB2,0x2A,0x00 }}/* 06 (1024x768) ;;1/12/02 */
988	     };
989
990static const UCHAR XGI_CH7017LV1024x768[]={0x60,0x02,0x00,0x07,0x40,0xED,0xA3,
991                   			0xC8,0xC7,0xAC,0xE0,0x02};
992static const UCHAR XGI_CH7017LV1400x1050[]={0x60,0x03,0x11,0x00,0x40,0xE3,0xAD,
993                   			0xDB,0xF6,0xAC,0xE0,0x02};
994
995
996/*add for new UNIVGABIOS*/
997static const XGI330_LCDDataStruct  XGI_StLCD1024x768Data[]=
998{
999 {   62,  25, 800, 546,1344, 806},
1000 {   32,  15, 930, 546,1344, 806},
1001 {   62,  25, 800, 546,1344, 806}, /* chiawen for dot9 -> dot8 */
1002 {  104,  45, 945, 496,1344, 806},
1003 {   62,  25, 800, 546,1344, 806},
1004 {   31,  18,1008, 624,1344, 806},
1005 {    1,   1,1344, 806,1344, 806}
1006};
1007
1008static const XGI330_LCDDataStruct  XGI_ExtLCD1024x768Data[]=
1009{
1010 {   42,  25,1536, 419,1344, 806}, /* { 12, 5, 896, 512,1344, 806}, // alan 09/12/2003 */
1011 {   48,  25,1536, 369,1344, 806}, /* { 12, 5, 896, 510,1344, 806}, // alan 09/12/2003 */
1012 {   42,  25,1536, 419,1344, 806}, /* { 32, 15,1008, 505,1344, 806}, // alan 09/12/2003 */
1013 {   48,  25,1536, 369,1344, 806}, /* { 32, 15,1008, 514,1344, 806}, // alan 09/12/2003 */
1014 {   12,   5, 896, 500,1344, 806},
1015 {   42,  25,1024, 625,1344, 806},
1016 {    1,   1,1344, 806,1344, 806},
1017 {   12,   5, 896, 500,1344, 806},
1018 {   42,  25,1024, 625,1344, 806},
1019 {    1,   1,1344, 806,1344, 806},
1020 {   12,   5, 896, 500,1344, 806},
1021 {   42,  25,1024, 625,1344, 806},
1022 {    1,   1,1344, 806,1344, 806}
1023};
1024
1025/*XGI330_LCDDataStruct  XGI_St2LCD1024x768Data[]=
1026{
1027 {   62,  25, 800, 546,1344, 806},
1028 {   32,  15, 930, 546,1344, 806},
1029 {   62,  25, 800, 546,1344, 806},
1030 {  104,  45, 945, 496,1344, 806},
1031 {   62,  25, 800, 546,1344, 806},
1032 {   31,  18,1008, 624,1344, 806},
1033 {    1,   1,1344, 806,1344, 806}
1034};*/
1035
1036static const XGI330_LCDDataStruct  XGI_CetLCD1024x768Data[]=
1037{
1038	{         1,1,1344,806,1344,806           }, /* ; 00 (320x200,320x400,640x200,640x400) */
1039        {         1,1,1344,806,1344,806           }, /* 01 (320x350,640x350) */
1040        {         1,1,1344,806,1344,806           }, /* 02 (360x400,720x400) */
1041        {         1,1,1344,806,1344,806           }, /* 03 (720x350) */
1042        {         1,1,1344,806,1344,806           }, /* 04 (640x480x60Hz) */
1043        {         1,1,1344,806,1344,806           }, /* 05 (800x600x60Hz) */
1044        {         1,1,1344,806,1344,806           }  /* 06 (1024x768x60Hz) */
1045};
1046
1047static const XGI330_LCDDataStruct  XGI_StLCD1280x1024Data[]=
1048{
1049 {   22,   5, 800, 510,1650,1088},
1050 {   22,   5, 800, 510,1650,1088},
1051 {  176,  45, 900, 510,1650,1088},
1052 {  176,  45, 900, 510,1650,1088},
1053 {   22,   5, 800, 510,1650,1088},
1054 {   13,   5,1024, 675,1560,1152},
1055 {   16,   9,1266, 804,1688,1072},
1056 {    1,   1,1688,1066,1688,1066}
1057};
1058
1059static const XGI330_LCDDataStruct  XGI_ExtLCD1280x1024Data[]=
1060{
1061 {  211,  60,1024, 501,1688,1066},
1062 {  211,  60,1024, 508,1688,1066},
1063 {  211,  60,1024, 501,1688,1066},
1064 {  211,  60,1024, 508,1688,1066},
1065 {  211,  60,1024, 500,1688,1066},
1066 {  211,  75,1024, 625,1688,1066},
1067 {  211, 120,1280, 798,1688,1066},
1068 {    1,   1,1688,1066,1688,1066}
1069};
1070
1071static const XGI330_LCDDataStruct  XGI_CetLCD1280x1024Data[]=
1072{
1073	{         1,1,1688,1066,1688,1066         }, /* 00 (320x200,320x400,640x200,640x400) */
1074        {         1,1,1688,1066,1688,1066         }, /* 01 (320x350,640x350) */
1075        {         1,1,1688,1066,1688,1066         }, /* 02 (360x400,720x400) */
1076        {         1,1,1688,1066,1688,1066         }, /* 03 (720x350) */
1077        {         1,1,1688,1066,1688,1066         }, /* 04 (640x480x60Hz) */
1078        {         1,1,1688,1066,1688,1066         }, /* 05 (800x600x60Hz) */
1079        {         1,1,1688,1066,1688,1066         }, /* 06 (1024x768x60Hz) */
1080        {         1,1,1688,1066,1688,1066         }, /* 07 (1280x1024x60Hz) */
1081        {         1,1,1688,1066,1688,1066         } /* 08 (1400x1050x60Hz) */
1082};
1083
1084static const XGI330_LCDDataStruct  XGI_StLCD1400x1050Data[]=
1085{
1086	{         211,100,2100,408,1688,1066      }, /* 00 (320x200,320x400,640x200,640x400) */
1087        {         211,64,1536,358,1688,1066       }, /* 01 (320x350,640x350) */
1088        {         211,100,2100,408,1688,1066      }, /* 02 (360x400,720x400) */
1089        {         211,64,1536,358,1688,1066       }, /* 03 (720x350) */
1090        {         211,48,840,488,1688,1066        }, /* 04 (640x480x60Hz) */
1091        {         211,72,1008,609,1688,1066       }, /* 05 (800x600x60Hz) */
1092        {         211,128,1400,776,1688,1066      }, /* 06 (1024x768x60Hz) */
1093        {         1,1,1688,1066,1688,1066         }, /* 07 (1280x1024x60Hz w/o Scaling) */
1094        {         1,1,1688,1066,1688,1066         }  /* 08 (1400x1050x60Hz) */
1095};
1096
1097static const XGI330_LCDDataStruct  XGI_ExtLCD1400x1050Data[]=
1098{
1099	{         211,100,2100,408,1688,1066      }, /* 00 (320x200,320x400,640x200,640x400) */
1100        {         211,64,1536,358,1688,1066       }, /* 01 (320x350,640x350) */
1101        {         211,100,2100,408,1688,1066      }, /* 02 (360x400,720x400) */
1102        {         211,64,1536,358,1688,1066       }, /* 03 (720x350) */
1103        {         211,48,840,488,1688,1066        }, /* 04 (640x480x60Hz) */
1104        {         211,72,1008,609,1688,1066       }, /* 05 (800x600x60Hz) */
1105        {         211,128,1400,776,1688,1066      }, /* 06 (1024x768x60Hz) */
1106        {         1,1,1688,1066,1688,1066         }, /* 07 (1280x1024x60Hz w/o Scaling) */
1107        {         1,1,1688,1066,1688,1066         }  /* 08 (1400x1050x60Hz) */
1108};
1109
1110static const XGI330_LCDDataStruct  XGI_ExtLCD1600x1200Data[]=
1111{
1112        {         4,1,1620,420,2160,1250          }, /* { 3,1,2160,425,2160,1250 }, // 00 (320x200,320x400,640x200,640x400) // alan 10/14/2003 */
1113        {         27,7,1920,375,2160,1250         }, /* 01 (320x350,640x350) */
1114        {         4,1,1620,420,2160,1250          }, /* { 3,1,2160,425,2160,1250 }, // 02 (360x400,720x400) // alan 10/14/2003 */
1115        {         27,7,1920,375,2160,1250         }, /* 03 (720x350) */
1116        {         27,4,800,500,2160,1250          }, /* 04 (640x480x60Hz) */
1117        {         4,1,1080,625,2160,1250          }, /* 05 (800x600x60Hz) */
1118        {         5,2,1350,800,2160,1250          }, /* 06 (1024x768x60Hz) */
1119        {         27,16,1500,1064,2160,1250       }, /* 07 (1280x1024x60Hz) */
1120        {         9,7,1920,1106,2160,1250         }, /* 08 (1400x1050x60Hz) */
1121        {         1,1,2160,1250,2160,1250         }, /* 09 (1600x1200x60Hz) ;302lv */
1122        {	  3,2,1800,1000,2160,1250         }  /* 0A (1280x960) */
1123};
1124
1125static const XGI330_LCDDataStruct  XGI_StLCD1600x1200Data[]=
1126{
1127        {         27,4,800,500,2160,1250          },/* 00 (320x200,320x400,640x200,640x400) */
1128        {         27,4,800,500,2160,1250          },/* 01 (320x350,640x350) */
1129        {         27,4,800,500,2160,1250          },/* 02 (360x400,720x400) */
1130        {         27,4,800,500,2160,1250          },/* 03 (720x350) */
1131        {         27,4,800,500,2160,1250          },/* 04 (320x240,640x480) */
1132        {         4,1,1080,625,2160,1250          },/* 05 (400x300,800x600) */
1133        {         5,2,1350,800,2160,1250          },/* 06 (512x384,1024x768) */
1134        {         135,88,1600,1100,2160,1250      },/* 07 (1280x1024) */
1135        {         1,1,1800,1500,2160,1250         },/* 08 (1400x1050) */
1136        {         1,1,2160,1250,2160,1250         },/* 09 (1600x1200) */
1137        {	  3,2,1800,1000,2160,1250	  } /* 0A (1280x960) */
1138};
1139
1140static const XGI330_LCDDataStruct  XGI_CetLCD1400x1050Data[]=
1141{
1142	{         1,1,1688,1066,1688,1066         }, /* 00 (320x200,320x400,640x200,640x400) */
1143        {         1,1,1688,1066,1688,1066         }, /* 01 (320x350,640x350) */
1144        {         1,1,1688,1066,1688,1066         }, /* 02 (360x400,720x400) */
1145        {         1,1,1688,1066,1688,1066         }, /* 03 (720x350) */
1146        {         1,1,1688,1066,1688,1066         }, /* 04 (640x480x60Hz) */
1147        {         1,1,1688,1066,1688,1066         }, /* 05 (800x600x60Hz) */
1148        {         1,1,1688,1066,1688,1066         }, /* 06 (1024x768x60Hz) */
1149        {         1,1,1688,1066,1688,1066         }, /* 07 (1280x1024x60Hz) */
1150        {         1,1,1688,1066,1688,1066         }  /* 08 (1400x1050x60Hz) */
1151};
1152
1153static const XGI330_LCDDataStruct  XGI_NoScalingData[]=
1154{
1155 {    1,   1, 800, 449, 800, 449},   	/* 00 (320x200,320x400,640x200,640x400) */
1156 {    1,   1, 800, 449, 800, 449},      /* 01 (320x350,640x350) */
1157 {    1,   1, 900, 449, 900, 449},      /* 02 (360x400,720x400) */
1158 {    1,   1, 900, 449, 900, 449},      /* 03 (720x350) */
1159 {    1,   1, 800, 525, 800, 525},      /* 04 (320x240,640x480) */
1160 {    1,   1,1056, 628,1056, 628},      /* 05 (400x300,800x600) */
1161 {    1,   1,1344, 806,1344, 806},      /* 06 (512x384,1024x768) */
1162 {    1,   1,1688,1066,1688,1066},      /* 07 (1280x1024) */
1163 {    1,   1,1688,1066,1688,1066},      /* 08 (1400x1050) */
1164 {    1,   1,2160,1250,2160,1250},      /* 09 (1600x1200) */
1165 {    1,   1,1688, 806,1688, 806},      /* 0A (1280x768) */
1166 {    1,   1,1800,1000,1800,1000}       /* 0B (1280x960) */
1167};
1168
1169static const XGI330_LCDDataStruct  XGI_NoScalingData_1[]=
1170{
1171 {    1,   1, 800, 449, 800, 449},	/* 00 (320x200,320x400,640x200,640x400) */
1172 {    1,   1, 800, 449, 800, 449},      /* 01 (320x350,640x350) */
1173 {    1,   1, 900, 449, 900, 449},      /* 02 (360x400,720x400) */
1174 {    1,   1, 900, 449, 900, 449},      /* 03 (720x350) */
1175 {    1,   1, 800, 525, 800, 525},      /* 04 (320x240,640x480) */
1176 {    1,   1,1056, 628,1056, 628},      /* 05 (400x300,800x600) */
1177 {    1,   1,1344, 806,1344, 806},      /* 06 (512x384,1024x768) */
1178 {    1,   1,1688,1066,1688,1066},      /* 07 (1280x1024) */
1179 {    1,   1,1688,1066,1688,1066},      /* 08 (1400x1050) */
1180 {    1,   1,1760,1235,1760,1235},      /* 09 (1600x1200) */
1181 {    1,   1,1688, 806,1688, 806},      /* 0A (1280x768) */
1182 {    1,   1,1800,1000,1800,1000}       /* 0B (1280x960) */
1183};
1184
1185static const XGI330_LCDDataStruct  XGI_ExtLCD1024x768x75Data[]=
1186{
1187        {42,25,1536,419,1344,806 }, /* ; 00 (320x200,320x400,640x200,640x400) */
1188        {48,25,1536,369,1344,806 }, /* ; 01 (320x350,640x350) */
1189        {42,25,1536,419,1344,806 }, /* ; 02 (360x400,720x400) */
1190        {48,25,1536,369,1344,806 }, /* ; 03 (720x350) */
1191        {8,5,1312,500,1312,800   }, /* ; 04 (640x480x75Hz) */
1192        {41,25,1024,625,1312,800 }, /* ; 05 (800x600x75Hz) */
1193        {1,1,1312,800,1312,800   }  /* ; 06 (1024x768x75Hz) */
1194};
1195
1196static const XGI330_LCDDataStruct  XGI_CetLCD1024x768x75Data[]=
1197{
1198        {1,1,1312,800,1312,800}, /* ; 00 (320x200,320x400,640x200,640x400) */
1199        {1,1,1312,800,1312,800}, /* ; 01 (320x350,640x350) */
1200        {1,1,1312,800,1312,800}, /* ; 02 (360x400,720x400) */
1201        {1,1,1312,800,1312,800}, /* ; 03 (720x350) */
1202        {1,1,1312,800,1312,800}, /* ; 04 (640x480x75Hz) */
1203        {1,1,1312,800,1312,800}, /* ; 05 (800x600x75Hz) */
1204        {1,1,1312,800,1312,800} /* ; 06 (1024x768x75Hz) */
1205};
1206
1207static const XGI330_LCDDataStruct  XGI_ExtLCD1280x1024x75Data[]=
1208{
1209        {211,60,1024,501,1688,1066   }, /* ; 00 (320x200,320x400,640x200,640x400) */
1210        {211,60,1024,508,1688,1066   }, /* ; 01 (320x350,640x350) */
1211        {211,60,1024,501,1688,1066   }, /* ; 02 (360x400,720x400) */
1212        {211,60,1024,508,1688,1066   }, /* ; 03 (720x350) */
1213        {211,45,768,498,1688,1066    }, /* ; 04 (640x480x75Hz) */
1214        {211,75,1024,625,1688,1066   }, /* ; 05 (800x600x75Hz) */
1215        {211,120,1280,798,1688,1066  }, /* ; 06 (1024x768x75Hz) */
1216        {1,1,1688,1066,1688,1066     }  /* ; 07 (1280x1024x75Hz) */
1217};
1218
1219static const XGI330_LCDDataStruct  XGI_StLCD1280x1024x75Data[]=
1220{
1221        {211,60,1024,501,1688,1066 }, /* ; 00 (320x200,320x400,640x200,640x400) */
1222        {211,60,1024,508,1688,1066 }, /* ; 01 (320x350,640x350) */
1223        {211,60,1024,501,1688,1066 }, /* ; 02 (360x400,720x400) */
1224        {211,60,1024,508,1688,1066 }, /* ; 03 (720x350) */
1225        {211,45,768,498,1688,1066  }, /* ; 04 (640x480x75Hz) */
1226        {211,75,1024,625,1688,1066 }, /* ; 05 (800x600x75Hz) */
1227        {211,120,1280,798,1688,1066}, /* ; 06 (1024x768x75Hz) */
1228        {1,1,1688,1066,1688,1066   }  /* ; 07 (1280x1024x75Hz) */
1229};
1230
1231static const XGI330_LCDDataStruct  XGI_CetLCD1280x1024x75Data[]=
1232{
1233        {1,1,1688,1066,1688,1066}, /* ; 00 (320x200,320x400,640x200,640x400) */
1234        {1,1,1688,1066,1688,1066}, /* ; 01 (320x350,640x350) */
1235        {1,1,1688,1066,1688,1066}, /* ; 02 (360x400,720x400) */
1236        {1,1,1688,1066,1688,1066}, /* ; 03 (720x350) */
1237        {1,1,1688,1066,1688,1066}, /* ; 04 (640x480x75Hz) */
1238        {1,1,1688,1066,1688,1066}, /* ; 05 (800x600x75Hz) */
1239        {1,1,1688,1066,1688,1066}, /* ; 06 (1024x768x75Hz) */
1240        {1,1,1688,1066,1688,1066}  /* ; 07 (1280x1024x75Hz) */
1241};
1242
1243static const XGI330_LCDDataStruct  XGI_NoScalingDatax75[]=
1244{
1245        {1,1,800,449,800,449    }, /* ; 00 (320x200,320x400,640x200,640x400) */
1246        {1,1,800,449,800,449    }, /* ; 01 (320x350,640x350) */
1247        {1,1,900,449,900,449    }, /* ; 02 (360x400,720x400) */
1248        {1,1,900,449,900,449    }, /* ; 03 (720x350) */
1249        {1,1,840,500,840,500    }, /* ; 04 (640x480x75Hz) */
1250        {1,1,1056,625,1056,625  }, /* ; 05 (800x600x75Hz) */
1251        {1,1,1312,800,1312,800  }, /* ; 06 (1024x768x75Hz) */
1252        {1,1,1688,1066,1688,1066}, /* ; 07 (1280x1024x75Hz) */
1253        {1,1,1688,1066,1688,1066}, /* ; 08 (1400x1050x75Hz) ;;[ycchen] 12/19/02 */
1254        {1,1,2160,1250,2160,1250}, /* ; 09 (1600x1200x75Hz) */
1255        {1,1,1688,806,1688,806  }  /* ; 0A (1280x768x75Hz) */
1256};
1257
1258static const XGI330_LCDDataDesStruct  XGI_ExtLCDDes1024x768Data[]=
1259{
1260   {  9,1057,0, 771  }, /* ; 00 (320x200,320x400,640x200,640x400) */
1261   {  9,1057,0, 771  }, /* ; 01 (320x350,640x350) */
1262   {  9,1057,0, 771  }, /* ; 02 (360x400,720x400) */
1263   {  9,1057,0, 771  }, /* ; 03 (720x350) */
1264   {  9,1057,0, 771  }, /* ; 04 (640x480x60Hz) */
1265   {  9,1057,0, 771  }, /* ; 05 (800x600x60Hz) */
1266   {  9,1057,805, 770  }  /* ; 06 (1024x768x60Hz) */
1267};
1268
1269static const XGI330_LCDDataDesStruct  XGI_StLCDDes1024x768Data[]=
1270{
1271        { 9,1057,737,703   }, /* ; 00 (320x200,320x400,640x200,640x400) */
1272        { 9,1057,686,651   }, /* ; 01 (320x350,640x350) */
1273        { 9,1057,737,703   }, /* ; 02 (360x400,720x400) */
1274        { 9,1057,686,651   }, /* ; 03 (720x350) */
1275        { 9,1057,776,741   }, /* ; 04 (640x480x60Hz) */
1276        { 9,1057, 0 ,771   }, /* ; 05 (800x600x60Hz) */
1277        { 9,1057,805,770   }  /* ; 06 (1024x768x60Hz) */
1278};
1279
1280static const XGI330_LCDDataDesStruct  XGI_CetLCDDes1024x768Data[]=
1281{
1282       	{      1152,856,622,587   }, /* ; 00 (320x200,320x400,640x200,640x400) */
1283        {      1152,856,597,562   }, /* ; 01 (320x350,640x350) */
1284        {      1152,856,622,587   }, /* ; 02 (360x400,720x400) */
1285        {      1152,856,597,562   }, /* ; 03 (720x350) */
1286        {      1152,856,662,627   }, /* ; 04 (640x480x60Hz) */
1287        {      1232,936,722,687   }, /* ; 05 (800x600x60Hz) */
1288        {      0,1048,805,770   }  /* ; 06 (1024x768x60Hz) */
1289};
1290
1291static const XGI330_LCDDataDesStruct XGI_ExtLCDDLDes1280x1024Data[]=
1292{
1293        {      18,1346,981,940     },/* 00 (320x200,320x400,640x200,640x400) */
1294        {      18,1346,926,865     },/* 01 (320x350,640x350) */
1295        {      18,1346,981,940     },/* 02 (360x400,720x400) */
1296        {      18,1346,926,865     },/* 03 (720x350) */
1297        {      18,1346,0,1025     },/* 04 (640x480x60Hz) */
1298        {      18,1346,0,1025     },/* 05 (800x600x60Hz) */
1299        {      18,1346,1065,1024     },/* 06 (1024x768x60Hz) */
1300        {      18,1346,1065,1024     }/* 07 (1280x1024x60Hz) */
1301};
1302
1303static const XGI330_LCDDataDesStruct XGI_StLCDDLDes1280x1024Data[]=
1304{
1305        {      18,1346,970,907     },/* 00 (320x200,320x400,640x200,640x400) */
1306        {      18,1346,917,854     },/* 01 (320x350,640x350) */
1307        {      18,1346,970,907     },/* 02 (360x400,720x400) */
1308        {      18,1346,917,854     },/* 03 (720x350) */
1309        {      18,1346,0,1025     },/* 04 (640x480x60Hz) */
1310        {      18,1346,0,1025     },/* 05 (800x600x60Hz) */
1311        {      18,1346,1065,1024     },/* 06 (1024x768x60Hz) */
1312        {      18,1346,1065,1024     }/* 07 (1280x1024x60Hz) */
1313};
1314
1315static const XGI330_LCDDataDesStruct  XGI_CetLCDDLDes1280x1024Data[]=
1316{
1317        {      1368,1008,752,711    }, /* 00 (320x200,320x400,640x200,640x400) */
1318        {      1368,1008,729,688    }, /* 01 (320x350,640x350) */
1319        {      1368,1008,752,711    }, /* 02 (360x400,720x400) */
1320    	{      1368,1008,729,688    }, /* 03 (720x350) */
1321        {      1368,1008,794,753    }, /* 04 (640x480x60Hz) */
1322        {      1448,1068,854,813    }, /* 05 (800x600x60Hz) */
1323        {      1560,1200,938,897    }, /* 06 (1024x768x60Hz) */
1324        {      18,1346,1065,1024    }  /* 07 (1280x1024x60Hz) */
1325};
1326
1327static const XGI330_LCDDataDesStruct  XGI_ExtLCDDes1280x1024Data[]=
1328{
1329        {      9,1337,981,940    }, /* ; 00 (320x200,320x400,640x200,640x400) */
1330        {      9,1337,926,884    }, /* ; 01 (320x350,640x350) alan, 2003/09/30 */
1331        {      9,1337,981,940    }, /* ; 02 (360x400,720x400) */
1332        {      9,1337,926,884    }, /* ; 03 (720x350) alan, 2003/09/30 */
1333        {      9,1337,0,1025    }, /* ; 04 (640x480x60Hz) */
1334        {      9,1337,0,1025    }, /* ; 05 (800x600x60Hz) */
1335        {      9,1337,1065,1024    }, /* ; 06 (1024x768x60Hz) */
1336        {      9,1337,1065,1024    }  /* ; 07 (1280x1024x60Hz) */
1337};
1338
1339static const XGI330_LCDDataDesStruct  XGI_StLCDDes1280x1024Data[]=
1340{
1341        {      9,1337,970,907    }, /* ; 00 (320x200,320x400,640x200,640x400) */
1342        {      9,1337,917,854    }, /* ; 01 (320x350,640x350) */
1343        {      9,1337,970,907    }, /* ; 02 (360x400,720x400) */
1344        {      9,1337,917,854    }, /* ; 03 (720x350) */
1345        {      9,1337,0,1025    }, /* ; 04 (640x480x60Hz) */
1346        {      9,1337,0,1025    }, /* ; 05 (800x600x60Hz) */
1347        {      9,1337,1065,1024    }, /* ; 06 (1024x768x60Hz) */
1348        {      9,1337,1065,1024    }  /* ; 07 (1280x1024x60Hz) */
1349};
1350
1351static const XGI330_LCDDataDesStruct  XGI_CetLCDDes1280x1024Data[]=
1352{
1353        {      1368,1008,752,711    }, /* 00 (320x200,320x400,640x200,640x400) */
1354        {      1368,1008,729,688    }, /* 01 (320x350,640x350) */
1355        {      1368,1008,752,711    }, /* 02 (360x400,720x400) */
1356    	{      1368,1008,729,688    }, /* 03 (720x350) */
1357        {      1368,1008,794,753    }, /* 04 (640x480x60Hz) */
1358        {      1448,1068,854,813    }, /* 05 (800x600x60Hz) */
1359        {      1560,1200,938,897    }, /* 06 (1024x768x60Hz) */
1360        {      9,1337,1065,1024    }  /* 07 (1280x1024x60Hz) */
1361};
1362
1363static const XGI330_LCDDataDesStruct  XGI_StLCDDLDes1400x1050Data[]=
1364{
1365        {      18,1464,0,1051    }, /* 00 (320x200,320x400,640x200,640x400) */
1366        {      18,1464,0,1051    }, /* 01 (320x350,640x350) */
1367        {      18,1464,0,1051    }, /* 02 (360x400,720x400) */
1368        {      18,1464,0,1051    }, /* 03 (720x350) */
1369        {      18,1464,0,1051    }, /* 04 (640x480x60Hz) */
1370        {      18,1464,0,1051    }, /* 05 (800x600x60Hz) */
1371        {      18,1464,0,1051    }, /* 06 (1024x768x60Hz) */
1372        {      1646,1406,1053,1038    }, /* 07 (1280x1024x60Hz) */
1373        {      18,1464,0,1051    }  /* 08 (1400x1050x60Hz) */
1374};
1375
1376static const XGI330_LCDDataDesStruct  XGI_ExtLCDDLDes1400x1050Data[]=
1377{
1378        {      18,1464,0,1051    }, /* 00 (320x200,320x400,640x200,640x400) */
1379        {      18,1464,0,1051    }, /* 01 (320x350,640x350) */
1380        {      18,1464,0,1051    }, /* 02 (360x400,720x400) */
1381        {      18,1464,0,1051    }, /* 03 (720x350) */
1382        {      18,1464,0,1051    }, /* 04 (640x480x60Hz) */
1383        {      18,1464,0,1051    }, /* 05 (800x600x60Hz) */
1384        {      18,1464,0,1051    }, /* 06 (1024x768x60Hz) */
1385        {      1646,1406,1053,1038    }, /* 07 (1280x1024x60Hz) */
1386        {      18,1464,0,1051    }  /* 08 (1400x1050x60Hz) */
1387};
1388
1389static const XGI330_LCDDataDesStruct  XGI_StLCDDes1400x1050Data[]=
1390{
1391        {      9,1455,0,1051     },/* 00 (320x200,320x400,640x200,640x400) */
1392        {      9,1455,0,1051     },/* 01 (320x350,640x350) */
1393        {      9,1455,0,1051     },/* 02 (360x400,720x400) */
1394        {      9,1455,0,1051     },/* 03 (720x350) */
1395        {      9,1455,0,1051     },/* 04 (640x480x60Hz) */
1396        {      9,1455,0,1051     },/* 05 (800x600x60Hz) */
1397        {      9,1455,0,1051     },/* 06 (1024x768x60Hz) */
1398        {      1637,1397,1053,1038     },/* 07 (1280x1024x60Hz) */
1399        {      9,1455,0,1051     } /* 08 (1400x1050x60Hz) */
1400};
1401
1402static const XGI330_LCDDataDesStruct  XGI_ExtLCDDes1400x1050Data[]=
1403{
1404        {      9,1455,0,1051     },/* 00 (320x200,320x400,640x200,640x400) */
1405        {      9,1455,0,1051     },/* 01 (320x350,640x350) */
1406        {      9,1455,0,1051     },/* 02 (360x400,720x400) */
1407        {      9,1455,0,1051     },/* 03 (720x350) */
1408        {      9,1455,0,1051     },/* 04 (640x480x60Hz) */
1409        {      9,1455,0,1051     },/* 05 (800x600x60Hz) */
1410        {      9,1455,0,1051     },/* 06 (1024x768x60Hz) */
1411        {      1637,1397,1053,1038     },/* 07 (1280x1024x60Hz) */
1412        {      9,1455,0,1051     } /* 08 (1400x1050x60Hz) */
1413};
1414
1415static const XGI330_LCDDataDesStruct  XGI_CetLCDDes1400x1050Data[]=
1416{
1417        {      1308,1068,781,766    }, /* 00 (320x200,320x400,640x200,640x400) */
1418        {      1308,1068,781,766    }, /* 01 (320x350,640x350) */
1419        {      1308,1068,781,766    }, /* 02 (360x400,720x400) */
1420        {      1308,1068,781,766    }, /* 03 (720x350) */
1421        {      1308,1068,781,766    }, /* 04 (640x480x60Hz) */
1422        {      1388,1148,841,826    }, /* 05 (800x600x60Hz) */
1423        {      1490,1250,925,910    }, /* 06 (1024x768x60Hz) */
1424        {      1646,1406,1053,1038    }, /* 07 (1280x1024x60Hz) */
1425        {      18,1464,0,1051    } /* 08 (1400x1050x60Hz) */
1426};
1427
1428static const XGI330_LCDDataDesStruct  XGI_CetLCDDes1400x1050Data2[]=
1429{
1430        {      0,1448,0,1051    }, /* 00 (320x200,320x400,640x200,640x400) */
1431        {      0,1448,0,1051    }, /* 01 (320x350,640x350) */
1432        {      0,1448,0,1051    }, /* 02 (360x400,720x400) */
1433        {      0,1448,0,1051    }, /* 03 (720x350) */
1434        {      0,1448,0,1051    }  /* 04 (640x480x60Hz) */
1435};
1436
1437static const XGI330_LCDDataDesStruct  XGI_ExtLCDDLDes1600x1200Data[]=
1438{
1439	{       9,1673,0,1201    }, /* 00 (320x200,320x400,640x200,640x400) */
1440        {       9,1673,0,1201    }, /* 01 (320x350,640x350) */
1441        {       9,1673,0,1201    }, /* 02 (360x400,720x400) */
1442        {       9,1673,0,1201    }, /* 03 (720x350) */
1443        {       9,1673,0,1201    }, /* 04 (640x480x60Hz) */
1444        {       9,1673,0,1201    }, /* 05 (800x600x60Hz) */
1445        {      10,1673,0,1201    }, /* 06 (1024x768x60Hz) */
1446        {      10,1673,0,1201    }, /* 07 (1280x1024x60Hz) */
1447        {      10,1673,0,1201    }, /* 08 (1400x1050x60Hz) */
1448        {      10,1673,0,1201    }, /* 09 (1600x1200x60Hz) */
1449        {      10,1673,0,1201    }  /* 0A (1280x960x60Hz) */
1450};
1451
1452static const XGI330_LCDDataDesStruct  XGI_StLCDDLDes1600x1200Data[]=
1453{
1454        {      9,1673,1150,1101    }, /* 00 (320x200,320x400,640x200,640x400) */
1455        {      9,1673,1083,1034    }, /* 01 (320x350,640x350) */
1456        {      9,1673,1150,1101    }, /* 02 (360x400,720x400) */
1457        {      9,1673,1083,1034    }, /* 03 (720x350) */
1458        {      9,1673,0,1201    }, /* 04 (640x480x60Hz) */
1459        {      9,1673,0,1201    }, /* 05 (800x600x60Hz) */
1460        {      9,1673,0,1201    }, /* 06 (1024x768x60Hz) */
1461        {      9,1673,1232,1183    }, /* 07 (1280x1024x60Hz) */
1462        {      9,1673,0,1201    }, /* 08 (1400x1050x60Hz) */
1463        {      9,1673,0,1201    }, /* 09 (1600x1200x60Hz) */
1464        {      9,1673,0,1201    }  /* 0A (1280x960x60Hz) */
1465};
1466
1467static const XGI330_LCDDataDesStruct  XGI_ExtLCDDes1600x1200Data[]=
1468{
1469        {      9,1673,0,1201     },/* 00 (320x200,320x400,640x200,640x400) */
1470        {      9,1673,0,1201     },/* 01 (320x350,640x350) */
1471        {      9,1673,0,1201     },/* 02 (360x400,720x400) */
1472        {      9,1673,0,1201     },/* 03 (720x350) */
1473        {      9,1673,0,1201     },/* 04 (640x480x60Hz) */
1474        {      9,1673,0,1201     },/* 05 (800x600x60Hz) */
1475        {      10,1673,0,1201     },/* 06 (1024x768x60Hz) */
1476        {      10,1673,0,1201     },/* 07 (1280x1024x60Hz) */
1477        {      10,1673,0,1201     },/* 08 (1400x1050x60Hz) */
1478        {      10,1673,1249,1201     }, /* 09 (1600x1200x60Hz) */
1479        {      10,1673,0,1201    }  /* 0A (1280x960x60Hz) */
1480};
1481
1482static const XGI330_LCDDataDesStruct  XGI_StLCDDes1600x1200Data[]=
1483{
1484	{      9,1673,1150,1101     },/* 00 (320x200,320x400,640x200,640x400) */
1485        {      9,1673,1083,1034     },/* 01 (320x350,640x350) */
1486        {      9,1673,1150,1101     },/* 02 (360x400,720x400) */
1487        {      9,1673,1083,1034     },/* 03 (720x350) */
1488        {      9,1673,0,1201     },/* 04 (640x480x60Hz) */
1489        {      9,1673,0,1201     },/* 05 (800x600x60Hz) */
1490        {      9,1673,0,1201     },/* 06 (1024x768x60Hz) */
1491        {      9,1673,1232,1183     },/* 07 (1280x1024x60Hz) */
1492        {      9,1673,0,1201     },/* 08 (1400x1050x60Hz) */
1493        {      9,1673,0,1201     }, /* 09 (1600x1200x60Hz) */
1494        {      9,1673,0,1201    }  /* 0A (1280x960x60Hz) */
1495};
1496
1497static const XGI330_LCDDataDesStruct2  XGI_NoScalingDesData[]=
1498{
1499        {     9,657,448,405,96,2  }, /* 00 (320x200,320x400,640x200,640x400) */
1500        {     9,657,448,355,96,2  }, /* 01 (320x350,640x350) */
1501        {     9,747,448,413,108,2  }, /* 02 (360x400,720x400) */
1502        {     9,747,448,413,108,2  }, /* 03 (720x350) */
1503        {     9,657,1,483,96,2  }, /* 04 (640x480x60Hz) */
1504        {     9,849,627,600,128,4  }, /* 05 (800x600x60Hz) */
1505        {     9,1057,805,770,0136,6  }, /* 06 (1024x768x60Hz) */
1506        {    10,1337,0,1025,112,3  }, /* 07 (1280x1024x60Hz) */
1507        {    10,1457,0,1051,112,3  }, /* 08 (1400x1050x60Hz) }, //;[ycchen] 12/19/02 */
1508        {    10,1673,0,1201,192,3  }, /* 09 (1600x1200x60Hz) */
1509        {    10,1337,0,771,112,6  },  /* 0A (1280x768x60Hz) */
1510        {    10,1385,999,959,112,3}  /* 0B (1280x960x60Hz) */
1511};
1512
1513static const XGI330_LCDDataDesStruct2  XGI_NoScalingDesData_1[]=
1514{
1515        {     9,657,448,405,96,2  }, /* 00 (320x200,320x400,640x200,640x400) */
1516        {     9,657,448,355,96,2  }, /* 01 (320x350,640x350) */
1517        {     9,657,448,405,96,2  }, /* 02 (360x400,720x400) */
1518        {     9,657,448,355,96,2  }, /* 03 (720x350) */
1519        {     10,657,1,483,96,2  }, /* 04 (640x480x60Hz) */
1520        {     10,849,627,600,128,4  }, /* 05 (800x600x60Hz) */
1521        {     10,1057,805,770,0136,6  }, /* 06 (1024x768x60Hz) */
1522        {     10,1337,1065,1025,112,3  }, /* 07 (1280x1024x60Hz) */
1523        {     10,1457,0,1051,112,3  }, /* 08 (1400x1050x60Hz) }, //;[ycchen] 12/19/02 */
1524        {     10,1658,1234,1202,32,4  }, /* 09 (1600x1200x60Hz) */
1525        {     10,1337,0,771,112,6  },  /* 0A (1280x768x60Hz) */
1526	{     10,1385,999,959,112,3  }  /* 0B (1280x960x60Hz) */
1527};
1528
1529static const XGI330_LCDDataDesStruct  XGI_ExtLCDDes1024x768x75Data[]=		/* ;;1024x768x75Hz */
1530{
1531        {9,1049,0,769},    /* ; 00 (320x200,320x400,640x200,640x400) */
1532        {9,1049,0,769},    /* ; 01 (320x350,640x350) */
1533        {9,1049,0,769},    /* ; 02 (360x400,720x400) */
1534        {9,1049,0,769},    /* ; 03 (720x350) */
1535        {9,1049,0,769},    /* ; 04 (640x480x75Hz) */
1536        {9,1049,0,769},    /* ; 05 (800x600x75Hz) */
1537        {9,1049,0,769}     /* ; 06 (1024x768x75Hz) */
1538};
1539
1540static const XGI330_LCDDataDesStruct  XGI_StLCDDes1024x768x75Data[]=
1541{
1542        {9,1049,0,769},    /* ; 00 (320x200,320x400,640x200,640x400) */
1543        {9,1049,0,769},    /* ; 01 (320x350,640x350) */
1544        {9,1049,0,769},    /* ; 02 (360x400,720x400) */
1545        {9,1049,0,769},    /* ; 03 (720x350) */
1546        {9,1049,0,769},    /* ; 04 (640x480x75Hz) */
1547        {9,1049,0,769},    /* ; 05 (800x600x75Hz) */
1548        {9,1049,0,769}     /* ; 06 (1024x768x75Hz) */
1549};
1550
1551static const XGI330_LCDDataDesStruct  XGI_CetLCDDes1024x768x75Data[]=	/* ;;1024x768x75Hz */
1552{
1553        {1152,856,622,587},     /* ; 00 (320x200,320x400,640x200,640x400) */
1554        {1152,856,597,562},     /* ; 01 (320x350,640x350) */
1555        {1192,896,622,587},     /* ; 02 (360x400,720x400) */
1556        {1192,896,597,562},     /* ; 03 (720x350) */
1557        {1129,857,656,625},     /* ; 04 (640x480x75Hz) */
1558        {1209,937,716,685},     /* ; 05 (800x600x75Hz) */
1559        {9,1049,0,769} 	   	/* ; 06 (1024x768x75Hz) */
1560};
1561
1562static const XGI330_LCDDataDesStruct  XGI_ExtLCDDLDes1280x1024x75Data[]=         /* ;;1280x1024x75Hz */
1563{
1564        {18,1314,0,1025     },/* ; 00 (320x200,320x400,640x200,640x400) */
1565        {18,1314,0,1025     },/* ; 01 (320x350,640x350) */
1566        {18,1314,0,1025     },/* ; 02 (360x400,720x400) */
1567        {18,1314,0,1025     },/* ; 03 (720x350) */
1568        {18,1314,0,1025     },/* ; 04 (640x480x60Hz) */
1569        {18,1314,0,1025     },/* ; 05 (800x600x60Hz) */
1570        {18,1314,0,1025     },/* ; 06 (1024x768x60Hz) */
1571        {18,1314,0,1025     }/* ; 07 (1280x1024x60Hz) */
1572};
1573
1574static const XGI330_LCDDataDesStruct  XGI_StLCDDLDes1280x1024x75Data[]=
1575{
1576        {18,1314,0,1025     },/* ; 00 (320x200,320x400,640x200,640x400) */
1577        {18,1314,0,1025     },/* ; 01 (320x350,640x350) */
1578        {18,1314,0,1025     },/* ; 02 (360x400,720x400) */
1579        {18,1314,0,1025     },/* ; 03 (720x350) */
1580        {18,1314,0,1025     },/* ; 04 (640x480x60Hz) */
1581        {18,1314,0,1025     },/* ; 05 (800x600x60Hz) */
1582        {18,1314,0,1025     },/* ; 06 (1024x768x60Hz) */
1583        {18,1314,0,1025     }/* ; 07 (1280x1024x60Hz) */
1584};
1585
1586static const XGI330_LCDDataDesStruct  XGI_CetLCDDLDes1280x1024x75Data[]=	/* 1280x1024x75Hz */
1587{
1588        {1368,1008,752,711},    /* ; 00 (320x200,320x400,640x200,640x400) */
1589        {1368,1008,729,688},    /* ; 01 (320x350,640x350) */
1590        {1408,1048,752,711},    /* ; 02 (360x400,720x400) */
1591        {1408,1048,729,688},    /* ; 03 (720x350) */
1592        {1377,985,794,753},    /* ; 04 (640x480x75Hz) */
1593        {1457,1065,854,813},    /* ; 05 (800x600x75Hz) */
1594        {1569,1177,938,897},    /* ; 06 (1024x768x75Hz) */
1595        {18,1314,0,1025}     	  /* ; 07 (1280x1024x75Hz) */
1596};
1597
1598static const XGI330_LCDDataDesStruct  XGI_ExtLCDDes1280x1024x75Data[]=         /* ;;1280x1024x75Hz */
1599{
1600	{9,1305,0,1025},/* ; 00 (320x200,320x400,640x200,640x400) */
1601        {9,1305,0,1025},/* ; 01 (320x350,640x350) */
1602        {9,1305,0,1025},/* ; 02 (360x400,720x400) */
1603        {9,1305,0,1025},/* ; 03 (720x350) */
1604        {9,1305,0,1025},/* ; 04 (640x480x60Hz) */
1605        {9,1305,0,1025},/* ; 05 (800x600x60Hz) */
1606        {9,1305,0,1025},/* ; 06 (1024x768x60Hz) */
1607        {9,1305,0,1025} /* ; 07 (1280x1024x60Hz) */
1608};
1609
1610static const XGI330_LCDDataDesStruct  XGI_StLCDDes1280x1024x75Data[]=
1611{
1612	{9,1305,0,1025},/* ; 00 (320x200,320x400,640x200,640x400) */
1613        {9,1305,0,1025},/* ; 01 (320x350,640x350) */
1614        {9,1305,0,1025},/* ; 02 (360x400,720x400) */
1615        {9,1305,0,1025},/* ; 03 (720x350) */
1616        {9,1305,0,1025},/* ; 04 (640x480x60Hz) */
1617        {9,1305,0,1025},/* ; 05 (800x600x60Hz) */
1618        {9,1305,0,1025},/* ; 06 (1024x768x60Hz) */
1619        {9,1305,0,1025} /* ; 07 (1280x1024x60Hz) */
1620};
1621
1622static const XGI330_LCDDataDesStruct  XGI_CetLCDDes1280x1024x75Data[]=	/* 1280x1024x75Hz */
1623{
1624        {1368,1008,752,711},    /* ; 00 (320x200,320x400,640x200,640x400) */
1625        {1368,1008,729,688},    /* ; 01 (320x350,640x350) */
1626        {1408,1048,752,711},    /* ; 02 (360x400,720x400) */
1627        {1408,1048,729,688},    /* ; 03 (720x350) */
1628        {1377,985,794,753},    /* ; 04 (640x480x75Hz) */
1629        {1457,1065,854,813},    /* ; 05 (800x600x75Hz) */
1630        {1569,1177,938,897},    /* ; 06 (1024x768x75Hz) */
1631        {9,1305,0,1025}     	  /* ; 07 (1280x1024x75Hz) */
1632};
1633
1634static const XGI330_LCDDataDesStruct2 XGI_NoScalingDesDatax75[]= /* Scaling LCD 75Hz */
1635{
1636	{9,657,448,405,96,2},   /* ; 00 (320x200,320x400,640x200,640x400) */
1637        {9,657,448,355,96,2},   /* ; 01 (320x350,640x350) */
1638        {9,738,448,405,108,2},   /* ; 02 (360x400,720x400) */
1639        {9,738,448,355,108,2},   /* ; 03 (720x350) */
1640        {9,665,0,481,64,3},   /* ; 04 (640x480x75Hz) */
1641        {9,825,0,601,80,3},   /* ; 05 (800x600x75Hz) */
1642        {9,1049,0,769,96,3},   /* ; 06 (1024x768x75Hz) */
1643        {9,1305,0,1025,144,3},   /* ; 07 (1280x1024x75Hz) */
1644        {9,1457,0,1051,112,3},   /* ; 08 (1400x1050x60Hz) ;;[ycchen] 12/19/02 */
1645        {9,1673,0,1201,192,3},   /* ; 09 (1600x1200x75Hz) */
1646        {9,1337,0,771,112,6}    /* ; 0A (1280x768x60Hz) */
1647};
1648
1649static const XGI330_TVDataStruct  XGI_StPALData[]=
1650{
1651 {    1,   1, 864, 525,1270, 400, 100,   0, 760},
1652 {    1,   1, 864, 525,1270, 350, 100,   0, 760},
1653 {    1,   1, 864, 525,1270, 400,   0,   0, 720},
1654 {    1,   1, 864, 525,1270, 350,   0,   0, 720},
1655 {    1,   1, 864, 525,1270, 480,  50,   0, 760},
1656 {    1,   1, 864, 525,1270, 600,  50,   0,   0}
1657};
1658
1659static const XGI330_TVDataStruct  XGI_ExtPALData[]=
1660{
1661 {    2,   1,1080, 463,1270, 500,  50,   0,  50},
1662 {   15,   7,1152, 413,1270, 500,  50,   0,  50},
1663 {    2,   1,1080, 463,1270, 500,  50,   0,  50},
1664 {   15,   7,1152, 413,1270, 500,  50,   0,  50},
1665 {    2,   1, 900, 543,1270, 500,   0,   0,  50},
1666 {    4,   3,1080, 663,1270, 500, 438,   0, 438},
1667 {    1,   1,1125, 831,1270, 500, 686,   0, 686},     /*301b*/
1668 {    3,   2,1080, 619,1270, 540, 438,   0, 438}
1669};
1670
1671static const XGI330_TVDataStruct  XGI_StNTSCData[]=
1672{
1673 {    1,   1, 858, 525,1270, 400,  50,   0, 760},
1674 {    1,   1, 858, 525,1270, 350,  50,   0, 640},
1675 {    1,   1, 858, 525,1270, 400,   0,   0, 720},
1676 {    1,   1, 858, 525,1270, 350,   0,   0, 720},
1677 {    1,   1, 858, 525,1270, 480,   0,   0, 760}
1678};
1679
1680static const XGI330_TVDataStruct  XGI_ExtNTSCData[]=
1681{
1682 {    9,  5, 1001, 453,1270, 420, 171,   0, 171},
1683 {   12,  5,  858, 403,1270, 420, 171,   0, 171},
1684 {    9,  5, 1001, 453,1270, 420, 171,   0, 171},
1685 {   12,  5,  858, 403,1270, 420, 171,   0, 171},
1686 {  143,  80, 836, 523,1270, 420, 224,   0,   0},
1687 {  143, 120,1008, 643,1270, 420,   0,   1,   0},
1688 {   1,    1,1120, 821,1516, 420,   0,   1,   0}, /*301b*/
1689 {    2,   1, 858, 503,1584, 480,   0,   1,   0},
1690 {    3,   2,1001, 533,1270, 420,   0,   0,   0}
1691};
1692
1693static const XGI330_TVDataStruct  XGI_St1HiTVData[]=
1694{
1695    	{        1,1,892,563,690,800,0,0,0               }, /* 00 (320x200,320x400,640x200,640x400) */
1696        {        1,1,892,563,690,700,0,0,0               }, /* 01 (320x350,640x350) */
1697        {        1,1,1000,563,785,800,0,0,0              }, /* 02 (360x400,720x400) */
1698        {        1,1,1000,563,785,700,0,0,0              }, /* 03 (720x350) */
1699        {        1,1,892,563,690,960,0,0,0               }, /* 04 (320x240,640x480) */
1700        {        8,5,1050,683,1648,960,0x150,1,0         }  /* 05 (400x300,800x600) */
1701};
1702
1703static const XGI330_TVDataStruct  XGI_St2HiTVData[]=
1704{
1705        {        3,1,840,483,1648,960,0x032,0,0          }, /* 00 (320x200,320x400,640x200,640x400) */
1706        {        1,1,892,563,690,700,0,0,0               }, /* 01 (320x350,640x350) */
1707        {        3,1,840,483,1648,960,0x032,0,0          }, /* 02 (360x400,720x400) */
1708        {        1,1,1000,563,785,700,0,0,0              }, /* 03 (720x350) */
1709        {        5,2,840,563,1648,960,0x08D,1,0          }, /* 04 (320x240,640x480) */
1710        {        8,5,1050,683,1648,960,0x17C,1,0         }  /* 05 (400x300,800x600) */
1711
1712};
1713
1714static const XGI330_TVDataStruct  XGI_ExtHiTVData[]=
1715{
1716        {        6,1,840,563,1632,960,0,0,0              }, /* 00 (320x200,320x400,640x200,640x400) */
1717        {        3,1,960,563,1632,960,0,0,0              }, /* 01 (320x350,640x350) */
1718        {        3,1,840,483,1632,960,0,0,0              }, /* 02 (360x400,720x400) */
1719        {        3,1,960,563,1632,960,0,0,0              }, /* 03 (720x350) */
1720        {        5,1,840,563,1648,960,0x166,1,0          }, /* 04 (320x240,640x480) */
1721        {        16,5,1050,683,1648,960,0x143,1,0        }, /* 05 (400x300,800x600) */
1722        {        25,12,1260,851,1648,960,0x032,0,0       }, /* 06 (512x384,1024x768) */
1723        {        5,4,1575,1124,1648,960,0x128,0,0        }, /* 07 (1280x1024) */
1724        {        4,1,1050,563,1548,960,0x143,1,0         }, /* 08 (800x480) */
1725        {        5,2,1400,659,1648,960,0x032,0,0         }, /* 09 (1024x576) */
1726        {        8,5,1750,803,1648,960,0x128,0,0         }  /* 0A (1280x720) */
1727
1728};
1729
1730static const XGI330_TVDataStruct  XGI_ExtYPbPr525iData[]=
1731{
1732 {    9,  5, 1001, 453,1270, 420, 171,   0, 171},
1733 {   12,  5,  858, 403,1270, 420, 171,   0, 171},
1734 {    9,  5, 1001, 453,1270, 420, 171,   0, 171},
1735 {   12,  5,  858, 403,1270, 420, 171,   0, 171},
1736 {  143,  80, 836, 523,1250, 420, 224,   0,   0},
1737 {  143, 120,1008, 643,1250, 420,   0,   1,   0},
1738 {   1,    1,1120, 821,1516, 420,   0,   1,   0}, /*301b*/
1739 {    2,   1, 858, 503,1584, 480,   0,   1,   0},
1740 {    3,   2,1001, 533,1250, 420,   0,   0,   0}
1741};
1742
1743static const XGI330_TVDataStruct  XGI_StYPbPr525iData[]=
1744{
1745 {    1,   1, 858, 525,1270, 400,  50,   0, 760},
1746 {    1,   1, 858, 525,1270, 350,  50,   0, 640},
1747 {    1,   1, 858, 525,1270, 400,   0,   0, 720},
1748 {    1,   1, 858, 525,1270, 350,   0,   0, 720},
1749 {    1,   1, 858, 525,1270, 480,   0,   0, 760},
1750};
1751
1752static const XGI330_TVDataStruct  XGI_ExtYPbPr525pData[]=
1753{
1754 {    9,  5, 1001, 453,1270, 420, 171,   0, 171},
1755 {   12,  5,  858, 403,1270, 420, 171,   0, 171},
1756 {    9,  5, 1001, 453,1270, 420, 171,   0, 171},
1757 {   12,  5,  858, 403,1270, 420, 171,   0, 171},
1758 {  143,  80, 836, 523,1270, 420, 224,   0,   0},
1759 {  143, 120,1008, 643,1270, 420,   0,   1,   0},
1760 {   1,    1,1120, 821,1516, 420,   0,   1,   0}, /*301b*/
1761 {    2,   1, 858, 503,1584, 480,   0,   1,   0},
1762 {    3,   2,1001, 533,1270, 420,   0,   0,   0}
1763 };
1764
1765static const XGI330_TVDataStruct  XGI_StYPbPr525pData[]=
1766{
1767 {    1,   1,1716, 525,1270, 400,  50,   0, 760},
1768 {    1,   1,1716, 525,1270, 350,  50,   0, 640},
1769 {    1,   1,1716, 525,1270, 400,   0,   0, 720},
1770 {    1,   1,1716, 525,1270, 350,   0,   0, 720},
1771 {    1,   1,1716, 525,1270, 480,   0,   0, 760},
1772};
1773
1774static const XGI330_TVDataStruct  XGI_ExtYPbPr750pData[]=
1775{
1776 {    3,   1, 935, 470,1130, 680,  50,   0,   0},       /* 00 (320x200,320x400,640x200,640x400) */
1777 {   24,   7, 935, 420,1130, 680,  50,   0,   0},       /* 01 (320x350,640x350) */
1778 {    3,   1, 935, 470,1130, 680,  50,   0,   0},       /* 02 (360x400,720x400) */
1779 {   24,   7, 935, 420,1130, 680,  50,   0,   0},       /* 03 (720x350) */
1780 {    2,   1,1100, 590,1130, 640,  50,   0,   0},       /* 04 (320x240,640x480) */
1781 {    3,   2,1210, 690,1130, 660,  50,   0,   0},       /* 05 (400x300,800x600) */
1782 {    1,   1,1375, 878,1130, 640, 638,   0,   0},       /* 06 (1024x768) */
1783 {    2,   1, 858, 503,1130, 480,   0,   1,   0},        /* 07 (720x480) */
1784 {    5,   4,1815, 570,1130, 660,  50,   0,   0},
1785 {    5,   3,1100, 686,1130, 640,  50,   1,   0},
1786 {   10,   9,1320, 830,1130, 640,  50,   0,   0}
1787};
1788
1789static const XGI330_TVDataStruct  XGI_StYPbPr750pData[]=
1790{
1791 {    1,   1,1650, 750,1280, 400,  50,   0, 760},
1792 {    1,   1,1650, 750,1280, 350,  50,   0, 640},
1793 {    1,   1,1650, 750,1280, 400,   0,   0, 720},
1794 {    1,   1,1650, 750,1280, 350,   0,   0, 720},
1795 {    1,   1,1650, 750,1280, 480,   0,   0, 760},
1796};
1797
1798static const UCHAR XGI330_NTSCTiming[] = {
1799  0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
1800  0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
1801  0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
1802  0x0c,0x50,0x00,0x97,0x00,0xda,0x4a,0x17,
1803  0x7d,0x05,0x4b,0x00,0x00,0xe2,0x00,0x02,
1804  0x03,0x0a,0x65,0x9d,0x08,0x92,0x8f,0x40,
1805  0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x50,
1806  0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00};
1807
1808static const UCHAR XGI330_PALTiming[] = {
1809  0x21,0x5A,0x35,0x6e,0x04,0x38,0x3d,0x70,
1810  0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d,
1811  0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b,
1812  0x70,0x50,0x00,0x9b,0x00,0xd9,0x5d,0x17,
1813  0x7d,0x05,0x45,0x00,0x00,0xe8,0x00,0x02,
1814  0x0d,0x00,0x68,0xb0,0x0b,0x92,0x8f,0x40,
1815  0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x63,
1816  0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00};
1817
1818static const UCHAR XGI330_HiTVExtTiming[] =
1819{
1820      0x2D,0x60,0x2C,0x5F,0x08,0x31,0x3A,0x64,
1821      0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D,
1822      0x06,0x14,0x3E,0x35,0x6D,0x00,0xC5,0x3F,
1823      0x64,0x90,0x33,0x8C,0x18,0x36,0x3E,0x13,
1824      0x2A,0xDE,0x2A,0x44,0x40,0x2A,0x44,0x40,
1825      0x8E,0x8E,0x82,0x07,0x0B,
1826      0x92,0x0F,0x40,0x60,0x80,0x14,0x90,0x8C,
1827      0x60,0x14,0x3D,0x63,0x4F,
1828      0x27,0x00,0xfc,0xff,0x6a,0x00
1829
1830};
1831
1832static const UCHAR XGI330_HiTVSt1Timing[] =
1833{
1834      0x32,0x65,0x2C,0x5F,0x08,0x31,0x3A,0x65,
1835      0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D,
1836      0x06,0x14,0x3E,0x35,0x6D,0x00,0xC5,0x3F,
1837      0x65,0x90,0x7B,0xA8,0x03,0xF0,0x87,0x03,
1838      0x11,0x15,0x11,0xCF,0x10,0x11,0xCF,0x10,
1839      0x35,0x35,0x3B,0x69,0x1D,
1840      0x92,0x0F,0x40,0x60,0x80,0x14,0x90,0x8C,
1841      0x60,0x04,0x86,0xAF,0x5D,
1842      0x0E,0x00,0xfc,0xff,0x2d,0x00
1843};
1844
1845static const UCHAR XGI330_HiTVSt2Timing[] =
1846{
1847      0x32,0x65,0x2C,0x5F,0x08,0x31,0x3A,0x64,
1848      0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D,
1849      0x06,0x14,0x3E,0x35,0x6D,0x00,0xC5,0x3F,
1850      0x64,0x90,0x33,0x8C,0x18,0x36,0x3E,0x13,
1851      0x2A,0xDE,0x2A,0x44,0x40,0x2A,0x44,0x40,
1852      0x8E,0x8E,0x82,0x07,0x0B,
1853      0x92,0x0F,0x40,0x60,0x80,0x14,0x90,0x8C,
1854      0x60,0x14,0x3D,0x63,0x4F,
1855      0x27,0x00,0xFC,0xff,0x6a,0x00
1856};
1857
1858static const UCHAR XGI330_HiTVTextTiming[] =
1859{
1860      0x32,0x65,0x2C,0x5F,0x08,0x31,0x3A,0x65,
1861      0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D,
1862      0x06,0x14,0x3E,0x35,0x6D,0x00,0xC5,0x3F,
1863      0x65,0x90,0xE7,0xBC,0x03,0x0C,0x97,0x03,
1864      0x14,0x78,0x14,0x08,0x20,0x14,0x08,0x20,
1865      0xC8,0xC8,0x3B,0xD2,0x26,
1866      0x92,0x0F,0x40,0x60,0x80,0x14,0x90,0x8C,
1867      0x60,0x04,0x96,0x72,0x5C,
1868      0x11,0x00,0xFC,0xFF,0x32,0x00
1869};
1870
1871static const UCHAR XGI330_YPbPr750pTiming[] =
1872{
1873      0x30,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c,
1874      0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a,
1875      0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
1876      0xed,0x50,0x70,0x9f,0x16,0x59,0x60,0x13,
1877      0x27,0x0b,0x27,0xfc,0x30,0x27,0x1c,0xb0,
1878      0x4b,0x4b,0x6f,0x2f,0x63,
1879      0x92,0x0F,0x40,0x60,0x80,0x14,0x90,0x8C,
1880      0x60,0x14,0x73,0x00,0x40,
1881      0x11,0x00,0xfc,0xff,0x32,0x00
1882};
1883
1884static const UCHAR XGI330_YPbPr525pTiming[] =
1885{
1886      0x3E,0x11,0x06,0x09,0x0b,0x0c,0x0c,0x0c,
1887      0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a,
1888      0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
1889      0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4f,0x13,
1890      0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8,
1891      0x51,0x5e,0x60,0x49,0x7d,
1892      0x92,0x0F,0x40,0x60,0x80,0x14,0x90,0x8C,
1893      0x60,0x14,0x4B,0x43,0x41,
1894      0x11,0x00,0xFC,0xFF,0x32,0x00
1895};
1896
1897static const UCHAR XGI330_YPbPr525iTiming[] =
1898{
1899      0x1B,0x21,0x03,0x09,0x05,0x06,0x0C,0x0C,
1900      0x94,0x49,0x01,0x0A,0x06,0x0D,0x04,0x0A,
1901      0x06,0x14,0x0D,0x04,0x0A,0x00,0x85,0x1B,
1902      0x0C,0x50,0x00,0x97,0x00,0xDA,0x4A,0x17,
1903      0x7D,0x05,0x4B,0x00,0x00,0xE2,0x00,0x02,
1904      0x03,0x0A,0x65,0x9D,0x08,
1905      0x92,0x8F,0x40,0x60,0x80,0x14,0x90,0x8C,
1906      0x60,0x14,0x4B,0x00,0x40,
1907      0x44,0x00,0xDB,0x02,0x3B,0x00
1908
1909};
1910
1911static const UCHAR XGI330_HiTVGroup3Data[] =
1912{
1913      0x00,0x1A,0x22,0x63,0x62,0x22,0x08,0x5F,
1914      0x05,0x21,0xB2,0xB2,0x55,0x77,0x2A,0xA6,
1915      0x25,0x2F,0x47,0xFA,0xC8,0xFF,0x8E,0x20,
1916      0x8C,0x6E,0x60,0x2E,0x58,0x48,0x72,0x44,
1917      0x56,0x36,0x4F,0x6E,0x3F,0x80,0x00,0x80,
1918      0x4F,0x7F,0x03,0xA8,0x7D,0x20,0x1A,0xA9,
1919      0x14,0x05,0x03,0x7E,0x64,0x31,0x14,0x75,
1920      0x18,0x05,0x18,0x05,0x4C,0xA8,0x01
1921};
1922
1923static const UCHAR XGI330_HiTVGroup3Simu[] =
1924{
1925      0x00,0x1A,0x22,0x63,0x62,0x22,0x08,0x95,
1926      0xDB,0x20,0xB8,0xB8,0x55,0x47,0x2A,0xA6,
1927      0x25,0x2F,0x47,0xFA,0xC8,0xFF,0x8E,0x20,
1928      0x8C,0x6E,0x60,0x15,0x26,0xD3,0xE4,0x11,
1929      0x56,0x36,0x4F,0x6E,0x3F,0x80,0x00,0x80,
1930      0x67,0x36,0x01,0x47,0x0E,0x10,0xBE,0xB4,
1931      0x01,0x05,0x03,0x7E,0x65,0x31,0x14,0x75,
1932      0x18,0x05,0x18,0x05,0x4C,0xA8,0x01
1933};
1934
1935static const UCHAR XGI330_HiTVGroup3Text[] =
1936{
1937      0x00,0x1A,0x22,0x63,0x62,0x22,0x08,0xA7,
1938      0xF5,0x20,0xCE,0xCE,0x55,0x47,0x2A,0xA6,
1939      0x25,0x2F,0x47,0xFA,0xC8,0xFF,0x8E,0x20,
1940      0x8C,0x6E,0x60,0x18,0x2C,0x0C,0x20,0x22,
1941      0x56,0x36,0x4F,0x6E,0x3F,0x80,0x00,0x80,
1942      0x93,0x3C,0x01,0x50,0x2F,0x10,0xF4,0xCA,
1943      0x01,0x05,0x03,0x7E,0x65,0x31,0x14,0x75,
1944      0x18,0x05,0x18,0x05,0x4C,0xA8,0x01
1945};
1946
1947static const UCHAR XGI330_Ren525pGroup3[] =
1948{
1949  0x00,0x14,0x15,0x25,0x55,0x15,0x0b,0x13,
1950  0xB1,0x41,0x62,0x62,0xFF,0xF4,0x45,0xa6,
1951  0x25,0x2F,0x67,0xF6,0xbf,0xFF,0x8E,0x20,
1952  0xAC,0xDA,0x60,0xFe,0x6A,0x9A,0x06,0x10,
1953  0xd1,0x04,0x18,0x0a,0xFF,0x80,0x00,0x80,
1954  0x3c,0x77,0x00,0xEF,0xE0,0x10,0xB0,0xE0,
1955  0x10,0x4F,0x0F,0x0F,0x05,0x0F,0x08,0x6E,
1956  0x1a,0x1F,0x25,0x2a,0x4C,0xAA,0x01
1957};
1958
1959static const UCHAR XGI330_Ren750pGroup3[] =
1960{
1961  0x00,0x14,0x15,0x25,0x55,0x15,0x0b,0x7a,
1962  0x54,0x41,0xE7,0xE7,0xFF,0xF4,0x45,0xa6,
1963  0x25,0x2F,0x67,0xF6,0xbf,0xFF,0x8E,0x20,
1964  0xAC,0x6A,0x60,0x2b,0x52,0xCD,0x61,0x10,
1965  0x51,0x04,0x18,0x0a,0x1F,0x80,0x00,0x80,
1966  0xFF,0xA4,0x04,0x2B,0x94,0x21,0x72,0x94,
1967  0x26,0x05,0x01,0x0F,0xed,0x0F,0x0A,0x64,
1968  0x18,0x1D,0x23,0x28,0x4C,0xAA,0x01
1969};
1970
1971static const XGI330_LVDSDataStruct  XGI_LVDS1024x768Data_1[]=
1972{
1973 { 960 , 438 , 1344 , 806 } ,	/* 00 (320x200,320x400,640x200,640x400) */
1974 { 960 , 388 , 1344 , 806 } ,	/* 01 (320x350,640x350) */
1975 { 1040, 438 , 1344 , 806 } ,	/* 02 (360x400,720x400) */
1976 { 1040, 388 , 1344 , 806 } ,	/* 03 (720x350) */
1977 { 960 , 518 , 1344 , 806 } ,	/* 04 (320x240,640x480) */
1978 {1120 , 638 , 1344 , 806 } ,	/* 05 (400x300,800x600) */
1979 {1344 , 806 , 1344 , 806 }	/* 06 (512x384,1024x768) */
1980};
1981
1982
1983static const XGI330_LVDSDataStruct  XGI_LVDS1024x768Data_2[]=
1984{
1985 {1344, 806,1344, 806},
1986 {1344, 806,1344, 806},
1987 {1344, 806,1344, 806},
1988 {1344, 806,1344, 806},
1989 {1344, 806,1344, 806},
1990 {1344, 806,1344, 806},
1991 {1344, 806,1344, 806},
1992 {800, 449,1280, 801},
1993 {800, 525,1280, 813}
1994};
1995
1996static const XGI330_LVDSDataStruct  XGI_LVDS1280x1024Data_1[]=
1997{
1998 {1048, 442,1688, 1066},
1999 {1048, 392,1688, 1066},
2000 {1048, 442,1688, 1066},
2001 {1048, 392,1688, 1066},
2002 {1048, 522,1688, 1066},
2003 {1208, 642,1688, 1066},
2004 {1432, 810,1688, 1066},
2005 {1688, 1066,1688, 1066}
2006};
2007
2008static const XGI330_LVDSDataStruct  XGI_LVDS1280x1024Data_2[]=
2009{
2010 {1344, 806,1344, 806},
2011 {1344, 806,1344, 806},
2012 {1344, 806,1344, 806},
2013 {1344, 806,1344, 806},
2014 {1344, 806,1344, 806},
2015 {1344, 806,1344, 806},
2016 {1344, 806,1344, 806},
2017 {800, 449,1280, 801},
2018 {800, 525,1280, 813}
2019};
2020
2021static const XGI330_LVDSDataStruct  XGI_LVDS1400x1050Data_1[]=
2022{
2023 {928,416,1688,1066},
2024 {928,366,1688,1066},
2025 {928,416,1688,1066},
2026 {928,366,1688,1066},
2027 {928,496,1688,1066},
2028 {1088,616,1688,1066},
2029 {1312,784,1688,1066},
2030 {1568,1040,1688,1066},
2031 {1688,1066,1688,1066}
2032};
2033
2034static const XGI330_LVDSDataStruct  XGI_LVDS1400x1050Data_2[]=
2035{
2036 {1688,1066,1688,1066},
2037 {1688,1066,1688,1066},
2038 {1688,1066,1688,1066},
2039 {1688,1066,1688,1066},
2040 {1688,1066,1688,1066},
2041 {1688,1066,1688,1066},
2042 {1688,1066,1688,1066},
2043 {1688,1066,1688,1066},
2044 {1688,1066,1688,1066}
2045};
2046
2047static const XGI330_LVDSDataStruct XGI_LVDS1600x1200Data_1[]=
2048{      /* ;;[ycchen] 12/05/02 LCDHTxLCDVT=2048x1320 */
2049        {        1088,520,2048,1320      },/* 00 (320x200,320x400,640x200,640x400) */
2050        {        1088,470,2048,1320      },/* 01 (320x350,640x350) */
2051        {        1088,520,2048,1320      },/* 02 (360x400,720x400) */
2052        {        1088,470,2048,1320      },/* 03 (720x350) */
2053        {        1088,600,2048,1320      },/* 04 (320x240,640x480) */
2054        {        1248,720,2048,1320      },/* 05 (400x300,800x600) */
2055        {        1472,888,2048,1320      },/* 06 (512x384,1024x768) */
2056        {        1728,1144,2048,1320     },/* 07 (640x512,1280x1024) */
2057        {        1848,1170,2048,1320     },/* 08 (1400x1050) */
2058        {        2048,1320,2048,1320     } /* 09 (1600x1200) */
2059};
2060
2061static const XGI330_LVDSDataStruct XGI_LVDSNoScalingData[]=
2062{
2063        {        800,449,800,449             }, /* 00 (320x200,320x400,640x200,640x400) */
2064        {        800,449,800,449             }, /* 01 (320x350,640x350) */
2065        {        800,449,800,449             }, /* 02 (360x400,720x400) */
2066        {        800,449,800,449             }, /* 03 (720x350) */
2067        {        800,525,800,525             }, /* 04 (640x480x60Hz) */
2068        {        1056,628,1056,628           }, /* 05 (800x600x60Hz) */
2069        {        1344,806,1344,806           }, /* 06 (1024x768x60Hz) */
2070        {        1688,1066,1688,1066         }, /* 07 (1280x1024x60Hz) */
2071        {        1688,1066,1688,1066         }, /* 08 (1400x1050x60Hz) ;;[ycchen] 12/19/02 */
2072        {        2160,1250,2160,1250         }, /* 09 (1600x1200x60Hz) */
2073        {        1688,806,1688,806           }  /* 0A (1280x768x60Hz) */
2074};
2075
2076static const XGI330_LVDSDataStruct XGI_LVDS1024x768Data_1x75[]=
2077{
2078	{960,438,1312,800  }, /* 00 (320x200,320x400,640x200,640x400) */
2079        {960,388,1312,800  }, /* 01 (320x350,640x350) */
2080        {1040,438,1312,800 }, /* 02 (360x400,720x400) */
2081        {1040,388,1312,800 }, /* 03 (720x350) */
2082        {928,512,1312,800  }, /* 04 (320x240,640x480) */
2083        {1088,632,1312,800 }, /* 05 (400x300,800x600) */
2084        {1312,800,1312,800 }, /* 06 (512x384,1024x768) */
2085};
2086
2087static const XGI330_LVDSDataStruct XGI_LVDS1024x768Data_2x75[]=
2088{
2089        {1312,800,1312,800}, /* ; 00 (320x200,320x400,640x200,640x400) */
2090        {1312,800,1312,800}, /* ; 01 (320x350,640x350) */
2091        {1312,800,1312,800}, /* ; 02 (360x400,720x400) */
2092        {1312,800,1312,800}, /* ; 03 (720x350) */
2093        {1312,800,1312,800}, /* ; 04 (320x240,640x480) */
2094        {1312,800,1312,800}, /* ; 05 (400x300,800x600) */
2095        {1312,800,1312,800}, /* ; 06 (512x384,1024x768) */
2096};
2097
2098static const XGI330_LVDSDataStruct XGI_LVDS1280x1024Data_1x75[]=
2099{
2100        {1048,442,1688,1066  }, /* ; 00 (320x200,320x400,640x200,640x400) */
2101        {1048,392,1688,1066  }, /* ; 01 (320x350,640x350) */
2102        {1128,442,1688,1066  }, /* ; 02 (360x400,720x400) */
2103        {1128,392,1688,1066  }, /* ; 03 (720x350) */
2104        {1048,522,1688,1066  }, /* ; 04 (320x240,640x480) */
2105        {1208,642,1688,1066  }, /* ; 05 (400x300,800x600) */
2106        {1432,810,1688,1066  }, /* ; 06 (512x384,1024x768) */
2107        {1688,1066,1688,1066 }, /* ; 06; 07 (640x512,1280x1024) */
2108};
2109
2110static const XGI330_LVDSDataStruct XGI_LVDS1280x1024Data_2x75[]=
2111{
2112        {1688,1066,1688,1066 }, /* ; 00 (320x200,320x400,640x200,640x400) */
2113        {1688,1066,1688,1066 }, /* ; 01 (320x350,640x350) */
2114        {1688,1066,1688,1066 }, /* ; 02 (360x400,720x400) */
2115        {1688,1066,1688,1066 }, /* ; 03 (720x350) */
2116        {1688,1066,1688,1066 }, /* ; 04 (320x240,640x480) */
2117        {1688,1066,1688,1066 }, /* ; 05 (400x300,800x600) */
2118        {1688,1066,1688,1066 }, /* ; 06 (512x384,1024x768) */
2119        {1688,1066,1688,1066 }, /* ; 06; 07 (640x512,1280x1024) */
2120};
2121
2122static const XGI330_LVDSDataStruct XGI_LVDSNoScalingDatax75[]=
2123{
2124        {800,449,800,449     }, /* ; 00 (320x200,320x400,640x200,640x400) */
2125        {800,449,800,449     }, /* ; 01 (320x350,640x350) */
2126        {900,449,900,449     }, /* ; 02 (360x400,720x400) */
2127        {900,449,900,449     }, /* ; 03 (720x350) */
2128        {800,500,800,500     }, /* ; 04 (640x480x75Hz) */
2129        {1056,625,1056,625   }, /* ; 05 (800x600x75Hz) */
2130        {1312,800,1312,800   }, /* ; 06 (1024x768x75Hz) */
2131        {1688,1066,1688,1066 }, /* ; 07 (1280x1024x75Hz) */
2132        {1688,1066,1688,1066 }, /* ; 08 (1400x1050x75Hz) ;;[ycchen] 12/19/02 */
2133        {2160,1250,2160,1250 }, /* ; 09 (1600x1200x75Hz) */
2134        {1688,806,1688,806   }, /* ; 0A (1280x768x75Hz) */
2135};
2136
2137static const XGI330_LVDSDataStruct XGI_LVDS1024x768Des_1[]=
2138{
2139	{      0,1048,   0, 771     }, /* 00 (320x200,320x400,640x200,640x400) */
2140        {      0,1048,   0, 771     }, /* 01 (320x350,640x350) */
2141        {      0,1048,   0, 771     }, /* 02 (360x400,720x400) */
2142        {      0,1048,   0, 771     }, /* 03 (720x350) */
2143        {      0,1048,   0, 771     }, /* 04 (640x480x60Hz) */
2144        {      0,1048,   0, 771     }, /* 05 (800x600x60Hz) */
2145        {      0,1048, 805, 770     }  /* 06 (1024x768x60Hz) */
2146};
2147
2148static const XGI330_LVDSDataStruct XGI_LVDS1024x768Des_2[]=
2149{
2150    	{      1142, 856, 622, 587     }, /* 00 (320x200,320x400,640x200,640x400) */
2151        {      1142, 856, 597, 562     }, /* 01 (320x350,640x350) */
2152        {      1142, 856, 622, 587     }, /* 02 (360x400,720x400) */
2153        {      1142, 856, 597, 562     }, /* 03 (720x350) */
2154        {      1142,1048, 722, 687     }, /* 04 (640x480x60Hz) */
2155        {      1232, 936, 722, 687     }, /* 05 (800x600x60Hz) */
2156        {         0,1048, 805, 771     }  /* 06 (1024x768x60Hz) */
2157};
2158
2159static const XGI330_LVDSDataStruct XGI_LVDS1024x768Des_3[]=
2160{
2161    	{       320,  24, 622, 587     }, /* 00 (320x200,320x400,640x200,640x400) */
2162        {       320,  24, 597, 562     }, /* 01 (320x350,640x350) */
2163        {       320,  24, 622, 587     }, /* 02 (360x400,720x400) */
2164        {       320,  24, 597, 562     }, /* 03 (720x350) */
2165        {       320,  24, 722, 687     }  /* 04 (640x480x60Hz) */
2166};
2167
2168static const XGI330_LVDSDataStruct XGI_LVDS1280x1024Des_1[]=
2169{
2170    	{      0,1328,    0, 1025     }, /* 00 (320x200,320x400,640x200,640x400) */
2171        {      0,1328,    0, 1025     }, /* 01 (320x350,640x350) */
2172        {      0,1328,    0, 1025     }, /* 02 (360x400,720x400) */
2173        {      0,1328,    0, 1025     }, /* 03 (720x350) */
2174        {      0,1328,    0, 1025     }, /* 04 (640x480x60Hz) */
2175        {      0,1328,    0, 1025     }, /* 05 (800x600x60Hz) */
2176        {      0,1328,    0, 1025     }, /* 06 (1024x768x60Hz) */
2177        {      0,1328, 1065, 1024     }  /* 07 (1280x1024x60Hz) */
2178};
2179
2180 /* The Display setting for DE Mode Panel */
2181static const XGI330_LVDSDataStruct XGI_LVDS1280x1024Des_2[]=
2182{
2183    	{      1368,1008,752,711     }, /* 00 (320x200,320x400,640x200,640x400) */
2184        {      1368,1008,729,688     }, /* 01 (320x350,640x350) */
2185        {      1408,1048,752,711     }, /* 02 (360x400,720x400) */
2186        {      1408,1048,729,688     }, /* 03 (720x350) */
2187        {      1368,1008,794,753     }, /* 04 (640x480x60Hz) */
2188        {      1448,1068,854,813     }, /* 05 (800x600x60Hz) */
2189        {      1560,1200,938,897     }, /* 06 (1024x768x60Hz) */
2190        {      0000,1328,0,1025     }  /* 07 (1280x1024x60Hz) */
2191};
2192
2193static const XGI330_LVDSDataStruct XGI_LVDS1400x1050Des_1[]=
2194{
2195    	{      0,1448,0,1051     }, /* 00 (320x200,320x400,640x200,640x400) */
2196        {      0,1448,0,1051     }, /* 01 (320x350,640x350) */
2197        {      0,1448,0,1051     }, /* 02 (360x400,720x400) */
2198        {      0,1448,0,1051     }, /* 03 (720x350) */
2199        {      0,1448,0,1051     }, /* 04 (640x480x60Hz) */
2200        {      0,1448,0,1051     }, /* 05 (800x600x60Hz) */
2201        {      0,1448,0,1051     }, /* 06 (1024x768x60Hz) */
2202        {      0,1448,0,1051     }, /* 07 (1280x1024x60Hz) */
2203        {      0,1448,0,1051     }  /* 08 (1400x1050x60Hz) */
2204};
2205
2206static const XGI330_LVDSDataStruct XGI_LVDS1400x1050Des_2[]=
2207{
2208    	{      1308,1068, 781, 766     }, /* 00 (320x200,320x400,640x200,640x400) */
2209        {      1308,1068, 781, 766     }, /* 01 (320x350,640x350) */
2210        {      1308,1068, 781, 766     }, /* 02 (360x400,720x400) */
2211        {      1308,1068, 781, 766     }, /* 03 (720x350) */
2212        {      1308,1068, 781, 766     }, /* 04 (640x480x60Hz) */
2213        {      1388,1148, 841, 826     }, /* 05 (800x600x60Hz) */
2214        {      1490,1250, 925, 910     }, /* 06 (1024x768x60Hz) */
2215        {      1608,1368,1053,1038     }, /* 07 (1280x1024x60Hz) */
2216        {      0,1448,0,1051     }  /* 08 (1400x1050x60Hz) */
2217};
2218
2219static const XGI330_LVDSDataStruct XGI_LVDS1600x1200Des_1[]=
2220{
2221    	{      0,1664,0,1201     }, /* 00 (320x200,320x400,640x200,640x400) */
2222        {      0,1664,0,1201     }, /* 01 (320x350,640x350) */
2223        {      0,1664,0,1201     }, /* 02 (360x400,720x400) */
2224        {      0,1664,0,1201     }, /* 03 (720x350) */
2225        {      0,1664,0,1201     }, /* 04 (640x480x60Hz) */
2226        {      0,1664,0,1201     }, /* 05 (800x600x60Hz) */
2227        {      0,1664,0,1201     }, /* 06 (1024x768x60Hz) */
2228        {      0,1664,0,1201     }, /* 07 (1280x1024x60Hz) */
2229        {      0,1664,0,1201     }, /* 08 (1400x1050x60Hz) */
2230        {      0,1664,0,1201     }  /* 09 (1600x1200x60Hz) */
2231};
2232
2233static const XGI330_LCDDataDesStruct2  XGI_LVDSNoScalingDesData[]=
2234{
2235    	{     0, 648, 448, 405,  96,   2   }, /* 00 (320x200,320x400,640x200,640x400) */
2236        {     0, 648, 448, 355,  96,   2   }, /* 01 (320x350,640x350) */
2237        {     0, 648, 448, 405,  96,   2   }, /* 02 (360x400,720x400) */
2238        {     0, 648, 448, 355,  96,   2   }, /* 03 (720x350) */
2239        {     0, 648,  1, 483,  96,   2   }, /* 04 (640x480x60Hz) */
2240        {     0, 840, 627, 600, 128,   4   }, /* 05 (800x600x60Hz) */
2241        {     0,1048, 805, 770, 136,   6   }, /* 06 (1024x768x60Hz) */
2242        {     0,1328,0,1025, 112,   3   }, /* 07 (1280x1024x60Hz) */
2243        {     0,1438,0,1051, 112,   3   }, /* 08 (1400x1050x60Hz) ;;[ycchen] 12/19/02 */
2244        {     0,1664,0,1201, 192,   3   }, /* 09 (1600x1200x60Hz) */
2245        {     0,1328,0,0771, 112,   6   }  /* 0A (1280x768x60Hz) */
2246};
2247
2248static const XGI330_LVDSDataStruct XGI_LVDS1024x768Des_1x75[]=			/* ; 1024x768 Full-screen */
2249{
2250        {0,1040,0,769}, /* ; 00 (320x200,320x400,640x200,640x400) */
2251        {0,1040,0,769}, /* ; 01 (320x350,640x350) */
2252        {0,1040,0,769}, /* ; 02 (360x400,720x400) */
2253        {0,1040,0,769}, /* ; 03 (720x350) */
2254        {0,1040,0,769}, /* ; 04 (640x480x75Hz) */
2255        {0,1040,0,769}, /* ; 05 (800x600x75Hz) */
2256        {0,1040,0,769} /* ; 06 (1024x768x75Hz) */
2257};
2258
2259static const XGI330_LVDSDataStruct XGI_LVDS1024x768Des_2x75[]= /* ; 1024x768 center-screen (Enh. Mode) */
2260{
2261        {1142, 856,622,587 }, /* 00 (320x200,320x400,640x200,640x400) */
2262        {1142, 856,597,562 }, /* 01 (320x350,640x350) */
2263        {1142, 856,622,587 }, /* 02 (360x400,720x400) */
2264        {1142, 856,597,562 }, /* 03 (720x350) */
2265        {1142,1048,722,687 }, /* 04 (640x480x60Hz) */
2266        {1232, 936,722,687 }, /* 05 (800x600x60Hz) */
2267        {   0,1048,805,771 }  /* 06 (1024x768x60Hz) */
2268};
2269
2270static const XGI330_LVDSDataStruct XGI_LVDS1024x768Des_3x75[]= /* ; 1024x768 center-screen (St.Mode) */
2271{
2272        {320,24,622,587  }, /* ; 00 (320x200,320x400,640x200,640x400) */
2273        {320,24,597,562  }, /* ; 01 (320x350,640x350) */
2274        {320,24,622,587  }, /* ; 02 (360x400,720x400) */
2275        {320,24,597,562  }, /* ; 03 (720x350) */
2276        {320,24,722,687  } /* ; 04 (640x480x60Hz) */
2277};
2278
2279static const XGI330_LVDSDataStruct XGI_LVDS1280x1024Des_1x75[]=
2280{
2281        {0,1296,0,1025}, /* ; 00 (320x200,320x400,640x200,640x400) */
2282        {0,1296,0,1025}, /* ; 01 (320x350,640x350) */
2283        {0,1296,0,1025}, /* ; 02 (360x400,720x400) */
2284        {0,1296,0,1025}, /* ; 03 (720x350) */
2285        {0,1296,0,1025}, /* ; 04 (640x480x75Hz) */
2286        {0,1296,0,1025}, /* ; 05 (800x600x75Hz) */
2287        {0,1296,0,1025}, /* ; 06 (1024x768x75Hz) */
2288        {0,1296,0,1025} /* ; 07 (1280x1024x75Hz) */
2289};
2290
2291/* The Display setting for DE Mode Panel */
2292static const XGI330_LVDSDataStruct XGI_LVDS1280x1024Des_2x75[]=   /* [ycchen] 02/18/03 Set DE as default */
2293{
2294        {1368,976,752,711 }, /* ; 00 (320x200,320x400,640x200,640x400) */
2295        {1368,976,729,688 }, /* ; 01 (320x350,640x350) */
2296        {1408,976,752,711 }, /* ; 02 (360x400,720x400) */
2297        {1408,976,729,688 }, /* ; 03 (720x350) */
2298        {1368,976,794,753 }, /* ; 04 (640x480x75Hz) */
2299        {1448,1036,854,813}, /* ; 05 (800x600x75Hz) */
2300        {1560,1168,938,897}, /* ; 06 (1024x768x75Hz) */
2301        {0,1296,0,1025    } /* ; 07 (1280x1024x75Hz) */
2302};
2303
2304static const XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesDatax75[]=  /* Scaling LCD 75Hz */
2305{
2306       { 0,648,448,405,96,2  }, /* ; 00 (320x200,320x400,640x200,640x400) */
2307       { 0,648,448,355,96,2  }, /* ; 01 (320x350,640x350) */
2308       { 0,729,448,405,108,2 }, /* ; 02 (360x400,720x400) */
2309       { 0,729,448,355,108,2 }, /* ; 03 (720x350) */
2310       { 0,656,0,481,64,3    }, /* ; 04 (640x480x75Hz) */
2311       { 0,816,0,601,80,3    }, /* ; 05 (800x600x75Hz) */
2312       { 0,1040,0,769,96,3   }, /* ; 06 (1024x768x75Hz) */
2313       { 0,1296,0,1025,144,3 }, /* ; 07 (1280x1024x75Hz) */
2314       { 0,1448,0,1051,112,3 }, /* ; 08 (1400x1050x75Hz) ;;[ycchen] 12/19/02 */
2315       { 0,1664,0,1201,192,3 }, /* ; 09 (1600x1200x75Hz) */
2316       { 0,1328,0,771,112,6  }  /* ; 0A (1280x768x75Hz) */
2317};
2318
2319static const XGI330_CHTVDataStruct  XGI_CHTVUNTSCData[]=
2320{
2321 {840, 600, 840, 600},
2322 {840, 600, 840, 600},
2323 {840, 600, 840, 600},
2324 {840, 600, 840, 600},
2325 {784, 600, 784, 600},
2326 {1064, 750,1064, 750}
2327};
2328
2329static const XGI330_CHTVDataStruct  XGI_CHTVONTSCData[]=
2330{
2331 {840, 525, 840, 525},
2332 {840, 525, 840, 525},
2333 {840, 525, 840, 525},
2334 {840, 525, 840, 525},
2335 {784, 525, 784, 525},
2336 {1040, 700,1040, 700}
2337};
2338
2339static const XGI330_CHTVDataStruct  XGI_CHTVUPALData[]=
2340{
2341 {1008, 625,1008, 625},
2342 {1008, 625,1008, 625},
2343 {1008, 625,1008, 625},
2344 {1008, 625,1008, 625},
2345 {840, 750, 840, 750},
2346 {936, 836, 936, 836}
2347};
2348
2349static const XGI330_CHTVDataStruct  XGI_CHTVOPALData[]=
2350{
2351 {1008, 625,1008, 625},
2352 {1008, 625,1008, 625},
2353 {1008, 625,1008, 625},
2354 {1008, 625,1008, 625},
2355 {840, 625, 840, 625},
2356 {960, 750, 960, 750}
2357};
2358
2359static const XGI_LVDSCRT1HDataStruct  XGI_LVDSCRT11024x768_1_H[]=
2360{
2361	        /* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2362                {{      0x4B,0x27,0x8F,0x32,0x1B,0x00,0x45,0x00 }}, /* 00 (320x) */
2363                {{      0x4B,0x27,0x8F,0x2B,0x03,0x00,0x44,0x00 }}, /* 01 (360x) */
2364                {{      0x55,0x31,0x99,0x46,0x1D,0x00,0x55,0x00 }}, /* 02 (400x) */
2365                {{      0x63,0x3F,0x87,0x4A,0x93,0x00,0x01,0x00 }}, /* 03 (512x) */
2366                {{      0x73,0x4F,0x97,0x55,0x86,0x00,0x05,0x00 }}, /* 04 (640x) */
2367                {{      0x73,0x4F,0x97,0x55,0x86,0x00,0x05,0x00 }}, /* 05 (720x) */
2368                {{      0x87,0x63,0x8B,0x69,0x1A,0x00,0x26,0x00 }}, /* 06 (800x) */
2369                {{      0xA3,0x7F,0x87,0x86,0x97,0x00,0x02,0x00 }} /* 07 (1024x) */
2370};
2371
2372static const XGI_LVDSCRT1HDataStruct  XGI_LVDSCRT11280x1024_1_H[]=
2373{
2374		/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2375                {{      0x56,0x27,0x9A,0x30,0x1E,0x00,0x05,0x00 }}, /* 00 (320x) */
2376                {{      0x56,0x27,0x9A,0x30,0x1E,0x00,0x05,0x00 }}, /* 01 (360x) */
2377                {{      0x60,0x31,0x84,0x3A,0x88,0x00,0x01,0x00 }}, /* 02 (400x) */
2378                {{      0x6E,0x3F,0x92,0x48,0x96,0x00,0x01,0x00 }}, /* 03 (512x) */
2379                {{      0x7E,0x4F,0x82,0x58,0x06,0x00,0x06,0x00 }}, /* 04 (640x) */
2380                {{      0x7E,0x4F,0x82,0x58,0x06,0x00,0x06,0x00 }}, /* 05 (720x) */
2381                {{      0x92,0x63,0x96,0x6C,0x1A,0x00,0x06,0x00 }}, /* 06 (800x) */
2382                {{      0xAE,0x7F,0x92,0x88,0x96,0x00,0x02,0x00 }}, /* 07 (1024x) */
2383                {{      0xCE,0x9F,0x92,0xA8,0x16,0x00,0x07,0x00 }} /* 08 (1280x) */
2384};
2385
2386static const XGI_LVDSCRT1HDataStruct  XGI_LVDSCRT11024x768_2_H[]=
2387{
2388		/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2389                {{      0x63,0x27,0x87,0x3B,0x8C,0x00,0x01,0x00 }}, /* 00 (320x) */
2390                {{      0x63,0x27,0x87,0x3B,0x8C,0x00,0x01,0x00 }}, /* 01 (360x) */
2391                {{      0x63,0x31,0x87,0x3D,0x8E,0x00,0x01,0x00 }}, /* 02 (400x) */
2392                {{      0x63,0x3F,0x87,0x45,0x96,0x00,0x01,0x00 }}, /* 03 (512x) */
2393                {{      0xA3,0x4F,0x87,0x6E,0x9F,0x00,0x06,0x00 }}, /* 04 (640x) */
2394                {{      0xA3,0x4F,0x87,0x6E,0x9F,0x00,0x06,0x00 }}, /* 05 (720x) */
2395                {{      0xA3,0x63,0x87,0x78,0x89,0x00,0x02,0x00 }}, /* 06 (800x) */
2396                {{      0xA3,0x7F,0x87,0x86,0x97,0x00,0x02,0x00 }} /* 07 (1024x) */
2397};
2398
2399static const XGI_LVDSCRT1HDataStruct  XGI_LVDSCRT11280x1024_2_H[]=
2400{
2401                /* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2402                {{      0x7E,0x3B,0x9A,0x44,0x12,0x00,0x01,0x00 }}, /* 00 (320x) */
2403                {{      0x7E,0x3B,0x9A,0x44,0x12,0x00,0x01,0x00 }}, /* 01 (360x) */
2404                {{      0x7E,0x40,0x84,0x49,0x91,0x00,0x01,0x00 }}, /* 02 (400x) */
2405                {{      0x7E,0x47,0x93,0x50,0x9E,0x00,0x01,0x00 }}, /* 03 (512x) */
2406                {{      0xCE,0x77,0x8A,0x80,0x8E,0x00,0x02,0x00 }}, /* 04 (640x) */
2407                {{      0xCE,0x77,0x8A,0x80,0x8E,0x00,0x02,0x00 }}, /* 05 (720x) */
2408                {{      0xCE,0x81,0x94,0x8A,0x98,0x00,0x02,0x00 }}, /* 06 (800x) */
2409                {{      0xCE,0x8F,0x82,0x98,0x06,0x00,0x07,0x00 }}, /* 07 (1024x) */
2410                {{      0xCE,0x9F,0x92,0xA8,0x16,0x00,0x07,0x00 }} /* 08 (1280x) */
2411};
2412
2413static const XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_1_H[]=
2414{               /* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2415                {{      0x47,0x27,0x8B,0x2C,0x1A,0x00,0x05,0x00 }}, /* 00 (320x) */
2416                {{      0x47,0x27,0x8B,0x30,0x1E,0x00,0x05,0x00 }}, /* 01 (360x) */
2417                {{      0x51,0x31,0x95,0x36,0x04,0x00,0x01,0x00 }}, /* 02 (400x) */
2418                {{      0x5F,0x3F,0x83,0x44,0x92,0x00,0x01,0x00 }}, /* 03 (512x) */
2419                {{      0x6F,0x4F,0x93,0x54,0x82,0x00,0x05,0x00 }}, /* 04 (640x) */
2420                {{      0x6F,0x4F,0x93,0x54,0x82,0x00,0x05,0x00 }}, /* 05 (720x) */
2421                {{      0x83,0x63,0x87,0x68,0x16,0x00,0x06,0x00 }}, /* 06 (800x) */
2422                {{      0x9F,0x7F,0x83,0x84,0x92,0x00,0x02,0x00 }}, /* 07 (1024x) */
2423                {{      0xBF,0x9F,0x83,0xA4,0x12,0x00,0x07,0x00 }}, /* 08 (1280x) */
2424                {{      0xCE,0xAE,0x92,0xB3,0x01,0x00,0x03,0x00 }} /* 09 (1400x) */
2425};
2426
2427static const XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_2_H[]=
2428{               /* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2429                {{      0x76,0x3F,0x83,0x45,0x8C,0x00,0x41,0x00 }}, /* 00 (320x) */
2430                {{      0x76,0x3F,0x83,0x45,0x8C,0x00,0x41,0x00 }}, /* 01 (360x) */
2431                {{      0x76,0x31,0x9A,0x48,0x9F,0x00,0x41,0x00 }}, /* 02 (400x) */
2432                {{      0x76,0x3F,0x9A,0x4F,0x96,0x00,0x41,0x00 }}, /* 03 (512x) */
2433                {{      0xCE,0x7E,0x82,0x87,0x9E,0x00,0x02,0x00 }}, /* 04 (640x) */
2434                {{      0xCE,0x7E,0x82,0x87,0x9E,0x00,0x02,0x00 }}, /* 05 (720x) */
2435                {{      0xCE,0x63,0x92,0x96,0x04,0x00,0x07,0x00 }}, /* 06 (800x) */
2436                {{      0xCE,0x7F,0x92,0xA4,0x12,0x00,0x07,0x00 }}, /* 07 (1024x) */
2437                {{      0xCE,0x9F,0x92,0xB4,0x02,0x00,0x03,0x00 }}, /* 08 (1280x) */
2438                {{      0xCE,0xAE,0x92,0xBC,0x0A,0x00,0x03,0x00 }} /* 09 (1400x) */
2439};
2440
2441static const XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11600x1200_1_H[]=
2442/* ;302lv channelA [ycchen] 12/05/02 LCDHT=2048 */
2443{   /* ; CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2444                {{      0x5B,0x27,0x9F,0x32,0x0A,0x00,0x01,0x00 }},/* 00 (320x) */
2445                {{      0x5B,0x27,0x9F,0x32,0x0A,0x00,0x01,0x00 }},/* 01 (360x) */
2446                {{      0x65,0x31,0x89,0x3C,0x94,0x00,0x01,0x00 }},/* 02 (400x) */
2447                {{      0x73,0x3F,0x97,0x4A,0x82,0x00,0x05,0x00 }},/* 03 (512x) */
2448                {{      0x83,0x4F,0x87,0x51,0x09,0x00,0x06,0x00 }},/* 04 (640x) */
2449		{{      0x83,0x4F,0x87,0x51,0x09,0x00,0x06,0x00 }},/* 05 (720x) */
2450		{{      0x97,0x63,0x9B,0x65,0x1D,0x00,0x06,0xF0 }},/* 06 (800x) */
2451		{{      0xB3,0x7F,0x97,0x81,0x99,0x00,0x02,0x00 }},/* 07 (1024x) */
2452		{{      0xD3,0x9F,0x97,0xA1,0x19,0x00,0x07,0x00 }},/* 08 (1280x) */
2453		{{      0xE2,0xAE,0x86,0xB9,0x91,0x00,0x03,0x00 }},/* 09 (1400x) */
2454		{{      0xFB,0xC7,0x9F,0xC9,0x81,0x00,0x07,0x00 }} /* 0A (1600x) */
2455};
2456
2457static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_V[]=
2458{               /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
2459                {{      0x97,0x1F,0x60,0x87,0x5D,0x83,0x10      }}, /* 00 (x350) */
2460                {{      0xB4,0x1F,0x92,0x89,0x8F,0xB5,0x30      }}, /* 01 (x400) */
2461                {{      0x04,0x3E,0xE2,0x89,0xDF,0x05,0x00      }}, /* 02 (x480) */
2462                {{      0x7C,0xF0,0x5A,0x8F,0x57,0x7D,0xA0      }}, /* 03 (x600) */
2463                {{      0x24,0xF5,0x02,0x88,0xFF,0x25,0x90      }} /* 04 (x768) */
2464};
2465
2466static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_V[]=
2467{               /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2468                {{      0x24,0xBB,0x31,0x87,0x5D,0x25,0x30      }}, /* 00 (x350) */
2469                {{      0x24,0xBB,0x4A,0x80,0x8F,0x25,0x30      }}, /* 01 (x400) */
2470                {{      0x24,0xBB,0x72,0x88,0xDF,0x25,0x30      }}, /* 02 (x480) */
2471                {{      0x24,0xF1,0xAE,0x84,0x57,0x25,0xB0      }}, /* 03 (x600) */
2472                {{      0x24,0xF5,0x02,0x88,0xFF,0x25,0x90      }} /* 04 (x768) */
2473};
2474
2475static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_V[]=
2476{               /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2477                {{       0x86,0x1F,0x5E,0x82,0x5D,0x87,0x00     }}, /* 00 (x350) */
2478                {{       0xB8,0x1F,0x90,0x84,0x8F,0xB9,0x30     }}, /* 01 (x400) */
2479                {{       0x08,0x3E,0xE0,0x84,0xDF,0x09,0x00     }}, /* 02 (x480) */
2480                {{       0x80,0xF0,0x58,0x8C,0x57,0x81,0xA0     }}, /* 03 (x600) */
2481                {{       0x28,0xF5,0x00,0x84,0xFF,0x29,0x90     }}, /* 04 (x768) */
2482                {{       0x28,0x5A,0x13,0x87,0xFF,0x29,0xA9     }} /* 05 (x1024) */
2483};
2484
2485static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_V[]=
2486{               /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2487                {{      0x28,0xD2,0xAF,0x83,0xAE,0xD8,0xA1      }}, /* 00 (x350) */
2488                {{      0x28,0xD2,0xC8,0x8C,0xC7,0xF2,0x81      }}, /* 01 (x400) */
2489                {{      0x28,0xD2,0xF0,0x84,0xEF,0x1A,0xB1      }}, /* 02 (x480) */
2490                {{      0x28,0xDE,0x2C,0x8F,0x2B,0x56,0x91      }}, /* 03 (x600) */
2491                {{      0x28,0xDE,0x80,0x83,0x7F,0xAA,0x91      }}, /* 04 (x768) */
2492                {{      0x28,0x5A,0x13,0x87,0xFF,0x29,0xA9      }} /* 05 (x1024) */
2493};
2494
2495static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_1_V[]=
2496{               /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2497                {{      0x6C,0x1F,0x60,0x84,0x5D,0x6D,0x10      }}, /* 00 (x350) */
2498                {{      0x9E,0x1F,0x93,0x86,0x8F,0x9F,0x30      }}, /* 01 (x400) */
2499                {{      0xEE,0x1F,0xE2,0x86,0xDF,0xEF,0x10      }}, /* 02 (x480) */
2500                {{      0x66,0xF0,0x5A,0x8e,0x57,0x67,0xA0      }}, /* 03 (x600) */
2501                {{      0x0E,0xF5,0x02,0x86,0xFF,0x0F,0x90      }}, /* 04 (x768) */
2502                {{      0x0E,0x5A,0x02,0x86,0xFF,0x0F,0x89      }}, /* 05 (x1024) */
2503                {{      0x28,0x10,0x1A,0x80,0x19,0x29,0x0F      }} /* 06 (x1050) */
2504};
2505
2506static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_2_V[]=
2507{              /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2508                {{      0x28,0x92,0xB6,0x83,0xB5,0xCF,0x81      }}, /* 00 (x350) */
2509                {{      0x28,0x92,0xD5,0x82,0xD4,0xEE,0x81      }}, /* 01 (x400) */
2510                {{      0x28,0x92,0xFD,0x8A,0xFC,0x16,0xB1      }}, /* 02 (x480) */
2511                {{      0x28,0xD4,0x39,0x86,0x57,0x29,0x81      }}, /* 03 (x600) */
2512                {{      0x28,0xD4,0x8D,0x9A,0xFF,0x29,0xA1      }}, /* 04 (x768) */
2513                {{      0x28,0x5A,0x0D,0x9A,0xFF,0x29,0xA9      }}, /* 05 (x1024) */
2514                {{      0x28,0x10,0x1A,0x87,0x19,0x29,0x8F      }} /* 06 (x1050) */
2515};
2516
2517static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11600x1200_1_V[]=
2518{
2519               /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
2520                {{      0xd4,0x1F,0x81,0x84,0x5D,0xd5,0x10      }}, /* 00 (x350) */
2521                {{      0x06,0x3e,0xb3,0x86,0x8F,0x07,0x20      }}, /* 01 (x400) */
2522                {{      0x56,0xba,0x03,0x86,0xDF,0x57,0x00      }}, /* 02 (x480) */
2523                {{      0xce,0xF0,0x7b,0x8e,0x57,0xcf,0xa0      }}, /* 03 (x600) */
2524                {{      0x76,0xF5,0x23,0x86,0xFF,0x77,0x90      }}, /* 04 (x768) */
2525                {{      0x76,0x5A,0x23,0x86,0xFF,0x77,0x89      }}, /* 05 (x1024) */
2526                {{      0x90,0x10,0x1A,0x8E,0x19,0x91,0x2F      }}, /* 06 (x1050) */
2527                {{      0x26,0x11,0xd3,0x86,0xaF,0x27,0x3f      }} /* 07 (x1200) */
2528};
2529
2530static const XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_Hx75[]=
2531{ 	/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2532    {{      0x4B,0x27,0x8F,0x32,0x1B,0x00,0x45,0x00 }},/* ; 00 (320x) */
2533    {{      0x4B,0x27,0x8F,0x2B,0x03,0x00,0x44,0x00 }},/* ; 01 (360x) */
2534    {{      0x55,0x31,0x99,0x46,0x1D,0x00,0x55,0x00 }},/* ; 02 (400x) */
2535    {{      0x63,0x3F,0x87,0x4A,0x93,0x00,0x01,0x00 }},/* ; 03 (512x) */
2536    {{      0x6F,0x4F,0x93,0x54,0x80,0x00,0x05,0x00 }},/* ; 04 (640x) */
2537    {{      0x6F,0x4F,0x93,0x54,0x80,0x00,0x05,0x00 }},/* ; 05 (720x) */
2538    {{      0x83,0x63,0x87,0x68,0x14,0x00,0x26,0x00 }},/* ; 06 (800x) */
2539    {{      0x9F,0x7F,0x83,0x85,0x91,0x00,0x02,0x00 }} /* ; 07 (1024x) */
2540};
2541
2542static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_Vx75[]=
2543{	/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
2544    {{      0x97,0x1F,0x60,0x87,0x5D,0x83,0x10      }},/* ; 00 (x350) */
2545    {{      0xB4,0x1F,0x92,0x89,0x8F,0xB5,0x30      }},/* ; 01 (x400) */
2546    {{      0xFE,0x1F,0xE0,0x84,0xDF,0xFF,0x10      }},/* ; 02 (x480) */
2547    {{      0x76,0xF0,0x58,0x8C,0x57,0x77,0xA0      }},/* ; 03 (x600) */
2548    {{      0x1E,0xF5,0x00,0x83,0xFF,0x1F,0x90      }} /* ; 04 (x768) */
2549};
2550
2551static const XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_Hx75[]=
2552{       /* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2553    {{      0x63,0x27,0x87,0x3B,0x8C,0x00,0x01,0x00 }},/* ; 00 (320x) */
2554    {{      0x63,0x27,0x87,0x3B,0x8C,0x00,0x01,0x00 }},/* ; 01 (360x) */
2555    {{      0x63,0x31,0x87,0x3D,0x8E,0x00,0x01,0x00 }},/* ; 02 (400x) */
2556    {{      0x63,0x3F,0x87,0x45,0x96,0x00,0x01,0x00 }},/* ; 03 (512x) */
2557    {{      0xA3,0x4F,0x87,0x6E,0x9F,0x00,0x06,0x00 }},/* ; 04 (640x) */
2558    {{      0xA3,0x4F,0x87,0x6E,0x9F,0x00,0x06,0x00 }},/* ; 05 (720x) */
2559    {{      0xA3,0x63,0x87,0x78,0x89,0x00,0x02,0x00 }},/* ; 06 (800x) */
2560    {{      0xA3,0x7F,0x87,0x86,0x97,0x00,0x02,0x00 }} /* ; 07 (1024x) */
2561};
2562
2563static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_Vx75[]=
2564{       /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2565    {{      0x24,0xBB,0x31,0x87,0x5D,0x25,0x30      }},/* ; 00 (x350) */
2566    {{      0x24,0xBB,0x4A,0x80,0x8F,0x25,0x30      }},/* ; 01 (x400) */
2567    {{      0x24,0xBB,0x72,0x88,0xDF,0x25,0x30      }},/* ; 02 (x480) */
2568    {{      0x24,0xF1,0xAE,0x84,0x57,0x25,0xB0      }},/* ; 03 (x600) */
2569    {{      0x24,0xF5,0x02,0x88,0xFF,0x25,0x90      }} /* ; 04 (x768) */
2570};
2571
2572static const XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_Hx75[]=
2573{      /* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2574    {{      0x56,0x27,0x9A,0x30,0x1E,0x00,0x05,0x00 }},/* ; 00 (320x) */
2575    {{      0x56,0x27,0x9A,0x30,0x1E,0x00,0x05,0x00 }},/* ; 01 (360x) */
2576    {{      0x60,0x31,0x84,0x3A,0x88,0x00,0x01,0x00 }},/* ; 02 (400x) */
2577    {{      0x6E,0x3F,0x92,0x48,0x96,0x00,0x01,0x00 }},/* ; 03 (512x) */
2578    {{      0x7E,0x4F,0x82,0x54,0x06,0x00,0x06,0x00 }},/* ; 04 (640x) */
2579    {{      0x7E,0x4F,0x82,0x54,0x06,0x00,0x06,0x00 }},/* ; 05 (720x) */
2580    {{      0x92,0x63,0x96,0x68,0x1A,0x00,0x06,0x00 }},/* ; 06 (800x) */
2581    {{      0xAE,0x7F,0x92,0x84,0x96,0x00,0x02,0x00 }},/* ; 07 (1024x) */
2582    {{      0xCE,0x9F,0x92,0xA5,0x17,0x00,0x07,0x00 }} /* ; 08 (1280x) */
2583};
2584
2585static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_Vx75[]=
2586{	/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2587    {{      0x86,0xD1,0xBC,0x80,0xBB,0xE5,0x00      }},/* ; 00 (x350) */
2588    {{      0xB8,0x1F,0x90,0x84,0x8F,0xB9,0x30      }},/* ; 01 (x400) */
2589    {{      0x08,0x3E,0xE0,0x84,0xDF,0x09,0x00      }},/* ; 02 (x480) */
2590    {{      0x80,0xF0,0x58,0x8C,0x57,0x81,0xA0      }},/* ; 03 (x600) */
2591    {{      0x28,0xF5,0x00,0x84,0xFF,0x29,0x90      }},/* ; 04 (x768) */
2592    {{      0x28,0x5A,0x13,0x87,0xFF,0x29,0xA9      }} /* ; 05 (x1024) */
2593};
2594
2595static const XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_Hx75[]=
2596{
2597	/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
2598    {{      0x7E,0x3B,0x9A,0x44,0x12,0x00,0x01,0x00 }},/* ; 00 (320x) */
2599    {{      0x7E,0x3B,0x9A,0x44,0x12,0x00,0x01,0x00 }},/* ; 01 (360x) */
2600    {{      0x7E,0x40,0x84,0x49,0x91,0x00,0x01,0x00 }},/* ; 02 (400x) */
2601    {{      0x7E,0x47,0x93,0x50,0x9E,0x00,0x01,0x00 }},/* ; 03 (512x) */
2602    {{      0xCE,0x77,0x8A,0x80,0x8E,0x00,0x02,0x00 }},/* ; 04 (640x) */
2603    {{      0xCE,0x77,0x8A,0x80,0x8E,0x00,0x02,0x00 }},/* ; 05 (720x) */
2604    {{      0xCE,0x81,0x94,0x8A,0x98,0x00,0x02,0x00 }},/* ; 06 (800x) */
2605    {{      0xCE,0x8F,0x82,0x98,0x06,0x00,0x07,0x00 }},/* ; 07 (1024x) */
2606    {{      0xCE,0x9F,0x92,0xA8,0x16,0x00,0x07,0x00 }} /* ; 08 (1280x) */
2607};
2608
2609static const XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_Vx75[]=
2610{
2611        /* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
2612     {{     0x28,0xD2,0xAF,0x83,0xAE,0xD8,0xA1     }},/* ; 00 (x350) */
2613     {{     0x28,0xD2,0xC8,0x8C,0xC7,0xF2,0x81     }},/* ; 01 (x400) */
2614     {{     0x28,0xD2,0xF0,0x84,0xEF,0x1A,0xB1     }},/* ; 02 (x480) */
2615     {{     0x28,0xDE,0x2C,0x8F,0x2B,0x56,0x91     }},/* ; 03 (x600) */
2616     {{     0x28,0xDE,0x80,0x83,0x7F,0xAA,0x91     }},/* ; 04 (x768) */
2617     {{     0x28,0x5A,0x13,0x87,0xFF,0x29,0xA9     }} /* ; 05 (x1024) */
2618};
2619
2620/* Jong 10/04/2007; merge code */
2621XGI_LVDSCRT1DataStruct  XGI_CHTVCRT1UNTSC[]=
2622{
2623 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
2624    0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,0x00 }},
2625 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
2626    0xd0,0x82,0x5d,0x57,0x00,0x00,0x01,0x00 }},
2627 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
2628    0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,0x00 }},
2629 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
2630    0xd0,0x82,0x5d,0x57,0x00,0x00,0x01,0x00 }},
2631 {{0x5d,0x4f,0x81,0x53,0x9c,0x56,0xba,
2632    0x18,0x84,0xdf,0x57,0x00,0x00,0x01,0x00 }},
2633 {{0x80,0x63,0x84,0x6c,0x17,0xec,0xf0,
2634   0x90,0x8c,0x57,0xed,0x20,0x00,0x06,0x01 }}
2635};
2636
2637/* Jong 10/04/2007; merge code */
2638XGI_LVDSCRT1DataStruct  XGI_CHTVCRT1ONTSC[]=
2639{
2640 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
2641    0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,0x00 }},
2642 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
2643    0xb0,0x8d,0x5d,0x0c,0x00,0x00,0x01,0x00 }},
2644 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
2645    0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,0x00 }},
2646 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
2647    0xb0,0x8d,0x5d,0x0c,0x00,0x00,0x01,0x00 }},
2648 {{0x5d,0x4f,0x81,0x56,0x9c,0x0b,0x3e,
2649    0xe8,0x84,0xdf,0x0c,0x00,0x00,0x01,0x00 }},
2650 {{0x7d,0x63,0x81,0x6a,0x16,0xba,0xf0,
2651   0x7f,0x86,0x57,0xbb,0x00,0x00,0x06,0x01 }}
2652};
2653
2654/* Jong 10/04/2007; merge code */
2655XGI_LVDSCRT1DataStruct  XGI_CHTVCRT1UPAL[]=
2656{
2657 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2658    0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,0x00 }},
2659 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2660    0xde,0x81,0x5d,0x70,0x00,0x00,0x05,0x00 }},
2661 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2662    0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,0x00 }},
2663 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2664    0xde,0x81,0x5d,0x70,0x00,0x00,0x05,0x00 }},
2665 {{0x64,0x4f,0x88,0x55,0x80,0xec,0xba,
2666    0x50,0x84,0xdf,0xed,0x00,0x00,0x05,0x00 }},
2667 {{0x70,0x63,0x94,0x68,0x8d,0x42,0xf1,
2668   0xc8,0x8c,0x57,0xe9,0x20,0x00,0x05,0x01 }}
2669};
2670
2671/* Jong 10/04/2007; merge code */
2672XGI_LVDSCRT1DataStruct  XGI_CHTVCRT1OPAL[]=
2673{
2674 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2675    0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,0x00 }},
2676 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2677    0xde,0x81,0x5d,0x70,0x00,0x00,0x05,0x00 }},
2678 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2679    0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,0x00 }},
2680 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2681    0xde,0x81,0x5d,0x70,0x00,0x00,0x05,0x00 }},
2682 {{0x64,0x4f,0x88,0x55,0x80,0x6f,0xba,
2683    0x20,0x83,0xdf,0x70,0x00,0x00,0x05,0x00 }},
2684 {{0x73,0x63,0x97,0x69,0x8e,0xec,0xf0,
2685   0x90,0x8c,0x57,0xed,0x20,0x00,0x05,0x01 }}
2686};
2687
2688/*add for new UNIVGABIOS*/
2689static const XGI330_LCDDataTablStruct XGI_LCDDataTable[]=
2690{
2691  {Panel1024x768,0x0019,0x0001,0},  /* XGI_ExtLCD1024x768Data */
2692  {Panel1024x768,0x0019,0x0000,1},  /* XGI_StLCD1024x768Data */
2693  {Panel1024x768,0x0018,0x0010,2},  /* XGI_CetLCD1024x768Data */
2694  {Panel1280x1024,0x0019,0x0001,3},  /* XGI_ExtLCD1280x1024Data */
2695  {Panel1280x1024,0x0019,0x0000,4},  /* XGI_StLCD1280x1024Data */
2696  {Panel1280x1024,0x0018,0x0010,5},  /* XGI_CetLCD1280x1024Data */
2697  {Panel1400x1050,0x0019,0x0001,6},  /* XGI_ExtLCD1400x1050Data */
2698  {Panel1400x1050,0x0019,0x0000,7},  /* XGI_StLCD1400x1050Data */
2699  {Panel1400x1050,0x0018,0x0010,8},  /* XGI_CetLCD1400x1050Data */
2700  {Panel1600x1200,0x0019,0x0001,9},   /* XGI_ExtLCD1600x1200Data */
2701  {Panel1600x1200,0x0019,0x0000,10},  /* XGI_StLCD1600x1200Data */
2702  {PanelRef60Hz,0x0008,0x0008,11},  	/* XGI_NoScalingData */
2703  {Panel1024x768x75,0x0019,0x0001,12}, 	/* XGI_ExtLCD1024x768x75Data */
2704  {Panel1024x768x75,0x0019,0x0000,13}, 	/* XGI_StLCD1024x768x75Data */
2705  {Panel1024x768x75,0x0018,0x0010,14}, 	/* XGI_CetLCD1024x768x75Data */
2706  {Panel1280x1024x75,0x0019,0x0001,15}, /* XGI_ExtLCD1280x1024x75Data */
2707  {Panel1280x1024x75,0x0019,0x0000,16}, /* XGI_StLCD1280x1024x75Data */
2708  {Panel1280x1024x75,0x0018,0x0010,17}, /* XGI_CetLCD1280x1024x75Data */
2709  {PanelRef75Hz,0x0008,0x0008,18},	/* XGI_NoScalingDatax75 */
2710  {Panel1600x1200_1,0x0008,0x0008,19},  /* XGI_NoScalingData_1 */
2711  {0xFF,0x0000,0x0000,0}   		/* End of table */
2712};
2713
2714static const XGI330_LCDDataTablStruct XGI_LCDDesDataTable[]=
2715{
2716  {Panel1024x768,0x0019,0x0001,0}, /* XGI_ExtLCDDes1024x768Data */
2717  {Panel1024x768,0x0019,0x0000,1}, /* XGI_StLCDDes1024x768Data */
2718  {Panel1024x768,0x0018,0x0010,2}, /* XGI_CetLCDDes1024x768Data */
2719  {Panel1280x1024,0x0019,0x0001,3}, /* XGI_ExtLCDDes1280x1024Data */
2720  {Panel1280x1024,0x0019,0x0000,4}, /* XGI_StLCDDes1280x1024Data */
2721  {Panel1280x1024,0x0018,0x0010,5}, /* XGI_CetLCDDes1280x1024Data */
2722  {Panel1400x1050,0x0019,0x0001,6}, /* XGI_ExtLCDDes1400x1050Data */
2723  {Panel1400x1050,0x0019,0x0000,7}, /* XGI_StLCDDes1400x1050Data */
2724  {Panel1400x1050,0x0418,0x0010,8}, /* XGI_CetLCDDes1400x1050Data */
2725  {Panel1400x1050,0x0418,0x0410,9}, /* XGI_CetLCDDes1400x1050Data2 */
2726  {Panel1600x1200,0x0019,0x0001,10}, /* XGI_ExtLCDDes1600x1200Data */
2727  {Panel1600x1200,0x0019,0x0000,11}, /* XGI_StLCDDes1600x1200Data */
2728  {PanelRef60Hz,0x0008,0x0008,12}, 	/* XGI_NoScalingDesData */
2729  {Panel1024x768x75,0x0019,0x0001,13}, 	/* XGI_ExtLCDDes1024x768x75Data */
2730  {Panel1024x768x75,0x0019,0x0000,14},	/* XGI_StLCDDes1024x768x75Data */
2731  {Panel1024x768x75,0x0018,0x0010,15},  /* XGI_CetLCDDes1024x768x75Data */
2732  {Panel1280x1024x75,0x0019,0x0001,16},	/* XGI_ExtLCDDes1280x1024x75Data */
2733  {Panel1280x1024x75,0x0019,0x0000,17}, /* XGI_StLCDDes1280x1024x75Data */
2734  {Panel1280x1024x75,0x0018,0x0010,18},	/* XGI_CetLCDDes1280x1024x75Data */
2735  {PanelRef75Hz,0x0008,0x0008,19},	/* XGI_NoScalingDesDatax75 */
2736  {Panel1600x1200_1,0x0008,0x0008,20}, 	/* XGI_NoScalingDesData_1 */
2737  {0xFF,0x0000,0x0000,0}
2738};
2739
2740static const XGI330_LCDDataTablStruct XGI_EPLLCDCRT1Ptr_H[]=
2741{
2742  {Panel1024x768,0x0018,0x0000,0}, /* XGI_LVDSCRT11024x768_1_H */
2743  {Panel1024x768,0x0018,0x0010,1}, /* XGI_LVDSCRT11024x768_2_H */
2744  {Panel1280x1024,0x0018,0x0000,2}, /* XGI_LVDSCRT11280x1024_1_H */
2745  {Panel1280x1024,0x0018,0x0010,3}, /* XGI_LVDSCRT11280x1024_2_H */
2746  {Panel1400x1050,0x0018,0x0000,4}, /* XGI_LVDSCRT11400x1050_1_H */
2747  {Panel1400x1050,0x0018,0x0010,5}, /* XGI_LVDSCRT11400x1050_2_H */
2748  {Panel1600x1200,0x0018,0x0000,6},  /* XGI_LVDSCRT11600x1200_1_H */
2749  {Panel1024x768x75,0x0018,0x0000,7},	/* XGI_LVDSCRT11024x768_1_Hx75 */
2750  {Panel1024x768x75,0x0018,0x0010,8},	/* XGI_LVDSCRT11024x768_2_Hx75 */
2751  {Panel1280x1024x75,0x0018,0x0000,9},	/* XGI_LVDSCRT11280x1024_1_Hx75 */
2752  {Panel1280x1024x75,0x0018,0x0010,10},	/* XGI_LVDSCRT11280x1024_2_Hx75 */
2753  {0xFF,0x0000,0x0000,0}
2754};
2755
2756static const XGI330_LCDDataTablStruct XGI_EPLLCDCRT1Ptr_V[]=
2757{
2758  {Panel1024x768,0x0018,0x0000,0}, /* XGI_LVDSCRT11024x768_1_V */
2759  {Panel1024x768,0x0018,0x0010,1}, /* XGI_LVDSCRT11024x768_2_V */
2760  {Panel1280x1024,0x0018,0x0000,2}, /* XGI_LVDSCRT11280x1024_1_V */
2761  {Panel1280x1024,0x0018,0x0010,3}, /* XGI_LVDSCRT11280x1024_2_V */
2762  {Panel1400x1050,0x0018,0x0000,4}, /* XGI_LVDSCRT11400x1050_1_V */
2763  {Panel1400x1050,0x0018,0x0010,5}, /* XGI_LVDSCRT11400x1050_2_V */
2764  {Panel1600x1200,0x0018,0x0000,6}, /* XGI_LVDSCRT11600x1200_1_V */
2765  {Panel1024x768x75,0x0018,0x0000,7},	/* XGI_LVDSCRT11024x768_1_Vx75 */
2766  {Panel1024x768x75,0x0018,0x0010,8},	/* XGI_LVDSCRT11024x768_2_Vx75 */
2767  {Panel1280x1024x75,0x0018,0x0000,9},	/* XGI_LVDSCRT11280x1024_1_Vx75 */
2768  {Panel1280x1024x75,0x0018,0x0010,10},	/* XGI_LVDSCRT11280x1024_2_Vx75 */
2769  {0xFF,0x0000,0x0000,0}
2770};
2771
2772static const XGI330_LCDDataTablStruct XGI_EPLLCDDataPtr[]=
2773{
2774  {Panel1024x768,0x0018,0x0000,0}, /* XGI_LVDS1024x768Data_1 */
2775  {Panel1024x768,0x0018,0x0010,1}, /* XGI_LVDS1024x768Data_2 */
2776  {Panel1280x1024,0x0018,0x0000,2}, /* XGI_LVDS1280x1024Data_1 */
2777  {Panel1280x1024,0x0018,0x0010,3}, /* XGI_LVDS1280x1024Data_2 */
2778  {Panel1400x1050,0x0018,0x0000,4}, /* XGI_LVDS1400x1050Data_1 */
2779  {Panel1400x1050,0x0018,0x0010,5}, /* XGI_LVDS1400x1050Data_2 */
2780  {Panel1600x1200,0x0018,0x0000,6}, /* XGI_LVDS1600x1200Data_1 */
2781  {PanelRef60Hz,0x0008,0x0008,7}, /* XGI_LVDSNoScalingData */
2782  {Panel1024x768x75,0x0018,0x0000,8},	/* XGI_LVDS1024x768Data_1x75 */
2783  {Panel1024x768x75,0x0018,0x0010,9},	/* XGI_LVDS1024x768Data_2x75 */
2784  {Panel1280x1024x75,0x0018,0x0000,10},	/* XGI_LVDS1280x1024Data_1x75 */
2785  {Panel1280x1024x75,0x0018,0x0010,11}, /* XGI_LVDS1280x1024Data_2x75 */
2786  {PanelRef75Hz,0x0008,0x0008,12},	/* XGI_LVDSNoScalingDatax75 */
2787  {0xFF,0x0000,0x0000,0}
2788};
2789
2790static const XGI330_LCDDataTablStruct XGI_EPLLCDDesDataPtr[]=
2791{
2792  {Panel1024x768,0x0018,0x0000,0}, /* XGI_LVDS1024x768Des_1 */
2793  {Panel1024x768,0x0618,0x0410,1}, /* XGI_LVDS1024x768Des_3 */
2794  {Panel1024x768,0x0018,0x0010,2}, /* XGI_LVDS1024x768Des_2 */
2795  {Panel1280x1024,0x0018,0x0000,3}, /* XGI_LVDS1280x1024Des_1 */
2796  {Panel1280x1024,0x0018,0x0010,4}, /* XGI_LVDS1280x1024Des_2 */
2797  {Panel1400x1050,0x0018,0x0000,5}, /* XGI_LVDS1400x1050Des_1 */
2798  {Panel1400x1050,0x0018,0x0010,6}, /* XGI_LVDS1400x1050Des_2 */
2799  {Panel1600x1200,0x0018,0x0000,7}, /* XGI_LVDS1600x1200Des_1 */
2800  {PanelRef60Hz,0x0008,0x0008,8}, 	/* XGI_LVDSNoScalingDesData */
2801  {Panel1024x768x75,0x0018,0x0000,9},	/* XGI_LVDS1024x768Des_1x75 */
2802  {Panel1024x768x75,0x0618,0x0410,10},	/* XGI_LVDS1024x768Des_3x75 */
2803  {Panel1024x768x75,0x0018,0x0010,11},	/* XGI_LVDS1024x768Des_2x75 */
2804  {Panel1280x1024x75,0x0018,0x0000,12},	/* XGI_LVDS1280x1024Des_1x75 */
2805  {Panel1280x1024x75,0x0018,0x0010,13},	/* XGI_LVDS1280x1024Des_2x75 */
2806  {PanelRef75Hz,0x0008,0x0008,14},	/* XGI_LVDSNoScalingDesDatax75 */
2807  {0xFF,0x0000,0x0000,0}
2808};
2809
2810static const XGI330_LCDDataTablStruct XGI_EPLCHLCDRegPtr[]=
2811{
2812  {Panel1024x768,0x0000,0x0000,0}, /* XGI_CH7017LV1024x768 */
2813  {Panel1400x1050,0x0000,0x0000,1}, /* XGI_CH7017LV1400x1050 */
2814  {0xFF,0x0000,0x0000,0}
2815};
2816
2817static const XGI330_TVDataTablStruct XGI_TVDataTable[]=
2818{
2819 {0x09E1,0x0001,0},	/* XGI_ExtPALData */
2820 {0x09E1,0x0000,1},	/* XGI_ExtNTSCData */
2821 {0x09E1,0x0801,2},	/* XGI_StPALData */
2822 {0x09E1,0x0800,3},	/* XGI_StNTSCData */
2823 {0x49E0,0x0100,4},	/* XGI_ExtHiTVData */
2824 {0x49E0,0x4100,5},	/* XGI_St2HiTVData */
2825 {0x49E0,0x4900,13},	/* XGI_St1HiTVData */
2826 {0x09E0,0x0020,6},	/* XGI_ExtYPbPr525iData */
2827 {0x09E0,0x0040,7},	/* XGI_ExtYPbPr525pData */
2828 {0x09E0,0x0080,8},	/* XGI_ExtYPbPr750pData */
2829 {0x09E0,0x0820,9},	/* XGI_StYPbPr525iData */
2830 {0x09E0,0x0840,10},	/* XGI_StYPbPr525pData */
2831 {0x09E0,0x0880,11}, 	/* XGI_StYPbPr750pData */
2832 {0xffff,0x0000,12}  	/* END */
2833};
2834
2835/* ;;Chrontel 7017 TV Timing List */
2836static const XGI330_TVDataTablStruct XGI_EPLCHTVDataPtr[]=
2837{
2838  {0x0011,0x0000,0}, /* XGI_CHTVUNTSCData */
2839  {0x0011,0x0010,1}, /* XGI_CHTVONTSCData */
2840  {0x0011,0x0001,2}, /* XGI_CHTVUPALData */
2841  {0x0011,0x0011,3}, /* XGI_CHTVOPALData */
2842  {0xFFFF,0x0000,4}
2843};
2844
2845/* ;;Chrontel 7017 TV Reg. List */
2846static const XGI330_TVDataTablStruct XGI_EPLCHTVRegPtr[]=
2847{
2848  {0x0011,0x0000,0}, /* XGI_CHTVRegUNTSC */
2849  {0x0011,0x0010,1}, /* XGI_CHTVRegONTSC */
2850  {0x0011,0x0001,2}, /* XGI_CHTVRegUPAL */
2851  {0x0011,0x0011,3}, /* XGI_CHTVRegOPAL */
2852  {0xFFFF,0x0000,4}
2853};
2854
2855static const USHORT LCDLenList[]=
2856{
2857   LVDSCRT1Len_H,
2858   LVDSCRT1Len_V,
2859   LVDSDataLen,
2860   LCDDesDataLen,
2861   LCDDataLen,
2862   LCDDesDataLen,
2863   0,
2864   LCDDesDataLen,
2865   LCDDesDataLen,
2866   0
2867};
2868
2869static const XGI330_LCDCapStruct  XGI_LCDDLCapList[]=  /* Dual link only */
2870{
2871/* LCDCap1024x768 */
2872		{Panel1024x768, DefaultLCDCap, 0, 0x012, 0x88, 0x06, VCLK65,
2873		0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
2874		0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
2875/* LCDCap1280x1024 */
2876		{Panel1280x1024, LCDDualLink+DefaultLCDCap, StLCDBToA, 0x012, 0x70, 0x03, VCLK108_2,
2877		0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
2878		0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2879/* LCDCap1400x1050 */
2880		{Panel1400x1050, LCDDualLink+DefaultLCDCap, StLCDBToA, 0x012, 0x70, 0x03, VCLK108_2,
2881		 0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
2882		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2883/* LCDCap1600x1200 */
2884		{Panel1600x1200, LCDDualLink+DefaultLCDCap, LCDToFull, 0x012, 0xC0, 0x03, VCLK162,
2885		 0x43, 0x22, 0x70, 0x24, 0x02, 0x14, 0x0A, 0x02, 0x00,
2886		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2887/* LCDCap1024x768x75 */
2888		{Panel1024x768x75, DefaultLCDCap, 0, 0x012, 0x60, 0, VCLK78_75,
2889		 0x2B, 0x61, 0x2B, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2890		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
2891/* LCDCap1280x1024x75 */
2892		{Panel1280x1024x75, LCDDualLink+DefaultLCDCap, StLCDBToA, 0x012, 0x90, 0x03, VCLK135_5,
2893		 0x54, 0x42, 0x4A, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2894		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2895/* LCDCapDefault */
2896		{0xFF, DefaultLCDCap, 0, 0x012, 0x88, 0x06, VCLK65,
2897		0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
2898		0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10}
2899};
2900
2901static const XGI330_LCDCapStruct  XGI_LCDCapList[]=
2902{
2903/* LCDCap1024x768 */
2904		{Panel1024x768, DefaultLCDCap, 0, 0x012, 0x88, 0x06, VCLK65,
2905		0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
2906		0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
2907/* LCDCap1280x1024 */
2908		{Panel1280x1024, DefaultLCDCap, StLCDBToA, 0x012, 0x70, 0x03, VCLK108_2,
2909		0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
2910		0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2911/* LCDCap1400x1050 */
2912		{Panel1400x1050, DefaultLCDCap, StLCDBToA, 0x012, 0x70, 0x03, VCLK108_2,
2913		 0x70, 0x44, 0xF8, 0x2F, 0x02, 0x14, 0x0A, 0x02, 0x00,
2914		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2915/* LCDCap1600x1200 */
2916		{Panel1600x1200, DefaultLCDCap, LCDToFull, 0x010, 0xC0, 0x03, VCLK162,
2917		 0x5A, 0x23, 0x5A, 0x23, 0x02, 0x14, 0x0A, 0x02, 0x00,
2918		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2919/* LCDCap1024x768x75 */
2920		{Panel1024x768x75, DefaultLCDCap, 0, 0x012, 0x60, 0, VCLK78_75,
2921		 0x2B, 0x61, 0x2B, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2922		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10},
2923/* LCDCap1280x1024x75 */
2924		{Panel1280x1024x75, DefaultLCDCap, StLCDBToA, 0x012, 0x90, 0x03, VCLK135_5,
2925		 0x54, 0x42, 0x4A, 0x61, 0x02, 0x14, 0x0A, 0x02, 0x00,
2926		 0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x30, 0x10},
2927/* LCDCapDefault */
2928		{0xFF, DefaultLCDCap, 0, 0x012, 0x88, 0x06, VCLK65,
2929		0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
2930		0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10}
2931};
2932
2933/* Jong 10/04/2007; merge code */
2934XGI21_LVDSCapStruct XGI21_LCDCapList[]=
2935{
2936    {DisableLCD24bpp + LCDPolarity,
2937     2160,1250,1600,1200,  64,  1,  192,   3,
2938     0x70,0x24,0x20,0x04,0x0A,0x02,0xC8
2939    },
2940    {DisableLCD24bpp + LCDPolarity,
2941     1688,1066,1280,1024,  48,  1,  112,   3,
2942     0x70,0x44,0x20,0x04,0x0A,0x02,0xC8
2943    },
2944    {DisableLCD24bpp + LCDPolarity + (LCDPolarity << 8),
2945     1344, 806,1024, 768,  24,  3,  136,   6,
2946     0x6C,0x65,0x20,0x04,0x0A,0x02,0xC8
2947    },
2948    {DisableLCD24bpp + LCDPolarity,
2949     1056, 628, 800, 600,  40,   1, 128,   4,
2950     0x42,0xE2,0x20,0x14,0x0A,0x02,0x00
2951    },
2952    {DisableLCD24bpp + LCDPolarity,
2953      928, 525, 800, 480,  40,  13,  48,   3,
2954     0x52,0xC5,0x20,0x14,0x0A,0x02,0x00
2955    },
2956    {DisableLCD24bpp + LCDPolarity + (LCDPolarity << 8),
2957      800, 525, 640, 480,  16,  10,  96,   2,
2958     0x1B,0xE1,0x20,0x04,0x0A,0x02,0xC8
2959    }
2960
2961};
2962
2963XGI_Ext2Struct XGI330_RefIndex[]=
2964{
2965{Support32Bpp + SupportAllCRT2 + SyncPN,			RES320x200,	 VCLK25_175, 0x00,0x10,0x59, 320, 200},/* 00 */
2966{Support32Bpp + SupportAllCRT2 + SyncPN,			RES320x200,	 VCLK25_175, 0x00,0x10,0x00, 320, 400},/* 01 */
2967{Support32Bpp + SupportAllCRT2 + SyncNN,			RES320x240,	 VCLK25_175, 0x04,0x20,0x50, 320, 240},/* 02 */
2968{Support32Bpp + SupportAllCRT2 + SyncPP,			RES400x300,	 VCLK40,     0x05,0x32,0x51, 400, 300},/* 03 */
2969{Support32Bpp + NoSupportTV + SyncNN + SupportTV1024,		RES512x384,	 VCLK65,     0x06,0x43,0x52, 512, 384},/* 04 */
2970{Support32Bpp + SupportAllCRT2 + SyncPN,			RES640x400,	 VCLK25_175, 0x00,0x14,0x2f, 640, 400},/* 05 */
2971{Support32Bpp + SupportAllCRT2 + SyncNN,			RES640x480x60,	 VCLK25_175, 0x04,0x24,0x2e, 640, 480},/* 06 640x480x60Hz (LCD 640x480x60z) */
2972{Support32Bpp + NoSupportHiVisionTV + SyncNN,			RES640x480x72,	 VCLK31_5,   0x04,0x24,0x2e, 640, 480},/* 07 640x480x72Hz (LCD 640x480x70Hz) */
2973{Support32Bpp + NoSupportHiVisionTV + SyncNN,			RES640x480x75,	 VCLK31_5,   0x47,0x24,0x2e, 640, 480},/* 08 640x480x75Hz (LCD 640x480x75Hz) */
2974{Support32Bpp + SupportRAMDAC2 + SyncNN,			RES640x480x85,	 VCLK36,     0x8A,0x24,0x2e, 640, 480},/* 09 640x480x85Hz */
2975{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES640x480x100,	 VCLK43_163, 0x00,0x24,0x2e, 640, 480},/* 0a 640x480x100Hz */
2976{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES640x480x120,	 VCLK52_406, 0x00,0x24,0x2e, 640, 480},/* 0b 640x480x120Hz */
2977{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES640x480x160,	 VCLK72_852, 0x00,0x24,0x2e, 640, 480},/* 0c 640x480x160Hz */
2978{Support32Bpp + SupportRAMDAC2 + SyncNN,			RES640x480x200,	 VCLK86_6,   0x00,0x24,0x2e, 640, 480},/* 0d 640x480x200Hz */
2979{Support32Bpp + NoSupportLCD + SyncPP,				RES800x600x56,	 VCLK36,     0x05,0x36,0x6a, 800, 600},/* 0e 800x600x56Hz */
2980{Support32Bpp + NoSupportTV + SyncPP,				RES800x600x60,	 VCLK40,     0x05,0x36,0x6a, 800, 600},/* 0f 800x600x60Hz (LCD 800x600x60Hz) */
2981{Support32Bpp + NoSupportHiVisionTV + SyncPP,			RES800x600x72,	 VCLK50,     0x48,0x36,0x6a, 800, 600},/* 10 800x600x72Hz (LCD 800x600x70Hz) */
2982{Support32Bpp + NoSupportHiVisionTV + SyncPP,			RES800x600x75,	 VCLK49_5,   0x8B,0x36,0x6a, 800, 600},/* 11 800x600x75Hz (LCD 800x600x75Hz) */
2983{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES800x600x85,	 VCLK56_25,  0x00,0x36,0x6a, 800, 600},/* 12 800x600x85Hz */
2984{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES800x600x100,	 VCLK68_179, 0x00,0x36,0x6a, 800, 600},/* 13 800x600x100Hz */
2985{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES800x600x120,	 VCLK83_95,  0x00,0x36,0x6a, 800, 600},/* 14 800x600x120Hz */
2986{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES800x600x160,	 VCLK116_406,0x00,0x36,0x6a, 800, 600},/* 15 800x600x160Hz */
2987{Support32Bpp + InterlaceMode + SyncPP,				RES1024x768x43,	 VCLK44_9,   0x00,0x47,0x37,1024, 768},/* 16 1024x768x43Hz */
2988{Support32Bpp + NoSupportTV + SyncNN + SupportTV1024,		RES1024x768x60,	 VCLK65,     0x06,0x47,0x37,1024, 768},/* 17 1024x768x60Hz (LCD 1024x768x60Hz) */
2989{Support32Bpp + NoSupportHiVisionTV + SyncNN,			RES1024x768x70,	 VCLK75,     0x49,0x47,0x37,1024, 768},/* 18 1024x768x70Hz (LCD 1024x768x70Hz) */
2990{Support32Bpp + NoSupportHiVisionTV + SyncPP,			RES1024x768x75,	 VCLK78_75,  0x00,0x47,0x37,1024, 768},/* 19 1024x768x75Hz (LCD 1024x768x75Hz) */
2991{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES1024x768x85,	 VCLK94_5,   0x8C,0x47,0x37,1024, 768},/* 1a 1024x768x85Hz */
2992{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES1024x768x100, VCLK113_309,0x00,0x47,0x37,1024, 768},/* 1b 1024x768x100Hz */
2993{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES1024x768x120, VCLK139_054,0x00,0x47,0x37,1024, 768},/* 1c 1024x768x120Hz */
2994{Support32Bpp + SupportLCD + SyncPP,				RES1280x960x60,	 VCLK108_2,  0x3A,0x58,0x7b,1280, 960},/* 1d 1280x960x60Hz */
2995{Support32Bpp + InterlaceMode + SyncPP,				RES1280x1024x43, VCLK78_75,  0x00,0x58,0x3a,1280,1024},/* 1e 1280x1024x43Hz */
2996{Support32Bpp + NoSupportTV + SyncPP,				RES1280x1024x60, VCLK108_2,  0x07,0x58,0x3a,1280,1024},/* 1f 1280x1024x60Hz (LCD 1280x1024x60Hz) */
2997{Support32Bpp + NoSupportTV + SyncPP,				RES1280x1024x75, VCLK135_5,  0x00,0x58,0x3a,1280,1024},/* 20 1280x1024x75Hz (LCD 1280x1024x75Hz) */
2998{Support32Bpp + SyncPP,						RES1280x1024x85, VCLK157_5,  0x00,0x58,0x3a,1280,1024},/* 21 1280x1024x85Hz */
2999{Support32Bpp + SupportLCD + SyncPP + SupportCRT2in301C,	RES1600x1200x60, VCLK162,    0x09,0x7A,0x3c,1600,1200},/* 22 1600x1200x60Hz */
3000{Support32Bpp + SyncPP + SupportCRT2in301C,			RES1600x1200x65, VCLK175,    0x00,0x69,0x3c,1600,1200},/* 23 1600x1200x65Hz */
3001{Support32Bpp + SyncPP + SupportCRT2in301C,			RES1600x1200x70, VCLK189,    0x00,0x69,0x3c,1600,1200},/* 24 1600x1200x70Hz */
3002{Support32Bpp + SyncPP + SupportCRT2in301C,			RES1600x1200x75, VCLK202_5,  0x00,0x69,0x3c,1600,1200},/* 25 1600x1200x75Hz */
3003{Support32Bpp + SyncPP,						RES1600x1200x85, VCLK229_5,  0x00,0x69,0x3c,1600,1200},/* 26 1600x1200x85Hz */
3004{Support32Bpp + SyncPP,						RES1600x1200x100,VCLK269_655,0x00,0x69,0x3c,1600,1200},/* 27 1600x1200x100Hz */
3005{Support32Bpp + SyncPP,						RES1600x1200x120,VCLK323_586,0x00,0x69,0x3c,1600,1200},/* 28 1600x1200x120Hz */
3006{Support32Bpp + SupportLCD + SyncNP,				RES1920x1440x60, VCLK234,    0x00,0x00,0x68,1920,1440},/* 29 1920x1440x60Hz */
3007{Support32Bpp + SyncPN,						RES1920x1440x65, VCLK254_817,0x00,0x00,0x68,1920,1440},/* 2a 1920x1440x65Hz */
3008{Support32Bpp + SyncPN,						RES1920x1440x70, VCLK277_015,0x00,0x00,0x68,1920,1440},/* 2b 1920x1440x70Hz */
3009{Support32Bpp + SyncPN,						RES1920x1440x75, VCLK291_132,0x00,0x00,0x68,1920,1440},/* 2c 1920x1440x75Hz */
3010{Support32Bpp + SyncPN,						RES1920x1440x85, VCLK330_615,0x00,0x00,0x68,1920,1440},/* 2d 1920x1440x85Hz */
3011{Support16Bpp + SyncPN,						RES1920x1440x100,VCLK388_631,0x00,0x00,0x68,1920,1440},/* 2e 1920x1440x100Hz */
3012{Support32Bpp + SupportLCD + SyncPN,				RES2048x1536x60, VCLK266_952,0x00,0x00,0x6c,2048,1536},/* 2f 2048x1536x60Hz */
3013{Support32Bpp + SyncPN,						RES2048x1536x65, VCLK291_766,0x00,0x00,0x6c,2048,1536},/* 30 2048x1536x65Hz */
3014{Support32Bpp + SyncPN,						RES2048x1536x70, VCLK315_195,0x00,0x00,0x6c,2048,1536},/* 31 2048x1536x70Hz */
3015{Support32Bpp + SyncPN,						RES2048x1536x75, VCLK340_477,0x00,0x00,0x6c,2048,1536},/* 32 2048x1536x75Hz */
3016{Support16Bpp + SyncPN,						RES2048x1536x85, VCLK375_847,0x00,0x00,0x6c,2048,1536},/* 33 2048x1536x85Hz */
3017{Support32Bpp + SupportHiVisionTV + SupportRAMDAC2 + SyncPP + SupportYPbPr,	RES800x480x60,	 VCLK39_77,  0x08,0x00,0x70, 800, 480},/* 34 800x480x60Hz */
3018{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES800x480x75,	 VCLK49_5,   0x08,0x00,0x70, 800, 480},/* 35 800x480x75Hz */
3019{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES800x480x85,	 VCLK56_25,  0x08,0x00,0x70, 800, 480},/* 36 800x480x85Hz */
3020{Support32Bpp + SupportHiVisionTV + SupportRAMDAC2 + SyncPP + SupportYPbPr,	RES1024x576x60,	 VCLK65,     0x09,0x00,0x71,1024, 576},/* 37 1024x576x60Hz */
3021{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES1024x576x75,	 VCLK78_75,  0x09,0x00,0x71,1024, 576},/* 38 1024x576x75Hz */
3022{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES1024x576x85,	 VCLK94_5,   0x09,0x00,0x71,1024, 576},/* 39 1024x576x85Hz */
3023{Support32Bpp + SupportHiVisionTV + SupportRAMDAC2 + SyncPP + SupportYPbPr,	RES1280x720x60,	 VCLK108_2,  0x0A,0x00,0x75,1280, 720},/* 3a 1280x720x60Hz */
3024{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES1280x720x75,	 VCLK135_5,  0x0A,0x00,0x75,1280, 720},/* 3b 1280x720x75Hz */
3025{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES1280x720x85,	 VCLK157_5,  0x0A,0x00,0x75,1280, 720},/* 3c 1280x720x85Hz */
3026{Support32Bpp + SupportTV + SyncNN,				RES720x480x60,	 VCLK28_322, 0x06,0x00,0x31, 720, 480},/* 3d 720x480x60Hz */
3027{Support32Bpp + SupportTV + SyncPP,				RES720x576x56,	 VCLK36,     0x06,0x00,0x32, 720, 576},/* 3e 720x576x56Hz */
3028{Support32Bpp + InterlaceMode + NoSupportLCD + SyncPP,		RES856x480x79I,	 VCLK35_2,   0x00,0x00,0x00, 856, 480},/* 3f 856x480x79I */
3029{Support32Bpp + NoSupportLCD + SyncNN,				RES856x480x60,	 VCLK35_2,   0x00,0x00,0x00, 856, 480},/* 40 856x480x60Hz */
3030{Support32Bpp + NoSupportHiVisionTV + SyncPP,			RES1280x768x60,	 VCLK79_411, 0x08,0x48,0x23,1280, 768},/* 41 1280x768x60Hz */
3031{Support32Bpp + NoSupportHiVisionTV + SyncPP,			RES1400x1050x60, VCLK122_61, 0x08,0x69,0x26,1400,1050},/* 42 1400x1050x60Hz */
3032{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES1152x864x60,	 VCLK80_350, 0x37,0x00,0x20,1152, 864},/* 43 1152x864x60Hz */
3033{Support32Bpp + SupportRAMDAC2 + SyncPP,			RES1152x864x75,	 VCLK107_385,0x37,0x00,0x20,1152, 864},/* 44 1152x864x75Hz */
3034{Support32Bpp + SupportLCD + SupportRAMDAC2 + SyncPP,		RES1280x960x75,	 VCLK125_999,0x3A,0x88,0x7b,1280, 960},/* 45 1280x960x75Hz */
3035{Support32Bpp + SupportLCD + SupportRAMDAC2 + SyncPP,		RES1280x960x85,	 VCLK148_5,  0x0A,0x88,0x7b,1280, 960},/* 46 1280x960x85Hz */
3036{Support32Bpp + SupportLCD + SupportRAMDAC2 + SyncPP,		RES1280x960x120, VCLK217_325,0x3A,0x88,0x7b,1280, 960},/* 47 1280x960x120Hz */
3037{Support32Bpp + SupportRAMDAC2 + SyncPN,			RES1024x768x160, VCLK139_054,0x30,0x47,0x37,1024, 768},/* 48 1024x768x160Hz */
3038};
3039
3040static const XGI_MCLKDataStruct XGI330New_MCLKData[MCLK_SIZE]=
3041{
3042 { 0x5c,0x23,0x01,166},
3043 { 0x5c,0x23,0x01,166},
3044 { 0x7C,0x08,0x80,200},
3045 { 0x79,0x06,0x80,250},
3046 { 0x29,0x01,0x81,300},
3047 { 0x29,0x01,0x81,300},
3048 { 0x29,0x01,0x81,300},
3049 { 0x29,0x01,0x81,300}
3050};
3051
3052static const XGI_MCLKDataStruct XGI340New_MCLKData[MCLK_SIZE]=
3053{
3054 { 0x79,0x06,0x01,250},
3055 { 0x7c,0x08,0x01,200},
3056 { 0x7C,0x08,0x80,200},
3057 { 0x79,0x06,0x80,250},
3058 { 0x29,0x01,0x81,300},
3059 { 0x29,0x01,0x81,300},
3060 { 0x29,0x01,0x81,300},
3061 { 0x29,0x01,0x81,300}
3062};
3063
3064/* Jong 10/04/2007; merge code */
3065static const XGI_MCLKDataStruct XGI27New_MCLKData[]=
3066{
3067 { 0x5c,0x23,0x01,166},
3068 { 0x19,0x02,0x01,124},
3069 { 0x7C,0x08,0x80,200},
3070 { 0x79,0x06,0x80,250},
3071 { 0x29,0x01,0x81,300},
3072 { 0x5c,0x23,0x01,166},
3073 { 0x5c,0x23,0x01,166},
3074 { 0x5c,0x23,0x01,166}
3075};
3076
3077static const UCHAR XGI330_ScreenOffset[]={ 0x14,0x19,0x20,0x28,0x32,0x40,0x50,0x64,0x78,0x80,0x2d,0x35,0x57,0x48 };
3078
3079static const XGI_StResInfoStruct XGI330_StResInfo[]=
3080{
3081 { 640,400},
3082 { 640,350},
3083 { 720,400},
3084 { 720,350},
3085 { 640,480}
3086};
3087
3088static const XGI_ModeResInfoStruct XGI330_ModeResInfo[]=
3089{
3090 {  320, 200, 8, 8},
3091 {  320, 240, 8, 8},
3092 {  320, 400, 8, 8},
3093 {  400, 300, 8, 8},
3094 {  512, 384, 8, 8},
3095 {  640, 400, 8,16},
3096 {  640, 480, 8,16},
3097 {  800, 600, 8,16},
3098 { 1024, 768, 8,16},
3099 { 1280,1024, 8,16},
3100 { 1600,1200, 8,16},
3101 { 1920,1440, 8,16},
3102 { 2048,1536, 8,16},
3103 {  720, 480, 8,16},
3104 {  720, 576, 8,16},
3105 { 1280, 960, 8,16},
3106 {  800, 480, 8,16},
3107 { 1024, 576, 8,16},
3108 { 1280, 720, 8,16},
3109 {  856, 480, 8,16},
3110 { 1280, 768, 8,16},
3111 { 1400,1050, 8,16},
3112 { 1152, 864, 8,16}
3113};
3114
3115static UCHAR XGI330_OutputSelect = 0x40;
3116static UCHAR XGI330_SoftSetting = 0x30;
3117static UCHAR XGI330_SR07 = 0x18;
3118static UCHAR XG21_DVOSetting = 0x00 ;
3119static UCHAR XG21_CR2E = 0x00 ;
3120static UCHAR XG21_CR2F = 0x00 ;
3121static UCHAR XG21_CR46 = 0x00 ;
3122static UCHAR XG21_CR47 = 0x00 ;
3123
3124UCHAR XG27_CR97 = 0xC1 ;
3125UCHAR XG27_SR36 = 0x30 ;
3126UCHAR XG27_CR8F = 0x09 ;
3127UCHAR XG27_CRD0[] = {0,0,0,0,0,0,0,0x82,0x00,0x66,0x01,0x00} ;
3128UCHAR XG27_CRDE[] = {0,0} ;
3129UCHAR XG27_SR40 = 0x04 ;
3130UCHAR XG27_SR41 = 0x00 ;
3131
3132
3133static const UCHAR XGI330_CR49[2] = { 0xaa, 0x88 };
3134static const UCHAR XGI330_SR1F = 0x00;
3135static const UCHAR XGI330_SR21 = 0xa5;
3136static const UCHAR XGI330_SR22 = 0xfb;
3137static const UCHAR XGI330_SR23 = 0xf6;
3138static const UCHAR XGI330_SR24 = 0x0d;
3139
3140static const UCHAR XGI330_SR33 = 0x00;
3141static const UCHAR XGI330_CRT2Data_1_2 = 0x0;
3142static const UCHAR XGI330_CRT2Data_4_D = 0x0;
3143static const UCHAR XGI330_CRT2Data_4_E = 0x0;
3144static const UCHAR XGI330_CRT2Data_4_10 = 0x80;
3145static const USHORT XGI330_RGBSenseData = 0xd1;
3146static const USHORT XGI330_VideoSenseData = 0xb9;
3147static const USHORT XGI330_YCSenseData = 0xb3;
3148static const USHORT XGI330_RGBSenseData2 = 0x0190;     /*301b*/
3149static const USHORT XGI330_VideoSenseData2 = 0x0110;
3150static const USHORT XGI330_YCSenseData2 = 0x016B;
3151static const UCHAR XG40_I2CDefinition = 0x00;
3152static const UCHAR XG20_CR97 = 0x10;
3153
3154static const UCHAR XGI330_CHTVVCLKUNTSC[]={0x00 };
3155
3156static const UCHAR XGI330_CHTVVCLKONTSC[]={0x00 };
3157
3158static const UCHAR XGI330_CHTVVCLKUPAL[]={0x00 };
3159
3160static const UCHAR XGI330_CHTVVCLKOPAL[]={0x00 };
3161
3162static const XGI330_VCLKDataStruct XGI_VCLKData[]=
3163{
3164               	/* SR2B,SR2C,SR2D */
3165 		{      0x1B,0xE1,25               },/* 00 (25.175MHz) */
3166
3167		{      0x4E,0xE4,28               },/* 01 (28.322MHz) */
3168
3169                {      0x57,0xE4,31               },/* 02 (31.500MHz) */
3170
3171                {      0xC3,0xC8,36               },/* 03 (36.000MHz) */
3172
3173                {      0x42,0xE2,40               },/* 04 (40.000MHz) */
3174
3175                {      0xFE,0xCD,43               },/* 05 (43.163MHz) */
3176
3177                {      0x5D,0xC4,44               },/* 06 (44.900MHz) */
3178
3179                {      0x52,0xE2,49               },/* 07 (49.500MHz) */
3180
3181                {      0x53,0xE2,50               },/* 08 (50.000MHz) */
3182
3183                {      0x74,0x67,52               },/* 09 (52.406MHz) */
3184
3185                {      0x6D,0x66,56               },/* 0A (56.250MHz) */
3186
3187                {      0x6C,0xC3,65               },/* 0B (65.000MHz) */
3188
3189                {      0x46,0x44,67               },/* 0C (67.765MHz) */
3190
3191                {      0xB1,0x46,68               },/* 0D (68.179MHz) */
3192
3193                {      0xD3,0x4A,72               },/* 0E (72.852MHz) */
3194
3195                {      0x29,0x61,75              },/* 0F (75.000MHz) */
3196
3197                {      0x6E,0x46,76               },/* 10 (75.800MHz) */
3198
3199                {      0x2B,0x61,78               },/* 11 (78.750MHz) */
3200
3201                {      0x31,0x42,79               },/* 12 (79.411MHz) */
3202
3203                {      0xAB,0x44,83               },/* 13 (83.950MHz) */
3204
3205                {      0x46,0x25,84               },/* 14 (84.800MHz) */
3206
3207                {      0x78,0x29,86               },/* 15 (86.600MHz) */
3208
3209                {      0x62,0x44,94               },/* 16 (94.500MHz) */
3210
3211                {      0x2B,0x41,104               },/* 17 (104.998MHz) */
3212
3213                {      0x3A,0x23,105               },/* 18 (105.882MHz) */
3214
3215                {      0x70,0x44,108               },/* 19 (107.862MHz) */
3216
3217                {      0x3C,0x23,109               },/* 1A (109.175MHz) */
3218
3219                {      0x5E,0x43,113              },/* 1B (113.309MHz) */
3220
3221                {      0xBC,0x44,116              },/* 1C (116.406MHz) */
3222
3223                {      0xE0,0x46,132              },/* 1D (132.258MHz) */
3224
3225                {      0x54,0x42,135               },/* 1E (135.500MHz) */
3226
3227                {      0x9C,0x22,139               },/* 1F (139.275MHz) */
3228
3229                {      0x41,0x22,157               },/* 20 (157.500MHz) */
3230
3231                {      0x70,0x24,162               },/* 21 (161.793MHz) */
3232
3233                {      0x30,0x21,175               },/* 22 (175.000MHz) */
3234
3235                {      0x4E,0x22,189              },/* 23 (188.520MHz) */
3236
3237                {      0xDE,0x26,194              },/* 24 (194.400MHz) */
3238
3239                {      0x62,0x06,202               },/* 25 (202.500MHz) */
3240
3241                {      0x3F,0x03,229               },/* 26 (229.500MHz) */
3242
3243                {      0xB8,0x06,234               },/* 27 (233.178MHz) */
3244
3245                {      0x34,0x02,253               },/* 28 (252.699MHz) */
3246
3247                {      0x58,0x04,255               },/* 29 (254.817MHz) */
3248
3249                {      0x24,0x01,265              },/* 2A (265.728MHz) */
3250
3251                {      0x9B,0x02,267               },/* 2B (266.952MHz) */
3252
3253                {      0x70,0x05,270               },/* 2C (269.65567MHz) */
3254
3255                {      0x25,0x01,272               },/* 2D (272.04199MHz) */
3256
3257                {      0x9C,0x02,277               },/* 2E (277.015MHz) */
3258
3259                {      0x27,0x01,286               },/* 2F (286.359985MHz) */
3260
3261                {      0xB3,0x04,291               },/* 30 (291.13266MHz) */
3262
3263                {      0xBC,0x05,292               },/* 31 (291.766MHz) */
3264
3265                {      0xF6,0x0A,310               },/* 32 (309.789459MHz) */
3266
3267                {      0x95,0x01,315               },/* 33 (315.195MHz) */
3268
3269                {      0xF0,0x09,324               },/* 34 (323.586792MHz) */
3270
3271                {      0xFE,0x0A,331               },/* 35 (330.615631MHz) */
3272
3273                {      0xF3,0x09,332              },/* 36 (332.177612MHz) */
3274
3275                {      0x5E,0x03,340              },/* 37 (340.477MHz) */
3276
3277                {      0xE8,0x07,376              },/* 38 (375.847504MHz) */
3278
3279                {      0xDE, 0x06,389             },/* 39 (388.631439MHz) */
3280
3281                {      0x52,0x2A,54               },/* 3A (54.000MHz) */
3282
3283                {      0x52,0x6A,27              },/* 3B (27.000MHz) */
3284
3285                {      0x62,0x24,70               },/* 3C (70.874991MHz) */
3286
3287                {      0x62,0x64,70               },/* 3D (70.1048912MHz) */
3288
3289                {      0xA8,0x4C,30               },/* 3E (30.1048912MHz) */
3290
3291                {      0x20,0x26,33               },/* 3F (33.7499957MHz) */
3292
3293                {      0x31,0xc2,39               },/* 40 (39.77MHz) */
3294
3295                {      0x11,0x21,30               },/* 41 (30MHz) }// NTSC 1024X768 */
3296
3297                {      0x2E,0x48,25               },/* 42 (25.175MHz) }// ScaleLCD */
3298
3299                {      0x24,0x46,25               },/* 43 (25.175MHz) */
3300
3301                {      0x26,0x64,28               },/* 44 (28.322MHz) */
3302
3303                {      0x37,0x64,40               },/* 45 (40.000MHz) */
3304
3305                {      0xA1,0x42,108               },/* 46 (95.000MHz) }// QVGA */
3306
3307                {      0x37,0x61,100               },/* 47 (100.00MHz) */
3308
3309                {      0x78,0x27,108               },/* 48 (108.200MHz) */
3310
3311                {      0xBF,0xC8,35               },/* 49 (35.2MHz) */
3312
3313                {      0x66,0x43,123               },/* 4A (122.61Mhz) */
3314
3315                {      0x2C,0x61,80               },/* 4B (80.350Mhz) */
3316
3317                {      0x3B,0x61,108               },/* 4C (107.385Mhz) */
3318
3319
3320/*                {      0x60,0x36,30               },// 4D (30.200MHz)   }// No use
3321
3322                {      0x60,0x36,30               },// 4E (30.200MHz)   }// No use
3323
3324                {      0x60,0x36,30               },// 4F (30.200MHz)   }// No use
3325
3326                {      0x60,0x36,30               },// 50 (30.200MHz)   }// CHTV
3327
3328                {      0x40,0x4A,28               },// 51 (28.190MHz)
3329
3330                {      0x9F,0x46,44               },// 52 (43.600MHz)
3331
3332                {      0x97,0x2C,26               },// 53 (26.400MHz)
3333
3334                {      0x44,0xE4,25               },// 54 (24.600MHz)
3335
3336                {      0x7E,0x32,47               },// 55 (47.832MHz)
3337
3338                {      0x8A,0x24,31               },// 56 (31.500MHz)
3339
3340                {      0x97,0x2C,26               },// 57 (26.200MHz)
3341
3342                {      0xCE,0x3C,39               },// 58 (39.000MHz)
3343
3344                {      0x52,0x4A,36               },// 59 (36.000MHz)
3345
3346*/
3347		{      0x69,0x61,191		  }, /* 4D (190.96MHz ) */
3348		{      0x4F,0x22,192		  }, /* 4E (192.069MHz) */
3349		{      0x28,0x26,322		  }, /* 4F (322.273MHz) */
3350		{      0x5C,0x6B,27		  }, /* 50 (27.74HMz) */
3351		{      0x57,0x24,126		  }, /* 51 (125.999MHz) */
3352		{      0x5C,0x42,148		  }, /* 52 (148.5MHz) */
3353		{      0x42,0x61,120		  }, /* 53 (120.839MHz) */
3354		{      0x62,0x61,178		  }, /* 54 (178.992MHz) */
3355		{      0x59,0x22,217		  }, /* 55 (217.325MHz) */
3356		{      0x29,0x01,300		  }, /* 56 (299.505Mhz) */
3357		{      0x52,0x63,74		  }, /* 57 (74.25MHz) */
3358
3359
3360                {      0xFF,0x00,0                }/* End mark */
3361};
3362
3363static const XGI330_VCLKDataStruct XGI_VBVCLKData[]=
3364{
3365                {      0x1B,0xE1,25               },/* 00 (25.175MHz) */
3366
3367                {      0x4E,0xE4,28               },/* 01 (28.322MHz) */
3368
3369                {      0x57,0xE4,31               },/* 02 (31.500MHz) */
3370
3371                {      0xC3,0xC8,36               },/* 03 (36.000MHz) */
3372
3373                {      0x42,0x47,40               },/* 04 (40.000MHz) */
3374
3375                {      0xFE,0xCD,43               },/* 05 (43.163MHz) */
3376
3377                {      0x5D,0xC4,44               },/* 06 (44.900MHz) */
3378
3379                {      0x52,0x47,49               },/* 07 (49.500MHz) */
3380
3381                {      0x53,0x47,50               },/* 08 (50.000MHz) */
3382
3383                {      0x74,0x67,52               },/* 09 (52.406MHz) */
3384
3385                {      0x6D,0x66,56               },/* 0A (56.250MHz) */
3386
3387                {      0x35,0x62,65               },/* 0B (65.000MHz) */
3388
3389                {      0x46,0x44,67               },/* 0C (67.765MHz) */
3390
3391                {      0xB1,0x46,68               },/* 0D (68.179MHz) */
3392
3393                {      0xD3,0x4A,72               },/* 0E (72.852MHz) */
3394
3395                {      0x29,0x61,75               },/* 0F (75.000MHz) */
3396
3397                {      0x6D,0x46,75               },/* 10 (75.800MHz) */
3398
3399                {      0x41,0x43,78               },/* 11 (78.750MHz) */
3400
3401                {      0x31,0x42,79               },/* 12 (79.411MHz) */
3402
3403                {      0xAB,0x44,83               },/* 13 (83.950MHz) */
3404
3405                {      0x46,0x25,84               },/* 14 (84.800MHz) */
3406
3407                {      0x78,0x29,86               },/* 15 (86.600MHz) */
3408
3409                {      0x62,0x44,94               },/* 16 (94.500MHz) */
3410
3411                {      0x2B,0x22,104               },/* 17 (104.998MHz) */
3412
3413                {      0x49,0x24,105               },/* 18 (105.882MHz) */
3414
3415                {      0xF8,0x2F,108               },/* 19 (108.279MHz) */
3416
3417                {      0x3C,0x23,109               },/* 1A (109.175MHz) */
3418
3419                {      0x5E,0x43,113               },/* 1B (113.309MHz) */
3420
3421                {      0xBC,0x44,116               },/* 1C (116.406MHz) */
3422
3423                {      0xE0,0x46,132               },/* 1D (132.258MHz) */
3424
3425                {      0xD4,0x28,135               },/* 1E (135.220MHz) */
3426
3427                {      0xEA,0x2A,139               },/* 1F (139.275MHz) */
3428
3429                {      0x41,0x22,157               },/* 20 (157.500MHz) */
3430
3431                {      0x70,0x24,162               },/* 21 (161.793MHz) */
3432
3433                {      0x30,0x21,175               },/* 22 (175.000MHz) */
3434
3435                {      0x4E,0x22,189               },/* 23 (188.520MHz) */
3436
3437                {      0xDE,0x26,194               },/* 24 (194.400MHz) */
3438
3439                {      0x70,0x07,202               },/* 25 (202.500MHz) */
3440
3441                {      0x3F,0x03,229               },/* 26 (229.500MHz) */
3442
3443                {      0xB8,0x06,234               },/* 27 (233.178MHz) */
3444
3445                {      0x34,0x02,253               },/* 28 (252.699997 MHz) */
3446
3447                {      0x58,0x04,255               },/* 29 (254.817MHz) */
3448
3449                {      0x24,0x01,265               },/* 2A (265.728MHz) */
3450
3451                {      0x9B,0x02,267               },/* 2B (266.952MHz) */
3452
3453                {      0x70,0x05,270               },/* 2C (269.65567 MHz) */
3454
3455                {      0x25,0x01,272               },/* 2D (272.041992 MHz) */
3456
3457                {      0x9C,0x02,277               },/* 2E (277.015MHz) */
3458
3459                {      0x27,0x01,286               },/* 2F (286.359985 MHz) */
3460
3461                {      0x3C,0x02,291               },/* 30 (291.132660 MHz) */
3462
3463                {      0xEF,0x0A,292               },/* 31 (291.766MHz) */
3464
3465                {      0xF6,0x0A,310               },/* 32 (309.789459 MHz) */
3466
3467                {      0x95,0x01,315               },/* 33 (315.195MHz) */
3468
3469                {      0xF0,0x09,324               },/* 34 (323.586792 MHz) */
3470
3471                {      0xFE,0x0A,331               },/* 35 (330.615631 MHz) */
3472
3473                {      0xF3,0x09,332               },/* 36 (332.177612 MHz) */
3474
3475                {      0xEA,0x08,340               },/* 37 (340.477MHz) */
3476
3477                {      0xE8,0x07,376               },/* 38 (375.847504 MHz) */
3478
3479                {      0xDE,0x06,389               },/* 39 (388.631439 MHz) */
3480
3481                {      0x52,0x2A,54                },/* 3A (54.000MHz) */
3482
3483                {      0x52,0x6A,27                },/* 3B (27.000MHz) */
3484
3485
3486                {      0x62,0x24,70                },/* 3C (70.874991MHz) */
3487
3488
3489                {      0x62,0x64,70                },/* 3D (70.1048912MHz) */
3490
3491                {      0xA8,0x4C,30                },/* 3E (30.1048912MHz) */
3492
3493                {      0x20,0x26,33                },/* 3F (33.7499957MHz) */
3494
3495                {      0x31,0xc2,39                },/* 40 (39.77MHz) */
3496
3497                {      0x11,0x21,30                },/* 41 (30MHz) }// NTSC 1024X768 */
3498
3499                {      0x2E,0x48,25                },/* 42 (25.175MHz) }// ScaleLCD */
3500
3501                {      0x24,0x46,25                },/* 43 (25.175MHz) */
3502
3503                {      0x26,0x64,28                },/* 44 (28.322MHz) */
3504
3505                {      0x37,0x64,40                },/* 45 (40.000MHz) */
3506
3507                {      0xA1,0x42,108               },/* 46 (95.000MHz) }// QVGA */
3508
3509                {      0x37,0x61,100               },/* 47 (100.00MHz) */
3510
3511                {      0x78,0x27,108               },/* 48 (108.200MHz) */
3512
3513                {      0xBF,0xC8,35                },/* 49 (35.2MHz) */
3514
3515                {      0x66,0x43,123               },/* 4A (122.61Mhz) */
3516
3517                {      0x2C,0x61,80                },/* 4B (80.350Mhz) */
3518
3519                {      0x3B,0x61,108               },/* 4C (107.385Mhz) */
3520
3521/*
3522                {      0x60,0x36,30               },// 4D (30.200MHz)   }// No use
3523
3524                {      0x60,0x36,30               },// 4E (30.200MHz)   }// No use
3525
3526                {      0x60,0x36,30               },// 4F (30.200MHz)   }// No use
3527
3528                {      0x60,0x36,30               },// 50 (30.200MHz)   }// CHTV
3529
3530                {      0x40,0x4A,28               },// 51 (28.190MHz)
3531
3532                {      0x9F,0x46,44               },// 52 (43.600MHz)
3533
3534                {      0x97,0x2C,26               },// 53 (26.400MHz)
3535
3536                {      0x44,0xE4,25               },// 54 (24.600MHz)
3537
3538                {      0x7E,0x32,47               },// 55 (47.832MHz)
3539
3540                {      0x8A,0x24,31               },// 56 (31.500MHz)
3541
3542                {      0x97,0x2C,26               },// 57 (26.200MHz)
3543
3544                {      0xCE,0x3C,39               },// 58 (39.000MHz)
3545
3546                {      0x52,0x4A,36               },// 59 (36.000MHz)
3547*/
3548		{      0x69,0x61,191		  }, /* 4D (190.96MHz ) */
3549		{      0x4F,0x22,192		  }, /* 4E (192.069MHz) */
3550		{      0x28,0x26,322		  }, /* 4F (322.273MHz) */
3551		{      0x5C,0x6B,27		  }, /* 50 (27.74HMz) */
3552		{      0x57,0x24,126		  }, /* 51 (125.999MHz) */
3553		{      0x5C,0x42,148		  }, /* 52 (148.5MHz) */
3554		{      0x42,0x61,120		  }, /* 53 (120.839MHz) */
3555		{      0x62,0x61,178		  }, /* 54 (178.992MHz) */
3556		{      0x59,0x22,217		  }, /* 55 (217.325MHz) */
3557		{      0x29,0x01,300		  }, /* 56 (299.505Mhz) */
3558		{      0x52,0x63,74		  }, /* 57 (74.25MHz) */
3559
3560
3561                {      0xFF,0x00,0                }      /* End mark */
3562};
3563
3564static const UCHAR XGI301TVDelayList[]=
3565{
3566	0x22,            /* ; 0 ExtNTSCDelay */
3567	0x22,            /* ; 1 StNTSCDelay */
3568	0x22,            /* ; 2 ExtPALDelay */
3569	0x22,            /* ; 3 StPALDelay */
3570	0x88,            /* ; 4 ExtHiTVDelay(1080i) */
3571	0xBB,            /* ; 5 StHiTVDelay(1080i) */
3572	0x22,            /* ; 6 ExtYPbPrDelay(525i) */
3573	0x22,            /* ; 7 StYPbPrDealy(525i) */
3574	0x22,            /* ; 8 ExtYPbPrDelay(525p) */
3575	0x22,            /* ; 9 StYPbPrDealy(525p) */
3576	0x22,            /* ; A ExtYPbPrDelay(750p) */
3577	0x22            /* B StYPbPrDealy(750p) */
3578};
3579
3580static const UCHAR XGI301TVDelayList2[]=
3581{
3582	0x22,           /* ; 0 ExtNTSCDelay */
3583	0x22,           /* ; 1 StNTSCDelay */
3584	0x22,           /* ; 2 ExtPALDelay */
3585	0x22,           /* ; 3 StPALDelay */
3586	0x22,           /* ; 4 ExtHiTVDelay */
3587	0x22,           /* ; 5 StHiTVDelay */
3588	0x22,           /* ; 6 ExtYPbPrDelay(525i) */
3589	0x22,           /* ; 7 StYPbPrDealy(525i) */
3590	0x22,           /* ; 8 ExtYPbPrDelay(525p) */
3591	0x22,           /* ; 9 StYPbPrDealy(525p) */
3592	0x22,           /* ; A ExtYPbPrDelay(750p) */
3593	0x22            /* ; B StYPbPrDealy(750p) */
3594};
3595
3596
3597static const UCHAR TVAntiFlickList[]=
3598{/* NTSCAntiFlicker */
3599                      0x04,           /* ; 0 Adaptive */
3600                      0x00,           /* ; 1 new anti-flicker ? */
3601/* PALAntiFlicker */
3602                      0x04,           /* ; 0 Adaptive */
3603                      0x08,           /* ; 1 new anti-flicker ? */
3604/* HiTVAntiFlicker */
3605                      0x04,           /* ; 0 ? */
3606                      0x00            /* ; 1 new anti-flicker ? */
3607};
3608
3609
3610static const UCHAR TVEdgeList[]=
3611{
3612      0x00,            /* ; 0 NTSC No Edge enhance */
3613      0x04,            /* ; 1 NTSC Adaptive Edge enhance */
3614      0x00,            /* ; 0 PAL No Edge enhance */
3615      0x04,            /* ; 1 PAL Adaptive Edge enhance */
3616      0x00,            /* ; 0 HiTV */
3617      0x00             /* ; 1 HiTV */
3618};
3619
3620static const ULONG TVPhaseList[]=
3621{      0x08BAED21, /* ; 0 NTSC phase */
3622       0x00E3052A, /* ; 1 PAL phase */
3623       0x9B2EE421, /* ; 2 PAL-M phase */
3624       0xBA3EF421, /* ; 3 PAL-N phase */
3625       0xA7A28B1E, /* ; 4 NTSC 1024x768 */
3626       0xE00A831E, /* ; 5 PAL-M 1024x768 */
3627       0x00000000, /* ; 6 reserved */
3628       0x00000000, /* ; 7 reserved */
3629       0xD67BF021, /* ; 8 NTSC phase */
3630       0xE986092A, /* ; 9 PAL phase */
3631       0xA4EFE621, /* ; A PAL-M phase */
3632       0x4694F621, /* ; B PAL-N phase */
3633       0x8BDE711C, /* ; C NTSC 1024x768 */
3634       0xE00A831E  /* ; D PAL-M 1024x768 */
3635};
3636
3637static const UCHAR NTSCYFilter1[]=
3638{
3639		      0x00,0xF4,0x10,0x38     ,/* 0 : 320x text mode */
3640                      0x00,0xF4,0x10,0x38     ,/* 1 : 360x text mode */
3641                      0xEB,0x04,0x25,0x18     ,/* 2 : 640x text mode */
3642                      0xF1,0x04,0x1F,0x18     ,/* 3 : 720x text mode */
3643                      0x00,0xF4,0x10,0x38     ,/* 4 : 320x gra. mode */
3644                      0xEB,0x04,0x25,0x18     ,/* 5 : 640x gra. mode */
3645                      0xEB,0x15,0x25,0xF6     /* 6 : 800x gra. mode */
3646};
3647
3648static const UCHAR PALYFilter1[]=
3649{
3650		      0x00,0xF4,0x10,0x38, /* 0 : 320x text mode */
3651                      0x00,0xF4,0x10,0x38     ,/* 1 : 360x text mode */
3652                      0xF1,0xF7,0x1F,0x32     ,/* 2 : 640x text mode */
3653                      0xF3,0x00,0x1D,0x20     ,/* 3 : 720x text mode */
3654                      0x00,0xF4,0x10,0x38     ,/* 4 : 320x gra. mode */
3655                      0xF1,0xF7,0x1F,0x32     ,/* 5 : 640x gra. mode */
3656                      0xFC,0xFB,0x14,0x2A     /* 6 : 800x gra. mode */
3657};
3658
3659static const UCHAR PALMYFilter1[]=
3660{
3661		      0x00,0xF4,0x10,0x38, /* 0 : 320x text mode */
3662                      0x00,0xF4,0x10,0x38, /* 1 : 360x text mode */
3663                      0xEB,0x04,0x10,0x18, /* 2 : 640x text mode */
3664                      0xF7,0x06,0x19,0x14, /* 3 : 720x text mode */
3665                      0x00,0xF4,0x10,0x38, /* 4 : 320x gra. mode */
3666                      0xEB,0x04,0x25,0x18, /* 5 : 640x gra. mode */
3667                      0xEB,0x15,0x25,0xF6, /* 6 : 800x gra. mode */
3668                      0xFF,0xFF,0xFF,0xFF  /* End of Table */
3669};
3670
3671static const UCHAR PALNYFilter1[]=
3672{
3673		      0x00,0xF4,0x10,0x38, /* 0 : 320x text mode */
3674                      0x00,0xF4,0x10,0x38, /* 1 : 360x text mode */
3675                      0xEB,0x04,0x10,0x18, /* 2 : 640x text mode */
3676                      0xF7,0x06,0x19,0x14, /* 3 : 720x text mode */
3677                      0x00,0xF4,0x10,0x38, /* 4 : 320x gra. mode */
3678                      0xEB,0x04,0x25,0x18, /* 5 : 640x gra. mode */
3679                      0xEB,0x15,0x25,0xF6, /* 6 : 800x gra. mode */
3680                      0xFF,0xFF,0xFF,0xFF  /* End of Table */
3681};
3682
3683static const UCHAR NTSCYFilter2[]=
3684{
3685		      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */
3686                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */
3687                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 2 : 640x text mode */
3688                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 3 : 720x text mode */
3689                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 4 : 320x gra. mode */
3690                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 5 : 640x gra. mode */
3691                      0x01,0x01,0xFC,0xF8,0x08,0x26,0x38, /* 6 : 800x gra. mode */
3692                      0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28  /* 7 : 1024xgra. mode */
3693};
3694
3695static const UCHAR PALYFilter2[]=
3696{
3697		      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */
3698                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */
3699                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 2 : 640x text mode */
3700                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 3 : 720x text mode */
3701                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 4 : 320x gra. mode */
3702                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 5 : 640x gra. mode */
3703                      0x01,0x01,0xFC,0xF8,0x08,0x26,0x38, /* 6 : 800x gra. mode */
3704                      0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28  /* 7 : 1024xgra. mode */
3705};
3706
3707static const UCHAR PALMYFilter2[]=
3708{
3709		      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */
3710                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */
3711                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 2 : 640x text mode */
3712                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 3 : 720x text mode */
3713                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 4 : 320x gra. mode */
3714                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 5 : 640x gra. mode */
3715                      0x01,0x01,0xFC,0xF8,0x08,0x26,0x38, /* 6 : 800x gra. mode */
3716                      0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28  /* 7 : 1024xgra. mode */
3717};
3718
3719static const UCHAR PALNYFilter2[]=
3720{
3721		      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */
3722                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */
3723                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 2 : 640x text mode */
3724                      0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 3 : 720x text mode */
3725                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 4 : 320x gra. mode */
3726                      0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 5 : 640x gra. mode */
3727                      0x01,0x01,0xFC,0xF8,0x08,0x26,0x38, /* 6 : 800x gra. mode */
3728                      0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28  /* 7 : 1024xgra. mode */
3729};
3730
3731static const UCHAR XGI_NTSC1024AdjTime[]=
3732{
3733      0xa7,0x07,0xf2,0x6e,0x17,0x8b,0x73,0x53,
3734      0x13,0x40,0x34,0xF4,0x63,0xBB,0xCC,0x7A,
3735      0x58,0xe4,0x73,0xd0,0x13
3736};
3737
3738static const XGI301C_Tap4TimingStruct HiTVTap4Timing[]=
3739{
3740	{0,{
3741	0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F, /* C0-C7 */
3742	0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, /* C8-CF */
3743	0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E, /* D0-D7 */
3744	0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, /* D8-DF */
3745	0x7C,0x14,0x14,0x7C,0x7C,0x11,0x17,0x7C, /* E0-E7 */
3746	0x7D,0x0E,0x19,0x7C,0x7E,0x0B,0x1B,0x7C, /* EA-EF */
3747	0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C, /* F0-F7 */
3748	0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E  /* F8-FF */
3749	}
3750	}
3751};
3752
3753static const XGI301C_Tap4TimingStruct EnlargeTap4Timing[]=
3754{
3755	{0,{
3756	0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F, /* C0-C7 */
3757	0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, /* C8-CF */
3758	0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E, /* D0-D7 */
3759	0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, /* D8-DF */
3760	0x7C,0x14,0x14,0x7C,0x7C,0x11,0x17,0x7C, /* E0-E7 */
3761	0x7D,0x0E,0x19,0x7C,0x7E,0x0B,0x1B,0x7C, /* EA-EF */
3762	0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C, /* F0-F7 */
3763	0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E   /* F8-FF */
3764	}
3765	}
3766};
3767
3768static const XGI301C_Tap4TimingStruct NoScaleTap4Timing[]=
3769{
3770	{0,{
3771	0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F, /* C0-C7 */
3772	0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, /* C8-CF */
3773	0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E, /* D0-D7 */
3774	0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, /* D8-DF */
3775	0x7C,0x14,0x14,0x7C,0x7C,0x11,0x17,0x7C, /* E0-E7 */
3776	0x7D,0x0E,0x19,0x7C,0x7E,0x0B,0x1B,0x7C, /* EA-EF */
3777	0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C, /* F0-F7 */
3778	0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E  /* F8-FF */
3779	}
3780	}
3781};
3782
3783static const XGI301C_Tap4TimingStruct PALTap4Timing[]=
3784{
3785	{600,  {
3786                0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E, /* C0-C7 */
3787                0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, /* C8-CF */
3788                0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C, /* D0-D7 */
3789                0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, /* D8-DF */
3790                0x7D,0x13,0x13,0x7D,0x7D,0x11,0x14,0x7E, /* E0-E7 */
3791                0x7D,0x0F,0x16,0x7E,0x7D,0x0E,0x17,0x7E, /* EA-EF */
3792                0x7D,0x0C,0x18,0x7F,0x7D,0x0A,0x18,0x01, /* F0-F7 */
3793                0x7D,0x08,0x19,0x02,0x7D,0x06,0x19,0x04  /* F8-FF */
3794                }
3795 	},
3796        {768,	{
3797                0x08,0x12,0x08,0x7E,0x07,0x12,0x09,0x7E, /* C0-C7 */
3798                0x06,0x12,0x0A,0x7E,0x05,0x11,0x0B,0x7F, /* C8-CF */
3799                0x04,0x11,0x0C,0x7F,0x03,0x11,0x0C,0x00, /* D0-D7 */
3800                0x03,0x10,0x0D,0x00,0x02,0x0F,0x0E,0x01, /* D8-DF */
3801                0x01,0x0F,0x0F,0x01,0x01,0x0E,0x0F,0x02, /* E0-E7 */
3802                0x00,0x0D,0x10,0x03,0x7F,0x0C,0x11,0x04, /* EA-EF */
3803                0x7F,0x0C,0x11,0x04,0x7F,0x0B,0x11,0x05, /* F0-F7 */
3804                0x7E,0x0A,0x12,0x06,0x7E,0x09,0x12,0x07  /* F8-FF */
3805                }
3806        },
3807        {0xFFFF,
3808        	{
3809                0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E, /* C0-C7 */
3810                0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D, /* C8-CF */
3811                0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D, /* D0-D7 */
3812                0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C, /* D8-DF */
3813                0x7C,0x14,0x14,0x7C,0x7C,0x12,0x15,0x7D, /* E0-E7 */
3814                0x7C,0x10,0x17,0x7D,0x7C,0x0D,0x18,0x7F, /* EA-EF */
3815                0x7D,0x0B,0x19,0x7F,0x7D,0x09,0x1A,0x00, /* F0-F7 */
3816                0x7D,0x07,0x1A,0x02,0x7E,0x05,0x1B,0x02  /* F8-FF */
3817                }
3818        }
3819};
3820
3821static const XGI301C_Tap4TimingStruct NTSCTap4Timing[]=
3822{
3823	{480,	{
3824              	0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D, /* C0-C7 */
3825              	0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D, /* C8-CF */
3826              	0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C, /* D0-D7 */
3827              	0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C, /* D8-DF */
3828              	0x7D,0x13,0x13,0x7D,0x7C,0x12,0x15,0x7D, /* E0-E7 */
3829              	0x7C,0x10,0x17,0x7D,0x7C,0x0E,0x18,0x7E, /* EA-EF */
3830              	0x7D,0x0C,0x19,0x7E,0x7D,0x0A,0x19,0x00, /* F0-F7 */
3831              	0x7D,0x08,0x1A,0x01,0x7E,0x06,0x1A,0x02  /* F8-FF */
3832        	}
3833        },
3834        {600,	{
3835              	0x07,0x14,0x07,0x7E,0x06,0x14,0x09,0x7D, /* C0-C7 */
3836              	0x05,0x14,0x0A,0x7D,0x04,0x13,0x0B,0x7E, /* C8-CF */
3837              	0x03,0x13,0x0C,0x7E,0x02,0x12,0x0D,0x7F, /* D0-D7 */
3838              	0x01,0x12,0x0E,0x7F,0x01,0x11,0x0F,0x7F, /* D8-DF */
3839              	0x01,0x10,0x10,0x00,0x7F,0x0F,0x11,0x01, /* E0-E7 */
3840              	0x7F,0x0E,0x12,0x01,0x7E,0x0D,0x12,0x03, /* EA-EF */
3841              	0x7E,0x0C,0x13,0x03,0x7E,0x0B,0x13,0x04, /* F0-F7 */
3842              	0x7E,0x0A,0x14,0x04,0x7D,0x09,0x14,0x06  /* F8-FF */
3843        	}
3844        },
3845        {0xFFFF,
3846        	{
3847              	0x09,0x0F,0x09,0x7F,0x08,0x0F,0x09,0x00, /* C0-C7 */
3848              	0x07,0x0F,0x0A,0x00,0x06,0x0F,0x0A,0x01, /* C8-CF */
3849              	0x06,0x0E,0x0B,0x01,0x05,0x0E,0x0B,0x02, /* D0-D7 */
3850              	0x04,0x0E,0x0C,0x02,0x04,0x0D,0x0C,0x03, /* D8-DF */
3851              	0x03,0x0D,0x0D,0x03,0x02,0x0C,0x0D,0x05, /* E0-E7 */
3852              	0x02,0x0C,0x0E,0x04,0x01,0x0B,0x0E,0x06, /* EA-EF */
3853              	0x01,0x0B,0x0E,0x06,0x00,0x0A,0x0F,0x07, /* F0-F7 */
3854              	0x00,0x0A,0x0F,0x07,0x00,0x09,0x0F,0x08  /* F8-FF */
3855        	}
3856        }
3857};
3858
3859static const XGI301C_Tap4TimingStruct YPbPr525pTap4Timing[]=
3860{
3861	{480,	{
3862              	0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D, /* C0-C7 */
3863              	0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D, /* C8-CF */
3864              	0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C, /* D0-D7 */
3865              	0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C, /* D8-DF */
3866              	0x7D,0x13,0x13,0x7D,0x7C,0x12,0x15,0x7D, /* E0-E7 */
3867              	0x7C,0x10,0x17,0x7D,0x7C,0x0E,0x18,0x7E, /* EA-EF */
3868              	0x7D,0x0C,0x19,0x7E,0x7D,0x0A,0x19,0x00, /* F0-F7 */
3869              	0x7D,0x08,0x1A,0x01,0x7E,0x06,0x1A,0x02  /* F8-FF */
3870        	}
3871        },
3872        {600,	{
3873              	0x07,0x14,0x07,0x7E,0x06,0x14,0x09,0x7D, /* C0-C7 */
3874              	0x05,0x14,0x0A,0x7D,0x04,0x13,0x0B,0x7E, /* C8-CF */
3875              	0x03,0x13,0x0C,0x7E,0x02,0x12,0x0D,0x7F, /* D0-D7 */
3876              	0x01,0x12,0x0E,0x7F,0x01,0x11,0x0F,0x7F, /* D8-DF */
3877              	0x01,0x10,0x10,0x00,0x7F,0x0F,0x11,0x01, /* E0-E7 */
3878              	0x7F,0x0E,0x12,0x01,0x7E,0x0D,0x12,0x03, /* EA-EF */
3879              	0x7E,0x0C,0x13,0x03,0x7E,0x0B,0x13,0x04, /* F0-F7 */
3880              	0x7E,0x0A,0x14,0x04,0x7D,0x09,0x14,0x06  /* F8-FF */
3881        	}
3882        },
3883        {0xFFFF,
3884        	{
3885              	0x09,0x0F,0x09,0x7F,0x08,0x0F,0x09,0x00, /* C0-C7 */
3886              	0x07,0x0F,0x0A,0x00,0x06,0x0F,0x0A,0x01, /* C8-CF */
3887              	0x06,0x0E,0x0B,0x01,0x05,0x0E,0x0B,0x02, /* D0-D7 */
3888              	0x04,0x0E,0x0C,0x02,0x04,0x0D,0x0C,0x03, /* D8-DF */
3889              	0x03,0x0D,0x0D,0x03,0x02,0x0C,0x0D,0x05, /* E0-E7 */
3890              	0x02,0x0C,0x0E,0x04,0x01,0x0B,0x0E,0x06, /* EA-EF */
3891              	0x01,0x0B,0x0E,0x06,0x00,0x0A,0x0F,0x07, /* F0-F7 */
3892              	0x00,0x0A,0x0F,0x07,0x00,0x09,0x0F,0x08  /* F8-FF */
3893        	}
3894        }
3895};
3896
3897static const XGI301C_Tap4TimingStruct YPbPr525iTap4Timing[]=
3898{
3899	{480,	{
3900              	0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D, /* C0-C7 */
3901              	0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D, /* C8-CF */
3902              	0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C, /* D0-D7 */
3903              	0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C, /* D8-DF */
3904              	0x7D,0x13,0x13,0x7D,0x7C,0x12,0x15,0x7D, /* E0-E7 */
3905              	0x7C,0x10,0x17,0x7D,0x7C,0x0E,0x18,0x7E, /* EA-EF */
3906              	0x7D,0x0C,0x19,0x7E,0x7D,0x0A,0x19,0x00, /* F0-F7 */
3907              	0x7D,0x08,0x1A,0x01,0x7E,0x06,0x1A,0x02  /* F8-FF */
3908        	}
3909        },
3910        {600,	{
3911              	0x07,0x14,0x07,0x7E,0x06,0x14,0x09,0x7D, /* C0-C7 */
3912              	0x05,0x14,0x0A,0x7D,0x04,0x13,0x0B,0x7E, /* C8-CF */
3913              	0x03,0x13,0x0C,0x7E,0x02,0x12,0x0D,0x7F, /* D0-D7 */
3914              	0x01,0x12,0x0E,0x7F,0x01,0x11,0x0F,0x7F, /* D8-DF */
3915              	0x01,0x10,0x10,0x00,0x7F,0x0F,0x11,0x01, /* E0-E7 */
3916              	0x7F,0x0E,0x12,0x01,0x7E,0x0D,0x12,0x03, /* EA-EF */
3917              	0x7E,0x0C,0x13,0x03,0x7E,0x0B,0x13,0x04, /* F0-F7 */
3918              	0x7E,0x0A,0x14,0x04,0x7D,0x09,0x14,0x06  /* F8-FF */
3919        	}
3920        },
3921        {0xFFFF,
3922        	{
3923              	0x09,0x0F,0x09,0x7F,0x08,0x0F,0x09,0x00, /* C0-C7 */
3924              	0x07,0x0F,0x0A,0x00,0x06,0x0F,0x0A,0x01, /* C8-CF */
3925              	0x06,0x0E,0x0B,0x01,0x05,0x0E,0x0B,0x02, /* D0-D7 */
3926              	0x04,0x0E,0x0C,0x02,0x04,0x0D,0x0C,0x03, /* D8-DF */
3927              	0x03,0x0D,0x0D,0x03,0x02,0x0C,0x0D,0x05, /* E0-E7 */
3928              	0x02,0x0C,0x0E,0x04,0x01,0x0B,0x0E,0x06, /* EA-EF */
3929              	0x01,0x0B,0x0E,0x06,0x00,0x0A,0x0F,0x07, /* F0-F7 */
3930              	0x00,0x0A,0x0F,0x07,0x00,0x09,0x0F,0x08  /* F8-FF */
3931        	}
3932        }
3933};
3934
3935static const XGI301C_Tap4TimingStruct YPbPr750pTap4Timing[]=
3936{        {0xFFFF,
3937               {
3938               0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E, /* C0-C7 */
3939               0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, /* C8-CF */
3940               0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C, /* D0-D7 */
3941               0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, /* D8-DF */
3942               0x7D,0x13,0x13,0x7D,0x7D,0x11,0x14,0x7E, /* E0-E7 */
3943               0x7D,0x0F,0x16,0x7E,0x7D,0x0E,0x17,0x7E, /* EA-EF */
3944               0x7D,0x0C,0x18,0x7F,0x7D,0x0A,0x18,0x01, /* F0-F7 */
3945               0x7D,0x08,0x19,0x02,0x7D,0x06,0x19,0x04  /* F8-FF */
3946               }
3947        }
3948};
3949