1 #ifndef _VB_STRUCT_
2 #define _VB_STRUCT_
3 
4 #ifdef _INITNEW_
5 #define EXTERN
6 #else
7 #define EXTERN extern
8 #endif
9 
10 
11 
12 
13 struct XGI_PanelDelayTblStruct
14 {
15  unsigned char timer[2];
16 };
17 
18 struct XGI_LCDDataStruct
19 {
20  unsigned short RVBHCMAX;
21  unsigned short RVBHCFACT;
22  unsigned short VGAHT;
23  unsigned short VGAVT;
24  unsigned short LCDHT;
25  unsigned short LCDVT;
26 };
27 
28 
29 struct XGI_LVDSCRT1HDataStruct
30 {
31  unsigned char Reg[8];
32 };
33 
34 struct XGI_LVDSCRT1VDataStruct
35 {
36  unsigned char Reg[7];
37 };
38 
39 
40 struct XGI_TVDataStruct
41 {
42  unsigned short RVBHCMAX;
43  unsigned short RVBHCFACT;
44  unsigned short VGAHT;
45  unsigned short VGAVT;
46  unsigned short TVHDE;
47  unsigned short TVVDE;
48  unsigned short RVBHRS;
49  unsigned char FlickerMode;
50  unsigned short HALFRVBHRS;
51  unsigned char RY1COE;
52  unsigned char RY2COE;
53  unsigned char RY3COE;
54  unsigned char RY4COE;
55 };
56 
57 struct XGI_LVDSDataStruct
58 {
59  unsigned short VGAHT;
60  unsigned short VGAVT;
61  unsigned short LCDHT;
62  unsigned short LCDVT;
63 };
64 
65 struct XGI_LVDSDesStruct
66 {
67  unsigned short LCDHDES;
68  unsigned short LCDVDES;
69 };
70 
71 struct XGI_LVDSCRT1DataStruct
72 {
73  unsigned char CR[15];
74 };
75 
76 /*add for LCDA*/
77 
78 struct XGI_StStruct
79 {
80  unsigned char St_ModeID;
81  unsigned short St_ModeFlag;
82  unsigned char St_StTableIndex;
83  unsigned char St_CRT2CRTC;
84  unsigned char St_CRT2CRTC2;
85  unsigned char St_ResInfo;
86  unsigned char VB_StTVFlickerIndex;
87  unsigned char VB_StTVEdgeIndex;
88  unsigned char VB_StTVYFilterIndex;
89 };
90 
91 struct XGI_StandTableStruct
92 {
93  unsigned char CRT_COLS;
94  unsigned char ROWS;
95  unsigned char CHAR_HEIGHT;
96  unsigned short CRT_LEN;
97  unsigned char SR[4];
98  unsigned char MISC;
99  unsigned char CRTC[0x19];
100  unsigned char ATTR[0x14];
101  unsigned char GRC[9];
102 };
103 
104 struct XGI_ExtStruct
105 {
106  unsigned char Ext_ModeID;
107  unsigned short Ext_ModeFlag;
108  unsigned short Ext_ModeInfo;
109  unsigned short Ext_Point;
110  unsigned short Ext_VESAID;
111  unsigned char Ext_VESAMEMSize;
112  unsigned char Ext_RESINFO;
113  unsigned char VB_ExtTVFlickerIndex;
114  unsigned char VB_ExtTVEdgeIndex;
115  unsigned char VB_ExtTVYFilterIndex;
116  unsigned char REFindex;
117 };
118 
119 struct XGI_Ext2Struct
120 {
121  unsigned short Ext_InfoFlag;
122  unsigned char Ext_CRT1CRTC;
123  unsigned char Ext_CRTVCLK;
124  unsigned char Ext_CRT2CRTC;
125  unsigned char Ext_CRT2CRTC2;
126  unsigned char  ModeID;
127  unsigned short XRes;
128  unsigned short YRes;
129  /* unsigned short ROM_OFFSET; */
130 };
131 
132 
133 struct XGI_MCLKDataStruct
134 {
135  unsigned char SR28, SR29, SR2A;
136  unsigned short CLOCK;
137 };
138 
139 struct XGI_ECLKDataStruct
140 {
141  unsigned char SR2E, SR2F, SR30;
142  unsigned short CLOCK;
143 };
144 
145 struct XGI_VCLKDataStruct
146 {
147  unsigned char SR2B, SR2C;
148  unsigned short CLOCK;
149 };
150 
151 struct XGI_VBVCLKDataStruct
152 {
153  unsigned char Part4_A, Part4_B;
154  unsigned short CLOCK;
155 };
156 
157 struct XGI_StResInfoStruct
158 {
159  unsigned short HTotal;
160  unsigned short VTotal;
161 };
162 
163 struct XGI_ModeResInfoStruct
164 {
165  unsigned short HTotal;
166  unsigned short VTotal;
167  unsigned char  XChar;
168  unsigned char  YChar;
169 };
170 
171 struct XGI_LCDNBDesStruct
172 {
173   unsigned char NB[12];
174 };
175  /*add for new UNIVGABIOS*/
176 struct XGI_LCDDesStruct
177 {
178  unsigned short LCDHDES;
179  unsigned short LCDHRS;
180  unsigned short LCDVDES;
181  unsigned short LCDVRS;
182 };
183 
184 struct XGI_LCDDataTablStruct
185 {
186  unsigned char  PANELID;
187  unsigned short MASK;
188  unsigned short CAP;
189  unsigned short DATAPTR;
190 };
191 
192 struct XGI_TVTablDataStruct
193 {
194  unsigned short MASK;
195  unsigned short CAP;
196  unsigned short DATAPTR;
197 };
198 
199 struct XGI330_LCDDataDesStruct
200 {
201  unsigned short LCDHDES;
202  unsigned short LCDHRS;
203  unsigned short LCDVDES;
204  unsigned short LCDVRS;
205 };
206 
207 
208 struct XGI330_LVDSDataStruct
209 {
210  unsigned short VGAHT;
211  unsigned short VGAVT;
212  unsigned short LCDHT;
213  unsigned short LCDVT;
214 };
215 
216 struct XGI330_LCDDataDesStruct2
217 {
218  unsigned short LCDHDES;
219  unsigned short LCDHRS;
220  unsigned short LCDVDES;
221  unsigned short LCDVRS;
222  unsigned short LCDHSync;
223  unsigned short LCDVSync;
224 };
225 
226 struct XGI330_LCDDataStruct
227 {
228  unsigned short RVBHCMAX;
229  unsigned short RVBHCFACT;
230  unsigned short VGAHT;
231  unsigned short VGAVT;
232  unsigned short LCDHT;
233  unsigned short LCDVT;
234 };
235 
236 
237 struct XGI330_TVDataStruct
238 {
239  unsigned short RVBHCMAX;
240  unsigned short RVBHCFACT;
241  unsigned short VGAHT;
242  unsigned short VGAVT;
243  unsigned short TVHDE;
244  unsigned short TVVDE;
245  unsigned short RVBHRS;
246  unsigned char FlickerMode;
247  unsigned short HALFRVBHRS;
248 };
249 
250 struct XGI330_LCDDataTablStruct
251 {
252  unsigned char  PANELID;
253  unsigned short MASK;
254  unsigned short CAP;
255  unsigned short DATAPTR;
256 };
257 
258 struct XGI330_TVDataTablStruct
259 {
260  unsigned short MASK;
261  unsigned short CAP;
262  unsigned short DATAPTR;
263 };
264 
265 
266 struct XGI330_CHTVDataStruct
267 {
268  unsigned short VGAHT;
269  unsigned short VGAVT;
270  unsigned short LCDHT;
271  unsigned short LCDVT;
272 };
273 
274 struct XGI_TimingHStruct
275 {
276   unsigned char data[8];
277 };
278 
279 struct XGI_TimingVStruct
280 {
281   unsigned char data[7];
282 };
283 
284 struct XGI_CH7007TV_TimingHStruct
285 {
286   unsigned char data[10];
287 };
288 
289 struct XGI_CH7007TV_TimingVStruct
290 {
291   unsigned char data[10];
292 };
293 
294 struct XGI_XG21CRT1Struct
295 {
296  unsigned char ModeID, CR02, CR03, CR15, CR16;
297 };
298 
299 struct XGI330_CHTVRegDataStruct
300 {
301  unsigned char Reg[16];
302 };
303 
304 struct XGI330_LCDCapStruct
305 {
306 		unsigned char	   LCD_ID;
307 		unsigned short	   LCD_Capability;
308 		unsigned char	   LCD_SetFlag;
309 		unsigned char	   LCD_DelayCompensation;
310 		unsigned char	   LCD_HSyncWidth;
311 		unsigned char	   LCD_VSyncWidth;
312 		unsigned char	   LCD_VCLK;
313 		unsigned char	   LCDA_VCLKData1;
314 		unsigned char	   LCDA_VCLKData2;
315 		unsigned char	   LCUCHAR_VCLKData1;
316 		unsigned char	   LCUCHAR_VCLKData2;
317 		unsigned char	   PSC_S1;
318 		unsigned char	   PSC_S2;
319 		unsigned char	   PSC_S3;
320 		unsigned char	   PSC_S4;
321 		unsigned char	   PSC_S5;
322 		unsigned char	   PWD_2B;
323 		unsigned char	   PWD_2C;
324 		unsigned char	   PWD_2D;
325 		unsigned char	   PWD_2E;
326 		unsigned char	   PWD_2F;
327 		unsigned char	   Spectrum_31;
328 		unsigned char	   Spectrum_32;
329 		unsigned char	   Spectrum_33;
330 		unsigned char	   Spectrum_34;
331 };
332 
333 struct XGI21_LVDSCapStruct
334 {
335 		unsigned short	   LVDS_Capability;
336 		unsigned short	   LVDSHT;
337 		unsigned short	   LVDSVT;
338 		unsigned short	   LVDSHDE;
339 		unsigned short	   LVDSVDE;
340 		unsigned short	   LVDSHFP;
341 		unsigned short	   LVDSVFP;
342 		unsigned short	   LVDSHSYNC;
343 		unsigned short	   LVDSVSYNC;
344 		unsigned char	   VCLKData1;
345 		unsigned char	   VCLKData2;
346 		unsigned char	   PSC_S1;
347 		unsigned char	   PSC_S2;
348 		unsigned char	   PSC_S3;
349 		unsigned char	   PSC_S4;
350 		unsigned char	   PSC_S5;
351 };
352 
353 struct XGI_CRT1TableStruct
354 {
355   unsigned char CR[16];
356 };
357 
358 
359 struct XGI330_VCLKDataStruct
360 {
361     unsigned char SR2B, SR2C;
362     unsigned short CLOCK;
363 };
364 
365 struct XGI301C_Tap4TimingStruct
366 {
367     unsigned short DE;
368     unsigned char  Reg[64];   /* C0-FF */
369 };
370 
371 struct XGI_New_StandTableStruct
372 {
373 	unsigned char  CRT_COLS;
374 	unsigned char  ROWS;
375 	unsigned char  CHAR_HEIGHT;
376 	unsigned short CRT_LEN;
377 	unsigned char  SR[4];
378 	unsigned char  MISC;
379 	unsigned char  CRTC[0x19];
380 	unsigned char  ATTR[0x14];
381 	unsigned char  GRC[9];
382 };
383 
384 struct vb_device_info
385 {
386     unsigned char  ISXPDOS;
387     unsigned long   P3c4,P3d4,P3c0,P3ce,P3c2,P3cc;
388     unsigned long   P3ca,P3c6,P3c7,P3c8,P3c9,P3da;
389     unsigned long   Part0Port,Part1Port,Part2Port;
390     unsigned long   Part3Port,Part4Port,Part5Port;
391     unsigned short   RVBHCFACT,RVBHCMAX,RVBHRS;
392     unsigned short   VGAVT,VGAHT,VGAVDE,VGAHDE;
393     unsigned short   VT,HT,VDE,HDE;
394     unsigned short   LCDHRS,LCDVRS,LCDHDES,LCDVDES;
395 
396     unsigned short   ModeType;
397     unsigned short   IF_DEF_LVDS,IF_DEF_TRUMPION,IF_DEF_DSTN;/* ,IF_DEF_FSTN; add for dstn */
398     unsigned short   IF_DEF_CRT2Monitor,IF_DEF_VideoCapture;
399     unsigned short   IF_DEF_LCDA,IF_DEF_CH7017,IF_DEF_YPbPr,IF_DEF_ScaleLCD,IF_DEF_OEMUtil,IF_DEF_PWD;
400     unsigned short   IF_DEF_ExpLink;
401     unsigned short   IF_DEF_CH7005,IF_DEF_HiVision;
402     unsigned short   IF_DEF_CH7007; /* Billy 2007/05/03 */
403     unsigned short   LCDResInfo,LCDTypeInfo, VBType;/*301b*/
404     unsigned short   VBInfo,TVInfo,LCDInfo, Set_VGAType;
405     unsigned short   VBExtInfo;/*301lv*/
406     unsigned short   SetFlag;
407     unsigned short   NewFlickerMode;
408     unsigned short   SelectCRT2Rate;
409 
410     unsigned char *ROMAddr;
411     unsigned char *FBAddr;
412     unsigned long BaseAddr;
413     unsigned long RelIO;
414 
415 	unsigned char (*CR6B)[4];
416 	unsigned char (*CR6E)[4];
417 	unsigned char (*CR6F)[32];
418 	unsigned char (*CR89)[2];
419 
420 	unsigned char (*SR15)[8];
421 	unsigned char (*CR40)[8];
422 
423     unsigned char  *pSoftSetting;
424     unsigned char  *pOutputSelect;
425 
426     unsigned short *pRGBSenseData;
427     unsigned short *pRGBSenseData2; /*301b*/
428     unsigned short *pVideoSenseData;
429     unsigned short *pVideoSenseData2;
430     unsigned short *pYCSenseData;
431     unsigned short *pYCSenseData2;
432 
433     unsigned char  *pSR07;
434     unsigned char  *CR49;
435     unsigned char  *pSR1F;
436     unsigned char  *AGPReg;
437     unsigned char  *SR16;
438     unsigned char  *pSR21;
439     unsigned char  *pSR22;
440     unsigned char  *pSR23;
441     unsigned char  *pSR24;
442     unsigned char  *SR25;
443     unsigned char  *pSR31;
444     unsigned char  *pSR32;
445     unsigned char  *pSR33;
446     unsigned char  *pSR36;      /* alan 12/07/2006 */
447     unsigned char  *pCRCF;
448     unsigned char  *pCRD0;      /* alan 12/07/2006 */
449     unsigned char  *pCRDE;      /* alan 12/07/2006 */
450     unsigned char  *pCR8F;      /* alan 12/07/2006 */
451     unsigned char  *pSR40;      /* alan 12/07/2006 */
452     unsigned char  *pSR41;      /* alan 12/07/2006 */
453     unsigned char  *pDVOSetting;
454     unsigned char  *pCR2E;
455     unsigned char  *pCR2F;
456     unsigned char  *pCR46;
457     unsigned char  *pCR47;
458     unsigned char  *pCRT2Data_1_2;
459     unsigned char  *pCRT2Data_4_D;
460     unsigned char  *pCRT2Data_4_E;
461     unsigned char  *pCRT2Data_4_10;
462     struct XGI_MCLKDataStruct  *MCLKData;
463     struct XGI_ECLKDataStruct  *ECLKData;
464 
465     unsigned char   *XGI_TVDelayList;
466     unsigned char   *XGI_TVDelayList2;
467     unsigned char   *CHTVVCLKUNTSC;
468     unsigned char   *CHTVVCLKONTSC;
469     unsigned char   *CHTVVCLKUPAL;
470     unsigned char   *CHTVVCLKOPAL;
471     unsigned char   *NTSCTiming;
472     unsigned char   *PALTiming;
473     unsigned char   *HiTVExtTiming;
474     unsigned char   *HiTVSt1Timing;
475     unsigned char   *HiTVSt2Timing;
476     unsigned char   *HiTVTextTiming;
477     unsigned char   *YPbPr750pTiming;
478     unsigned char   *YPbPr525pTiming;
479     unsigned char   *YPbPr525iTiming;
480     unsigned char   *HiTVGroup3Data;
481     unsigned char   *HiTVGroup3Simu;
482     unsigned char   *HiTVGroup3Text;
483     unsigned char   *Ren525pGroup3;
484     unsigned char   *Ren750pGroup3;
485     unsigned char   *ScreenOffset;
486     unsigned char   *pXGINew_DRAMTypeDefinition;
487     unsigned char   *pXGINew_I2CDefinition ;
488     unsigned char   *pXGINew_CR97 ;
489 
490     struct XGI330_LCDCapStruct  *LCDCapList;
491     struct XGI21_LVDSCapStruct  *XG21_LVDSCapList;
492 
493     struct XGI_TimingHStruct  *TimingH;
494     struct XGI_TimingVStruct  *TimingV;
495 
496     struct XGI_StStruct          *SModeIDTable;
497     struct XGI_StandTableStruct  *StandTable;
498     struct XGI_ExtStruct         *EModeIDTable;
499     struct XGI_Ext2Struct        *RefIndex;
500     /* XGINew_CRT1TableStruct *CRT1Table; */
501     struct XGI_CRT1TableStruct    *XGINEWUB_CRT1Table;
502     struct XGI_VCLKDataStruct    *VCLKData;
503     struct XGI_VBVCLKDataStruct  *VBVCLKData;
504     struct XGI_StResInfoStruct   *StResInfo;
505     struct XGI_ModeResInfoStruct *ModeResInfo;
506     struct XGI_XG21CRT1Struct	  *UpdateCRT1;
507 };  /* _struct vb_device_info */
508 
509 
510 struct TimingInfo
511 {
512     unsigned short    Horizontal_ACTIVE;
513     unsigned short    Horizontal_FP;
514     unsigned short    Horizontal_SYNC;
515     unsigned short    Horizontal_BP;
516     unsigned short    Vertical_ACTIVE;
517     unsigned short    Vertical_FP;
518     unsigned short    Vertical_SYNC;
519     unsigned short    Vertical_BP;
520     double    DCLK;
521     unsigned char     FrameRate;
522     unsigned char     Interlace;
523     unsigned short    Margin;
524 };
525 
526 #define _VB_STRUCT_
527 #endif /* _VB_STRUCT_ */
528