ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / video / sis / vstruct.h
1 /* $XFree86$ */
2 /*
3  * General structure definitions for universal mode switching modules
4  *
5  * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
6  *
7  * If distributed as part of the Linux kernel, the following license terms
8  * apply:
9  *
10  * * This program is free software; you can redistribute it and/or modify
11  * * it under the terms of the GNU General Public License as published by
12  * * the Free Software Foundation; either version 2 of the named License,
13  * * or any later version.
14  * *
15  * * This program is distributed in the hope that it will be useful,
16  * * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * * GNU General Public License for more details.
19  * *
20  * * You should have received a copy of the GNU General Public License
21  * * along with this program; if not, write to the Free Software
22  * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
23  *
24  * Otherwise, the following license terms apply:
25  *
26  * * Redistribution and use in source and binary forms, with or without
27  * * modification, are permitted provided that the following conditions
28  * * are met:
29  * * 1) Redistributions of source code must retain the above copyright
30  * *    notice, this list of conditions and the following disclaimer.
31  * * 2) Redistributions in binary form must reproduce the above copyright
32  * *    notice, this list of conditions and the following disclaimer in the
33  * *    documentation and/or other materials provided with the distribution.
34  * * 3) All advertising materials mentioning features or use of this software
35  * *    must display the following acknowledgement: "This product includes
36  * *    software developed by Thomas Winischhofer, Vienna, Austria."
37  * * 4) The name of the author may not be used to endorse or promote products
38  * *    derived from this software without specific prior written permission.
39  * *
40  * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
41  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
42  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
43  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
44  * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45  * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
46  * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
47  * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48  * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
49  * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50  *
51  * Author:      Thomas Winischhofer <thomas@winischhofer.net>
52  *
53  */
54
55 #ifdef _INIT_
56 #define EXTERN
57 #else
58 #define EXTERN extern
59 #endif /* _INIT_ */
60
61 #ifndef _VSTRUCT_
62 #define _VSTRUCT_
63
64 typedef struct _SiS_PanelDelayTblStruct
65 {
66         UCHAR timer[2];
67 } SiS_PanelDelayTblStruct;
68
69 typedef struct _SiS_LCDDataStruct
70 {
71         USHORT RVBHCMAX;
72         USHORT RVBHCFACT;
73         USHORT VGAHT;
74         USHORT VGAVT;
75         USHORT LCDHT;
76         USHORT LCDVT;
77 } SiS_LCDDataStruct;
78
79 typedef struct _SiS_TVDataStruct
80 {
81         USHORT RVBHCMAX;
82         USHORT RVBHCFACT;
83         USHORT VGAHT;
84         USHORT VGAVT;
85         USHORT TVHDE;
86         USHORT TVVDE;
87         USHORT RVBHRS;
88         UCHAR  FlickerMode;
89         USHORT HALFRVBHRS;
90         UCHAR  RY1COE;
91         UCHAR  RY2COE;
92         UCHAR  RY3COE;
93         UCHAR  RY4COE;
94 } SiS_TVDataStruct;
95
96 typedef struct _SiS_LVDSDataStruct
97 {
98         USHORT VGAHT;
99         USHORT VGAVT;
100         USHORT LCDHT;
101         USHORT LCDVT;
102 } SiS_LVDSDataStruct;
103
104 typedef struct _SiS_LVDSDesStruct
105 {
106         USHORT LCDHDES;
107         USHORT LCDVDES;
108 } SiS_LVDSDesStruct;
109
110 typedef struct _SiS_LVDSCRT1DataStruct
111 {
112         UCHAR  CR[15];
113 } SiS_LVDSCRT1DataStruct;
114
115 typedef struct _SiS_LCDACRT1DataStruct
116 {
117         UCHAR  CR[17];
118 } SiS_LCDACRT1DataStruct;
119
120 typedef struct _SiS_CHTVRegDataStruct
121 {
122         UCHAR  Reg[16];
123 } SiS_CHTVRegDataStruct;
124
125 typedef struct _SiS_StStruct
126 {
127         UCHAR  St_ModeID;
128         USHORT St_ModeFlag;
129         UCHAR  St_StTableIndex;
130         UCHAR  St_CRT2CRTC;
131         UCHAR  St_ResInfo;
132         UCHAR  VB_StTVFlickerIndex;
133         UCHAR  VB_StTVEdgeIndex;
134         UCHAR  VB_StTVYFilterIndex;
135         UCHAR  St_PDC;
136 } SiS_StStruct;
137
138 typedef struct _SiS_VBModeStruct
139 {
140         UCHAR  ModeID;
141         UCHAR  VB_TVDelayIndex;
142         UCHAR  VB_TVFlickerIndex;
143         UCHAR  VB_TVPhaseIndex;
144         UCHAR  VB_TVYFilterIndex;
145         UCHAR  VB_LCDDelayIndex;
146         UCHAR  _VB_LCDHIndex;
147         UCHAR  _VB_LCDVIndex;
148 } SiS_VBModeStruct;
149
150 typedef struct _SiS_StandTableStruct
151 {
152         UCHAR  CRT_COLS;
153         UCHAR  ROWS;
154         UCHAR  CHAR_HEIGHT;
155         USHORT CRT_LEN;
156         UCHAR  SR[4];
157         UCHAR  MISC;
158         UCHAR  CRTC[0x19];
159         UCHAR  ATTR[0x14];
160         UCHAR  GRC[9];
161 } SiS_StandTableStruct;
162
163 typedef struct _SiS_ExtStruct
164 {
165         UCHAR  Ext_ModeID;
166         USHORT Ext_ModeFlag;
167         UCHAR  Ext_ModeOffset;
168         USHORT Ext_VESAID;
169         UCHAR  Ext_RESINFO;
170         UCHAR  VB_ExtTVFlickerIndex;
171         UCHAR  VB_ExtTVEdgeIndex;
172         UCHAR  VB_ExtTVYFilterIndex;
173         UCHAR  VB_ExtTVYFilterIndexROM661;
174         UCHAR  REFindex;
175 } SiS_ExtStruct;
176
177 typedef struct _SiS_Ext2Struct
178 {
179         USHORT Ext_InfoFlag;
180         UCHAR  Ext_CRT1CRTC;
181         UCHAR  Ext_CRTVCLK;
182         UCHAR  Ext_CRT2CRTC;
183         UCHAR  ModeID;
184         USHORT XRes;
185         USHORT YRes;
186         UCHAR  Ext_PDC;
187 } SiS_Ext2Struct;
188
189 typedef struct _SiS_Part2PortTblStruct
190 {
191         UCHAR  CR[12];
192 } SiS_Part2PortTblStruct;
193
194 typedef struct _SiS_CRT1TableStruct
195 {
196         UCHAR  CR[17];
197 } SiS_CRT1TableStruct;
198
199 typedef struct _SiS_MCLKDataStruct
200 {
201         UCHAR  SR28,SR29,SR2A;
202         USHORT CLOCK;
203 } SiS_MCLKDataStruct;
204
205 typedef struct _SiS_VCLKDataStruct
206 {
207         UCHAR  SR2B,SR2C;
208         USHORT CLOCK;
209 } SiS_VCLKDataStruct;
210
211 typedef struct _SiS_VBVCLKDataStruct
212 {
213         UCHAR  Part4_A,Part4_B;
214         USHORT CLOCK;
215 } SiS_VBVCLKDataStruct;
216
217 typedef struct _SiS_StResInfoStruct
218 {
219         USHORT HTotal;
220         USHORT VTotal;
221 } SiS_StResInfoStruct;
222
223 typedef struct _SiS_ModeResInfoStruct
224 {
225         USHORT HTotal;
226         USHORT VTotal;
227         UCHAR  XChar;
228         UCHAR  YChar;
229 } SiS_ModeResInfoStruct;
230
231 typedef UCHAR DRAM4Type[4];
232
233 /* Defines for SiS_CustomT */
234 /* Never change these for sisfb compatibility */
235 #define CUT_NONE          0
236 #define CUT_FORCENONE     1
237 #define CUT_BARCO1366     2
238 #define CUT_BARCO1024     3
239 #define CUT_COMPAQ1280    4
240 #define CUT_COMPAQ12802   5
241 #define CUT_PANEL848      6
242 #define CUT_CLEVO1024     7
243 #define CUT_CLEVO10242    8
244 #define CUT_CLEVO1400     9
245 #define CUT_CLEVO14002    10
246 #define CUT_UNIWILL1024   11
247 #define CUT_ASUSL3000D    12
248 #define CUT_UNIWILL10242  13
249 #define CUT_ACER1280      14
250 #define CUT_COMPAL1400_1  15
251 #define CUT_COMPAL1400_2  16
252 #define CUT_ASUSA2H_1     17
253 #define CUT_ASUSA2H_2     18
254
255 typedef struct _SiS_Private
256 {
257 #ifdef LINUX_KERNEL
258         SISIOADDRESS RelIO;
259 #endif
260         SISIOADDRESS SiS_P3c4;
261         SISIOADDRESS SiS_P3d4;
262         SISIOADDRESS SiS_P3c0;
263         SISIOADDRESS SiS_P3ce;
264         SISIOADDRESS SiS_P3c2;
265         SISIOADDRESS SiS_P3ca;
266         SISIOADDRESS SiS_P3c6;
267         SISIOADDRESS SiS_P3c7;
268         SISIOADDRESS SiS_P3c8;
269         SISIOADDRESS SiS_P3c9;
270         SISIOADDRESS SiS_P3cb;
271         SISIOADDRESS SiS_P3cd;
272         SISIOADDRESS SiS_P3da;
273         SISIOADDRESS SiS_Part1Port;
274         SISIOADDRESS SiS_Part2Port;
275         SISIOADDRESS SiS_Part3Port;
276         SISIOADDRESS SiS_Part4Port;
277         SISIOADDRESS SiS_Part5Port;
278         SISIOADDRESS SiS_VidCapt;
279         SISIOADDRESS SiS_VidPlay;
280         USHORT SiS_IF_DEF_LVDS;
281         USHORT SiS_IF_DEF_CH70xx;
282         USHORT SiS_IF_DEF_CONEX;
283         USHORT SiS_IF_DEF_TRUMPION;
284         USHORT SiS_IF_DEF_DSTN;
285         USHORT SiS_IF_DEF_FSTN;
286         USHORT SiS_SysFlags;
287         UCHAR  SiS_VGAINFO;
288 #ifndef LINUX_KERNEL
289         USHORT SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
290 #endif
291         BOOLEAN SiS_UseROM;
292         int    SiS_CHOverScan;
293         BOOLEAN SiS_CHSOverScan;
294         BOOLEAN SiS_ChSW;
295         BOOLEAN SiS_UseLCDA;
296         int    SiS_UseOEM;
297         ULONG  SiS_CustomT;
298         USHORT SiS_Backup70xx;
299         BOOLEAN HaveEMI;
300         BOOLEAN HaveEMILCD;
301         BOOLEAN OverruleEMI;
302         UCHAR  EMI_30,EMI_31,EMI_32,EMI_33;
303         UCHAR  PDC;
304         UCHAR  SiS_MyCR63;
305         USHORT SiS_CRT1Mode;
306         USHORT SiS_flag_clearbuffer;
307         int    SiS_RAMType;
308         UCHAR  SiS_ChannelAB;
309         UCHAR  SiS_DataBusWidth;
310         USHORT SiS_ModeType;
311         USHORT SiS_VBInfo;
312         USHORT SiS_TVMode;
313         USHORT SiS_LCDResInfo;
314         USHORT SiS_LCDTypeInfo;
315         USHORT SiS_LCDInfo;
316         USHORT SiS_LCDInfo661;
317         USHORT SiS_VBType;
318         USHORT SiS_VBExtInfo;
319         USHORT SiS_YPbPr;
320         USHORT SiS_SelectCRT2Rate;
321         USHORT SiS_SetFlag;
322         USHORT SiS_RVBHCFACT;
323         USHORT SiS_RVBHCMAX;
324         USHORT SiS_RVBHRS;
325         USHORT SiS_VGAVT;
326         USHORT SiS_VGAHT;
327         USHORT SiS_VT;
328         USHORT SiS_HT;
329         USHORT SiS_VGAVDE;
330         USHORT SiS_VGAHDE;
331         USHORT SiS_VDE;
332         USHORT SiS_HDE;
333         USHORT SiS_NewFlickerMode;
334         USHORT SiS_RY1COE;
335         USHORT SiS_RY2COE;
336         USHORT SiS_RY3COE;
337         USHORT SiS_RY4COE;
338         USHORT SiS_LCDHDES;
339         USHORT SiS_LCDVDES;
340         USHORT SiS_DDC_Port;
341         USHORT SiS_DDC_Index;
342         USHORT SiS_DDC_Data;
343         USHORT SiS_DDC_NData;
344         USHORT SiS_DDC_Clk;
345         USHORT SiS_DDC_NClk;
346         USHORT SiS_DDC_DeviceAddr;
347         USHORT SiS_DDC_ReadAddr;
348         USHORT SiS_DDC_SecAddr;
349         BOOLEAN SiS_SensibleSR11;
350         USHORT SiS_Panel800x600;
351         USHORT SiS_Panel1024x768;
352         USHORT SiS_Panel1280x1024;
353         USHORT SiS_Panel1600x1200;
354         USHORT SiS_Panel1280x960;
355         USHORT SiS_Panel1400x1050;
356         USHORT SiS_Panel320x480;
357         USHORT SiS_Panel1152x768;
358         USHORT SiS_Panel1280x768;
359         USHORT SiS_Panel1024x600;
360         USHORT SiS_Panel640x480;
361         USHORT SiS_Panel640x480_2;
362         USHORT SiS_Panel640x480_3;
363         USHORT SiS_Panel1152x864;
364         USHORT SiS_PanelCustom;
365         USHORT SiS_PanelBarco1366;
366         USHORT SiS_PanelMax;
367         USHORT SiS_PanelMinLVDS;
368         USHORT SiS_PanelMin301;
369         USHORT SiS_ChrontelInit;
370         
371         const SiS_StStruct          *SiS_SModeIDTable;
372         SiS_StandTableStruct        *SiS_StandTable;
373         const SiS_ExtStruct         *SiS_EModeIDTable;
374         const SiS_Ext2Struct        *SiS_RefIndex;
375         const SiS_VBModeStruct      *SiS_VBModeIDTable;
376         const SiS_CRT1TableStruct   *SiS_CRT1Table;
377         const SiS_MCLKDataStruct    *SiS_MCLKData_0;
378         const SiS_MCLKDataStruct    *SiS_MCLKData_1;
379         const SiS_VCLKDataStruct    *SiS_VCLKData;
380         const SiS_VBVCLKDataStruct  *SiS_VBVCLKData;
381         const SiS_StResInfoStruct   *SiS_StResInfo;
382         const SiS_ModeResInfoStruct *SiS_ModeResInfo;
383         const UCHAR                 *SiS_ScreenOffset;
384
385         const UCHAR                 *pSiS_OutputSelect;
386         const UCHAR                 *pSiS_SoftSetting;
387
388         const DRAM4Type *SiS_SR15; /* pointer : point to array */
389 #ifndef LINUX_XF86
390         UCHAR *pSiS_SR07;
391         const DRAM4Type *SiS_CR40; /* pointer : point to array */
392         UCHAR *SiS_CR49;
393         UCHAR *SiS_SR25;
394         UCHAR *pSiS_SR1F;
395         UCHAR *pSiS_SR21;
396         UCHAR *pSiS_SR22;
397         UCHAR *pSiS_SR23;
398         UCHAR *pSiS_SR24;
399         UCHAR *pSiS_SR31;
400         UCHAR *pSiS_SR32;
401         UCHAR *pSiS_SR33;
402         UCHAR *pSiS_CRT2Data_1_2;
403         UCHAR *pSiS_CRT2Data_4_D;
404         UCHAR *pSiS_CRT2Data_4_E;
405         UCHAR *pSiS_CRT2Data_4_10;
406         const USHORT *pSiS_RGBSenseData;
407         const USHORT *pSiS_VideoSenseData;
408         const USHORT *pSiS_YCSenseData;
409         const USHORT *pSiS_RGBSenseData2;
410         const USHORT *pSiS_VideoSenseData2;
411         const USHORT *pSiS_YCSenseData2;
412 #endif
413         const UCHAR *SiS_NTSCPhase;
414         const UCHAR *SiS_PALPhase;
415         const UCHAR *SiS_NTSCPhase2;
416         const UCHAR *SiS_PALPhase2;
417         const UCHAR *SiS_PALMPhase;
418         const UCHAR *SiS_PALNPhase;
419         const UCHAR *SiS_PALMPhase2;
420         const UCHAR *SiS_PALNPhase2;
421         const UCHAR *SiS_SpecialPhase;
422         const UCHAR *SiS_SpecialPhaseM;
423         const UCHAR *SiS_SpecialPhaseJ;
424         const SiS_LCDDataStruct  *SiS_StLCD1024x768Data;
425         const SiS_LCDDataStruct  *SiS_ExtLCD1024x768Data;
426         const SiS_LCDDataStruct  *SiS_St2LCD1024x768Data;
427         const SiS_LCDDataStruct  *SiS_StLCD1280x1024Data;
428         const SiS_LCDDataStruct  *SiS_ExtLCD1280x1024Data;
429         const SiS_LCDDataStruct  *SiS_St2LCD1280x1024Data;
430         const SiS_LCDDataStruct  *SiS_NoScaleData1024x768;
431         const SiS_LCDDataStruct  *SiS_NoScaleData1280x1024;
432         const SiS_LCDDataStruct  *SiS_LCD1280x960Data;
433         const SiS_LCDDataStruct  *SiS_NoScaleData1400x1050;
434         const SiS_LCDDataStruct  *SiS_NoScaleData1600x1200;
435         const SiS_LCDDataStruct  *SiS_NoScaleData1280x768;
436         const SiS_LCDDataStruct  *SiS_StLCD1400x1050Data;
437         const SiS_LCDDataStruct  *SiS_StLCD1600x1200Data;
438         const SiS_LCDDataStruct  *SiS_StLCD1280x768Data;
439         const SiS_LCDDataStruct  *SiS_ExtLCD1400x1050Data;
440         const SiS_LCDDataStruct  *SiS_ExtLCD1600x1200Data;
441         const SiS_LCDDataStruct  *SiS_ExtLCD1280x768Data;
442         const SiS_LCDDataStruct  *SiS_NoScaleData;
443         const SiS_TVDataStruct   *SiS_StPALData;
444         const SiS_TVDataStruct   *SiS_ExtPALData;
445         const SiS_TVDataStruct   *SiS_StNTSCData;
446         const SiS_TVDataStruct   *SiS_ExtNTSCData;
447         const SiS_TVDataStruct   *SiS_St1HiTVData;
448         const SiS_TVDataStruct   *SiS_St2HiTVData;
449         const SiS_TVDataStruct   *SiS_ExtHiTVData;
450         const SiS_TVDataStruct   *SiS_St525iData;
451         const SiS_TVDataStruct   *SiS_St525pData;
452         const SiS_TVDataStruct   *SiS_St750pData;
453         const SiS_TVDataStruct   *SiS_Ext525iData;
454         const SiS_TVDataStruct   *SiS_Ext525pData;
455         const SiS_TVDataStruct   *SiS_Ext750pData;
456         const UCHAR *SiS_NTSCTiming;
457         const UCHAR *SiS_PALTiming;
458         const UCHAR *SiS_HiTVExtTiming;
459         const UCHAR *SiS_HiTVSt1Timing;
460         const UCHAR *SiS_HiTVSt2Timing;
461         const UCHAR *SiS_HiTVGroup3Data;
462         const UCHAR *SiS_HiTVGroup3Simu;
463 #if 0
464         const UCHAR *SiS_HiTVTextTiming;
465         const UCHAR *SiS_HiTVGroup3Text;
466 #endif
467         const SiS_PanelDelayTblStruct *SiS_PanelDelayTbl;
468         const SiS_PanelDelayTblStruct *SiS_PanelDelayTblLVDS;
469         const SiS_LVDSDataStruct  *SiS_LVDS800x600Data_1;
470         const SiS_LVDSDataStruct  *SiS_LVDS800x600Data_2;
471         const SiS_LVDSDataStruct  *SiS_LVDS1024x768Data_1;
472         const SiS_LVDSDataStruct  *SiS_LVDS1024x768Data_2;
473         const SiS_LVDSDataStruct  *SiS_LVDS1280x1024Data_1;
474         const SiS_LVDSDataStruct  *SiS_LVDS1280x1024Data_2;
475         const SiS_LVDSDataStruct  *SiS_LVDS1280x960Data_1;
476         const SiS_LVDSDataStruct  *SiS_LVDS1280x960Data_2;
477         const SiS_LVDSDataStruct  *SiS_LVDS1400x1050Data_1;
478         const SiS_LVDSDataStruct  *SiS_LVDS1400x1050Data_2;
479         const SiS_LVDSDataStruct  *SiS_LVDS1600x1200Data_1;
480         const SiS_LVDSDataStruct  *SiS_LVDS1600x1200Data_2;
481         const SiS_LVDSDataStruct  *SiS_LVDS1280x768Data_1;
482         const SiS_LVDSDataStruct  *SiS_LVDS1280x768Data_2;
483         const SiS_LVDSDataStruct  *SiS_LVDS1024x600Data_1;
484         const SiS_LVDSDataStruct  *SiS_LVDS1024x600Data_2;
485         const SiS_LVDSDataStruct  *SiS_LVDS1152x768Data_1;
486         const SiS_LVDSDataStruct  *SiS_LVDS1152x768Data_2;
487         const SiS_LVDSDataStruct  *SiS_LVDS640x480Data_1;
488         const SiS_LVDSDataStruct  *SiS_LVDS640x480Data_2;
489         const SiS_LVDSDataStruct  *SiS_LVDS320x480Data_1;
490         const SiS_LVDSDataStruct  *SiS_LCDA1024x768Data_1;
491         const SiS_LVDSDataStruct  *SiS_LCDA1024x768Data_2;
492         const SiS_LVDSDataStruct  *SiS_LCDA1280x1024Data_1;
493         const SiS_LVDSDataStruct  *SiS_LCDA1280x1024Data_2;
494         const SiS_LVDSDataStruct  *SiS_LCDA1400x1050Data_1;
495         const SiS_LVDSDataStruct  *SiS_LCDA1400x1050Data_2;
496         const SiS_LVDSDataStruct  *SiS_LCDA1600x1200Data_1;
497         const SiS_LVDSDataStruct  *SiS_LCDA1600x1200Data_2;
498         const SiS_LVDSDataStruct  *SiS_LVDSXXXxXXXData_1;
499         const SiS_LVDSDataStruct  *SiS_LVDSBARCO1366Data_1;
500         const SiS_LVDSDataStruct  *SiS_LVDSBARCO1366Data_2;
501         const SiS_LVDSDataStruct  *SiS_LVDSBARCO1024Data_1;
502         const SiS_LVDSDataStruct  *SiS_LVDSBARCO1024Data_2;
503         const SiS_LVDSDataStruct  *SiS_LVDS848x480Data_1;
504         const SiS_LVDSDataStruct  *SiS_LVDS848x480Data_2;
505         const SiS_LVDSDataStruct  *SiS_CHTVUNTSCData;
506         const SiS_LVDSDataStruct  *SiS_CHTVONTSCData;
507         const SiS_LVDSDataStruct  *SiS_CHTVUPALData;
508         const SiS_LVDSDataStruct  *SiS_CHTVOPALData;
509         const SiS_LVDSDataStruct  *SiS_CHTVUPALMData;
510         const SiS_LVDSDataStruct  *SiS_CHTVOPALMData;
511         const SiS_LVDSDataStruct  *SiS_CHTVUPALNData;
512         const SiS_LVDSDataStruct  *SiS_CHTVOPALNData;
513         const SiS_LVDSDataStruct  *SiS_CHTVSOPALData;
514         const SiS_LVDSDesStruct  *SiS_PanelType00_1;
515         const SiS_LVDSDesStruct  *SiS_PanelType01_1;
516         const SiS_LVDSDesStruct  *SiS_PanelType02_1;
517         const SiS_LVDSDesStruct  *SiS_PanelType03_1;
518         const SiS_LVDSDesStruct  *SiS_PanelType04_1;
519         const SiS_LVDSDesStruct  *SiS_PanelType05_1;
520         const SiS_LVDSDesStruct  *SiS_PanelType06_1;
521         const SiS_LVDSDesStruct  *SiS_PanelType07_1;
522         const SiS_LVDSDesStruct  *SiS_PanelType08_1;
523         const SiS_LVDSDesStruct  *SiS_PanelType09_1;
524         const SiS_LVDSDesStruct  *SiS_PanelType0a_1;
525         const SiS_LVDSDesStruct  *SiS_PanelType0b_1;
526         const SiS_LVDSDesStruct  *SiS_PanelType0c_1;
527         const SiS_LVDSDesStruct  *SiS_PanelType0d_1;
528         const SiS_LVDSDesStruct  *SiS_PanelType0e_1;
529         const SiS_LVDSDesStruct  *SiS_PanelType0f_1;
530         const SiS_LVDSDesStruct  *SiS_PanelTypeNS_1;
531         const SiS_LVDSDesStruct  *SiS_PanelType00_2;
532         const SiS_LVDSDesStruct  *SiS_PanelType01_2;
533         const SiS_LVDSDesStruct  *SiS_PanelType02_2;
534         const SiS_LVDSDesStruct  *SiS_PanelType03_2;
535         const SiS_LVDSDesStruct  *SiS_PanelType04_2;
536         const SiS_LVDSDesStruct  *SiS_PanelType05_2;
537         const SiS_LVDSDesStruct  *SiS_PanelType06_2;
538         const SiS_LVDSDesStruct  *SiS_PanelType07_2;
539         const SiS_LVDSDesStruct  *SiS_PanelType08_2;
540         const SiS_LVDSDesStruct  *SiS_PanelType09_2;
541         const SiS_LVDSDesStruct  *SiS_PanelType0a_2;
542         const SiS_LVDSDesStruct  *SiS_PanelType0b_2;
543         const SiS_LVDSDesStruct  *SiS_PanelType0c_2;
544         const SiS_LVDSDesStruct  *SiS_PanelType0d_2;
545         const SiS_LVDSDesStruct  *SiS_PanelType0e_2;
546         const SiS_LVDSDesStruct  *SiS_PanelType0f_2;
547         const SiS_LVDSDesStruct  *SiS_PanelTypeNS_2;
548
549         const SiS_LVDSDesStruct  *LVDS1024x768Des_1;
550         const SiS_LVDSDesStruct  *LVDS1280x1024Des_1;
551         const SiS_LVDSDesStruct  *LVDS1400x1050Des_1;
552         const SiS_LVDSDesStruct  *LVDS1600x1200Des_1;
553         const SiS_LVDSDesStruct  *LVDS1024x768Des_2;
554         const SiS_LVDSDesStruct  *LVDS1280x1024Des_2;
555         const SiS_LVDSDesStruct  *LVDS1400x1050Des_2;
556         const SiS_LVDSDesStruct  *LVDS1600x1200Des_2;
557
558         const SiS_LVDSDesStruct  *SiS_CHTVUNTSCDesData;
559         const SiS_LVDSDesStruct  *SiS_CHTVONTSCDesData;
560         const SiS_LVDSDesStruct  *SiS_CHTVUPALDesData;
561         const SiS_LVDSDesStruct  *SiS_CHTVOPALDesData;
562         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1800x600_1;
563         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x768_1;
564         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x1024_1;
565         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11400x1050_1;
566         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x768_1;
567         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x600_1;
568         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11152x768_1;
569         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11600x1200_1;
570         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1800x600_1_H;
571         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x768_1_H;
572         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x1024_1_H;
573         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11400x1050_1_H;
574         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x768_1_H;
575         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x600_1_H;
576         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11152x768_1_H;
577         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11600x1200_1_H;
578         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1800x600_2;
579         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x768_2;
580         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x1024_2;
581         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11400x1050_2;
582         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x768_2;
583         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x600_2;
584         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11152x768_2;
585         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11600x1200_2;
586         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1800x600_2_H;
587         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x768_2_H;
588         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x1024_2_H;
589         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11400x1050_2_H;
590         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x768_2_H;
591         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x600_2_H;
592         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11152x768_2_H;
593         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11600x1200_2_H;
594         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1XXXxXXX_1;
595         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1XXXxXXX_1_H;
596         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_1;
597         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_1_H;
598         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_2;
599         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_2_H;
600         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_3;
601         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_3_H;
602         const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1UNTSC;
603         const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1ONTSC;
604         const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1UPAL;
605         const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1OPAL;
606         const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1SOPAL;
607
608         const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1320x480_1;
609
610         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_1;
611         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_1;
612         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_1;
613         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_1;
614         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_1_H;
615         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_1_H;
616         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_1_H;
617         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_1_H;
618         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_2;
619         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_2;
620         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_2;
621         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_2;
622         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_2_H;
623         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_2_H;
624         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_2_H;
625         const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_2_H;
626
627         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_1;
628         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_1;
629         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1400x1050_1;
630         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1600x1200_1;
631         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_2;
632         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_2;
633         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1400x1050_2;
634         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1600x1200_2;
635         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_3;
636         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_3;
637         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1400x1050_3;
638         const SiS_Part2PortTblStruct *SiS_CRT2Part2_1600x1200_3;
639
640         const SiS_CHTVRegDataStruct *SiS_CHTVReg_UNTSC;
641         const SiS_CHTVRegDataStruct *SiS_CHTVReg_ONTSC;
642         const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPAL;
643         const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPAL;
644         const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPALM;
645         const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPALM;
646         const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPALN;
647         const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPALN;
648         const SiS_CHTVRegDataStruct *SiS_CHTVReg_SOPAL;
649         const UCHAR *SiS_CHTVVCLKUNTSC;
650         const UCHAR *SiS_CHTVVCLKONTSC;
651         const UCHAR *SiS_CHTVVCLKUPAL;
652         const UCHAR *SiS_CHTVVCLKOPAL;
653         const UCHAR *SiS_CHTVVCLKUPALM;
654         const UCHAR *SiS_CHTVVCLKOPALM;
655         const UCHAR *SiS_CHTVVCLKUPALN;
656         const UCHAR *SiS_CHTVVCLKOPALN;
657         const UCHAR *SiS_CHTVVCLKSOPAL;
658
659         USHORT  PanelXRes;
660         USHORT  PanelYRes;
661         
662         BOOLEAN UseCustomMode;
663         BOOLEAN CRT1UsesCustomMode;
664         USHORT  CHDisplay;
665         USHORT  CHSyncStart;
666         USHORT  CHSyncEnd;
667         USHORT  CHTotal;
668         USHORT  CHBlankStart;
669         USHORT  CHBlankEnd;
670         USHORT  CVDisplay;
671         USHORT  CVSyncStart;
672         USHORT  CVSyncEnd;
673         USHORT  CVTotal;
674         USHORT  CVBlankStart;
675         USHORT  CVBlankEnd;
676         ULONG   CDClock;
677         ULONG   CFlags;   
678         UCHAR   CCRT1CRTC[17];
679         UCHAR   CSR2B;
680         UCHAR   CSR2C;
681         USHORT  CSRClock;
682         USHORT  CSRClock_CRT1;
683         USHORT  CModeFlag;
684         USHORT  CModeFlag_CRT1;
685         USHORT  CInfoFlag;
686
687         int     LVDSHL;
688         
689         BOOLEAN Backup;
690         UCHAR Backup_Mode;
691         UCHAR Backup_14;
692         UCHAR Backup_15;
693         UCHAR Backup_16;
694         UCHAR Backup_17;
695         UCHAR Backup_18;
696         UCHAR Backup_19;
697         UCHAR Backup_1a;
698         UCHAR Backup_1b;
699         UCHAR Backup_1c;
700         UCHAR Backup_1d;
701         
702         int     UsePanelScaler;
703
704         USHORT  CP_Vendor, CP_Product;
705         BOOLEAN CP_HaveCustomData;
706         int     CP_PreferredX, CP_PreferredY;
707         int     CP_MaxX, CP_MaxY, CP_MaxClock;
708         BOOLEAN CP_Supports64048075;
709         int     CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */
710         int     CP_HTotal[7], CP_VTotal[7];
711         int     CP_HSyncStart[7], CP_VSyncStart[7];
712         int     CP_HSyncEnd[7], CP_VSyncEnd[7];
713         int     CP_HBlankStart[7], CP_VBlankStart[7];
714         int     CP_HBlankEnd[7], CP_VBlankEnd[7];
715         int     CP_Clock[7];
716         BOOLEAN CP_DataValid[7];
717         BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
718 } SiS_Private;
719
720 #endif
721