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