aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sis/vstruct.h
diff options
context:
space:
mode:
authorThomas Winischhofer <thomas@winischhofer.net>2005-09-09 16:04:45 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:58:01 -0400
commit544393fe584d333480659a4bed30f5295355df11 (patch)
tree873b30c67cdbb5cb93e6fd816692db312ed6ddd6 /drivers/video/sis/vstruct.h
parent5c06e2aa6339112befdc87b350b8bf712890d7a7 (diff)
[PATCH] sisfb update
This lifts sisfb from version 1.7.17 to version 1.8.9. Changes include: - Added support for XGI V3XT, V5, V8, Z7 chipsets, including POSTing of all of these chipsets. - Added support for latest SiS chipsets (761). - Added support for SiS76x memory "hybrid" mode. - Added support for new LCD resolutions (eg 1280x854, 856x480). - Fixed support for 320x240 STN panels (for embedded devices). - Fixed many HDTV modes (525p, 750p, 1080i). - Fixed PCI config register reading/writing to use proper kernel functions for this purpose. - Fixed PCI ROM handling to use the kernel's proper functions. - Removed lots of "typedef"s. - Removed lots of code which was for X.org/XFree86 only. - Fixed coding style in many places. - Removed lots of 2.4 cruft. - Reduced stack size by unifying two previously separate structs into one. - Added new hooks for memory allocation (for DRM). Now the driver can truly handle multiple cards, including memory management. - Fixed numerous minor bugs. Signed-off-by: Thomas Winischhofer <thomas@winischhofer.net> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/sis/vstruct.h')
-rw-r--r--drivers/video/sis/vstruct.h1097
1 files changed, 492 insertions, 605 deletions
diff --git a/drivers/video/sis/vstruct.h b/drivers/video/sis/vstruct.h
index d4d55c98bce6..9ae32923c142 100644
--- a/drivers/video/sis/vstruct.h
+++ b/drivers/video/sis/vstruct.h
@@ -3,7 +3,7 @@
3/* 3/*
4 * General structure definitions for universal mode switching modules 4 * General structure definitions for universal mode switching modules
5 * 5 *
6 * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria 6 * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
7 * 7 *
8 * If distributed as part of the Linux kernel, the following license terms 8 * If distributed as part of the Linux kernel, the following license terms
9 * apply: 9 * apply:
@@ -50,627 +50,514 @@
50 * 50 *
51 */ 51 */
52 52
53#ifndef _VSTRUCT_ 53#ifndef _VSTRUCT_H_
54#define _VSTRUCT_ 54#define _VSTRUCT_H_
55 55
56typedef struct _SiS_PanelDelayTblStruct 56struct SiS_PanelDelayTbl {
57{ 57 unsigned char timer[2];
58 UCHAR timer[2]; 58};
59} SiS_PanelDelayTblStruct; 59
60 60struct SiS_LCDData {
61typedef struct _SiS_LCDDataStruct 61 unsigned short RVBHCMAX;
62{ 62 unsigned short RVBHCFACT;
63 USHORT RVBHCMAX; 63 unsigned short VGAHT;
64 USHORT RVBHCFACT; 64 unsigned short VGAVT;
65 USHORT VGAHT; 65 unsigned short LCDHT;
66 USHORT VGAVT; 66 unsigned short LCDVT;
67 USHORT LCDHT; 67};
68 USHORT LCDVT; 68
69} SiS_LCDDataStruct; 69struct SiS_TVData {
70 70 unsigned short RVBHCMAX;
71typedef struct _SiS_TVDataStruct 71 unsigned short RVBHCFACT;
72{ 72 unsigned short VGAHT;
73 USHORT RVBHCMAX; 73 unsigned short VGAVT;
74 USHORT RVBHCFACT; 74 unsigned short TVHDE;
75 USHORT VGAHT; 75 unsigned short TVVDE;
76 USHORT VGAVT; 76 unsigned short RVBHRS;
77 USHORT TVHDE; 77 unsigned char FlickerMode;
78 USHORT TVVDE; 78 unsigned short HALFRVBHRS;
79 USHORT RVBHRS; 79 unsigned short RVBHRS2;
80 UCHAR FlickerMode; 80 unsigned char RY1COE;
81 USHORT HALFRVBHRS; 81 unsigned char RY2COE;
82 UCHAR RY1COE; 82 unsigned char RY3COE;
83 UCHAR RY2COE; 83 unsigned char RY4COE;
84 UCHAR RY3COE; 84};
85 UCHAR RY4COE; 85
86} SiS_TVDataStruct; 86struct SiS_LVDSData {
87 87 unsigned short VGAHT;
88typedef struct _SiS_LVDSDataStruct 88 unsigned short VGAVT;
89{ 89 unsigned short LCDHT;
90 USHORT VGAHT; 90 unsigned short LCDVT;
91 USHORT VGAVT; 91};
92 USHORT LCDHT; 92
93 USHORT LCDVT; 93struct SiS_LVDSDes {
94} SiS_LVDSDataStruct; 94 unsigned short LCDHDES;
95 95 unsigned short LCDVDES;
96typedef struct _SiS_LVDSDesStruct 96};
97{ 97
98 USHORT LCDHDES; 98struct SiS_LVDSCRT1Data {
99 USHORT LCDVDES; 99 unsigned char CR[15];
100} SiS_LVDSDesStruct; 100};
101 101
102typedef struct _SiS_LVDSCRT1DataStruct 102struct SiS_CHTVRegData {
103{ 103 unsigned char Reg[16];
104 UCHAR CR[15]; 104};
105} SiS_LVDSCRT1DataStruct; 105
106 106struct SiS_St {
107typedef struct _SiS_LCDACRT1DataStruct 107 unsigned char St_ModeID;
108{ 108 unsigned short St_ModeFlag;
109 UCHAR CR[17]; 109 unsigned char St_StTableIndex;
110} SiS_LCDACRT1DataStruct; 110 unsigned char St_CRT2CRTC;
111 111 unsigned char St_ResInfo;
112typedef struct _SiS_CHTVRegDataStruct 112 unsigned char VB_StTVFlickerIndex;
113{ 113 unsigned char VB_StTVEdgeIndex;
114 UCHAR Reg[16]; 114 unsigned char VB_StTVYFilterIndex;
115} SiS_CHTVRegDataStruct; 115 unsigned char St_PDC;
116 116};
117typedef struct _SiS_StStruct 117
118{ 118struct SiS_VBMode {
119 UCHAR St_ModeID; 119 unsigned char ModeID;
120 USHORT St_ModeFlag; 120 unsigned char VB_TVDelayIndex;
121 UCHAR St_StTableIndex; 121 unsigned char VB_TVFlickerIndex;
122 UCHAR St_CRT2CRTC; 122 unsigned char VB_TVPhaseIndex;
123 UCHAR St_ResInfo; 123 unsigned char VB_TVYFilterIndex;
124 UCHAR VB_StTVFlickerIndex; 124 unsigned char VB_LCDDelayIndex;
125 UCHAR VB_StTVEdgeIndex; 125 unsigned char _VB_LCDHIndex;
126 UCHAR VB_StTVYFilterIndex; 126 unsigned char _VB_LCDVIndex;
127 UCHAR St_PDC; 127};
128} SiS_StStruct; 128
129 129struct SiS_StandTable_S {
130typedef struct _SiS_VBModeStruct 130 unsigned char CRT_COLS;
131{ 131 unsigned char ROWS;
132 UCHAR ModeID; 132 unsigned char CHAR_HEIGHT;
133 UCHAR VB_TVDelayIndex; 133 unsigned short CRT_LEN;
134 UCHAR VB_TVFlickerIndex; 134 unsigned char SR[4];
135 UCHAR VB_TVPhaseIndex; 135 unsigned char MISC;
136 UCHAR VB_TVYFilterIndex; 136 unsigned char CRTC[0x19];
137 UCHAR VB_LCDDelayIndex; 137 unsigned char ATTR[0x14];
138 UCHAR _VB_LCDHIndex; 138 unsigned char GRC[9];
139 UCHAR _VB_LCDVIndex; 139};
140} SiS_VBModeStruct; 140
141 141struct SiS_Ext {
142typedef struct _SiS_StandTableStruct 142 unsigned char Ext_ModeID;
143{ 143 unsigned short Ext_ModeFlag;
144 UCHAR CRT_COLS; 144 unsigned short Ext_VESAID;
145 UCHAR ROWS; 145 unsigned char Ext_RESINFO;
146 UCHAR CHAR_HEIGHT; 146 unsigned char VB_ExtTVFlickerIndex;
147 USHORT CRT_LEN; 147 unsigned char VB_ExtTVEdgeIndex;
148 UCHAR SR[4]; 148 unsigned char VB_ExtTVYFilterIndex;
149 UCHAR MISC; 149 unsigned char VB_ExtTVYFilterIndexROM661;
150 UCHAR CRTC[0x19]; 150 unsigned char REFindex;
151 UCHAR ATTR[0x14]; 151 char ROMMODEIDX661;
152 UCHAR GRC[9]; 152};
153} SiS_StandTableStruct; 153
154 154struct SiS_Ext2 {
155typedef struct _SiS_ExtStruct 155 unsigned short Ext_InfoFlag;
156{ 156 unsigned char Ext_CRT1CRTC;
157 UCHAR Ext_ModeID; 157 unsigned char Ext_CRTVCLK;
158 USHORT Ext_ModeFlag; 158 unsigned char Ext_CRT2CRTC;
159 USHORT Ext_VESAID; 159 unsigned char Ext_CRT2CRTC_NS;
160 UCHAR Ext_RESINFO; 160 unsigned char ModeID;
161 UCHAR VB_ExtTVFlickerIndex; 161 unsigned short XRes;
162 UCHAR VB_ExtTVEdgeIndex; 162 unsigned short YRes;
163 UCHAR VB_ExtTVYFilterIndex; 163 unsigned char Ext_PDC;
164 UCHAR VB_ExtTVYFilterIndexROM661; 164 unsigned char Ext_FakeCRT2CRTC;
165 UCHAR REFindex; 165 unsigned char Ext_FakeCRT2Clk;
166 CHAR ROMMODEIDX661; 166 unsigned char Ext_CRT1CRTC_NORM;
167} SiS_ExtStruct; 167 unsigned char Ext_CRTVCLK_NORM;
168 168 unsigned char Ext_CRT1CRTC_WIDE;
169typedef struct _SiS_Ext2Struct 169 unsigned char Ext_CRTVCLK_WIDE;
170{ 170};
171 USHORT Ext_InfoFlag; 171
172 UCHAR Ext_CRT1CRTC; 172struct SiS_Part2PortTbl {
173 UCHAR Ext_CRTVCLK; 173 unsigned char CR[12];
174 UCHAR Ext_CRT2CRTC; 174};
175 UCHAR Ext_CRT2CRTC_NS; 175
176 UCHAR ModeID; 176struct SiS_CRT1Table {
177 USHORT XRes; 177 unsigned char CR[17];
178 USHORT YRes; 178};
179 UCHAR Ext_PDC; 179
180} SiS_Ext2Struct; 180struct SiS_MCLKData {
181 181 unsigned char SR28,SR29,SR2A;
182typedef struct _SiS_Part2PortTblStruct 182 unsigned short CLOCK;
183{ 183};
184 UCHAR CR[12]; 184
185} SiS_Part2PortTblStruct; 185struct SiS_VCLKData {
186 186 unsigned char SR2B,SR2C;
187typedef struct _SiS_CRT1TableStruct 187 unsigned short CLOCK;
188{ 188};
189 UCHAR CR[17]; 189
190} SiS_CRT1TableStruct; 190struct SiS_VBVCLKData {
191 191 unsigned char Part4_A,Part4_B;
192typedef struct _SiS_MCLKDataStruct 192 unsigned short CLOCK;
193{ 193};
194 UCHAR SR28,SR29,SR2A; 194
195 USHORT CLOCK; 195struct SiS_StResInfo_S {
196} SiS_MCLKDataStruct; 196 unsigned short HTotal;
197 197 unsigned short VTotal;
198typedef struct _SiS_VCLKDataStruct 198};
199{ 199
200 UCHAR SR2B,SR2C; 200struct SiS_ModeResInfo_S {
201 USHORT CLOCK; 201 unsigned short HTotal;
202} SiS_VCLKDataStruct; 202 unsigned short VTotal;
203 203 unsigned char XChar;
204typedef struct _SiS_VBVCLKDataStruct 204 unsigned char YChar;
205{ 205};
206 UCHAR Part4_A,Part4_B;
207 USHORT CLOCK;
208} SiS_VBVCLKDataStruct;
209
210typedef struct _SiS_StResInfoStruct
211{
212 USHORT HTotal;
213 USHORT VTotal;
214} SiS_StResInfoStruct;
215
216typedef struct _SiS_ModeResInfoStruct
217{
218 USHORT HTotal;
219 USHORT VTotal;
220 UCHAR XChar;
221 UCHAR YChar;
222} SiS_ModeResInfoStruct;
223
224
225
226typedef UCHAR DRAM4Type[4];
227 206
228/* Defines for SiS_CustomT */ 207/* Defines for SiS_CustomT */
229/* Never change these for sisfb compatibility */ 208/* Never change these for sisfb compatibility */
230#define CUT_NONE 0 209#define CUT_NONE 0
231#define CUT_FORCENONE 1 210#define CUT_FORCENONE 1
232#define CUT_BARCO1366 2 211#define CUT_BARCO1366 2
233#define CUT_BARCO1024 3 212#define CUT_BARCO1024 3
234#define CUT_COMPAQ1280 4 213#define CUT_COMPAQ1280 4
235#define CUT_COMPAQ12802 5 214#define CUT_COMPAQ12802 5
236#define CUT_PANEL848 6 215#define CUT_PANEL848 6
237#define CUT_CLEVO1024 7 216#define CUT_CLEVO1024 7
238#define CUT_CLEVO10242 8 217#define CUT_CLEVO10242 8
239#define CUT_CLEVO1400 9 218#define CUT_CLEVO1400 9
240#define CUT_CLEVO14002 10 219#define CUT_CLEVO14002 10
241#define CUT_UNIWILL1024 11 220#define CUT_UNIWILL1024 11
242#define CUT_ASUSL3000D 12 221#define CUT_ASUSL3000D 12
243#define CUT_UNIWILL10242 13 222#define CUT_UNIWILL10242 13
244#define CUT_ACER1280 14 223#define CUT_ACER1280 14
245#define CUT_COMPAL1400_1 15 224#define CUT_COMPAL1400_1 15
246#define CUT_COMPAL1400_2 16 225#define CUT_COMPAL1400_2 16
247#define CUT_ASUSA2H_1 17 226#define CUT_ASUSA2H_1 17
248#define CUT_ASUSA2H_2 18 227#define CUT_ASUSA2H_2 18
249 228#define CUT_UNKNOWNLCD 19
250typedef struct _SiS_Private 229#define CUT_AOP8060 20
230#define CUT_PANEL856 21
231
232struct SiS_Private
251{ 233{
252#ifdef LINUX_KERNEL 234 unsigned char ChipType;
253 SISIOADDRESS RelIO; 235 unsigned char ChipRevision;
236#ifdef SIS_XORG_XF86
237 PCITAG PciTag;
254#endif 238#endif
255 SISIOADDRESS SiS_P3c4; 239#ifdef SIS_LINUX_KERNEL
256 SISIOADDRESS SiS_P3d4; 240 void *ivideo;
257 SISIOADDRESS SiS_P3c0;
258 SISIOADDRESS SiS_P3ce;
259 SISIOADDRESS SiS_P3c2;
260 SISIOADDRESS SiS_P3ca;
261 SISIOADDRESS SiS_P3c6;
262 SISIOADDRESS SiS_P3c7;
263 SISIOADDRESS SiS_P3c8;
264 SISIOADDRESS SiS_P3c9;
265 SISIOADDRESS SiS_P3cb;
266 SISIOADDRESS SiS_P3cd;
267 SISIOADDRESS SiS_P3da;
268 SISIOADDRESS SiS_Part1Port;
269 SISIOADDRESS SiS_Part2Port;
270 SISIOADDRESS SiS_Part3Port;
271 SISIOADDRESS SiS_Part4Port;
272 SISIOADDRESS SiS_Part5Port;
273 SISIOADDRESS SiS_VidCapt;
274 SISIOADDRESS SiS_VidPlay;
275 USHORT SiS_IF_DEF_LVDS;
276 USHORT SiS_IF_DEF_CH70xx;
277 USHORT SiS_IF_DEF_CONEX;
278 USHORT SiS_IF_DEF_TRUMPION;
279 USHORT SiS_IF_DEF_DSTN;
280 USHORT SiS_IF_DEF_FSTN;
281 USHORT SiS_SysFlags;
282 UCHAR SiS_VGAINFO;
283#ifdef LINUX_XF86
284 USHORT SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
285#endif 241#endif
286 BOOLEAN SiS_UseROM; 242 unsigned char *VirtualRomBase;
287 BOOLEAN SiS_ROMNew; 243 BOOLEAN UseROM;
288 BOOLEAN SiS_NeedRomModeData; 244#ifdef SIS_LINUX_KERNEL
289 BOOLEAN PanelSelfDetected; 245 unsigned char SISIOMEMTYPE *VideoMemoryAddress;
290 int SiS_CHOverScan; 246 unsigned int VideoMemorySize;
291 BOOLEAN SiS_CHSOverScan;
292 BOOLEAN SiS_ChSW;
293 BOOLEAN SiS_UseLCDA;
294 int SiS_UseOEM;
295 ULONG SiS_CustomT;
296 USHORT SiS_Backup70xx;
297 BOOLEAN HaveEMI;
298 BOOLEAN HaveEMILCD;
299 BOOLEAN OverruleEMI;
300 UCHAR EMI_30,EMI_31,EMI_32,EMI_33;
301 USHORT SiS_EMIOffset;
302 SHORT PDC, PDCA;
303 UCHAR SiS_MyCR63;
304 USHORT SiS_CRT1Mode;
305 USHORT SiS_flag_clearbuffer;
306 int SiS_RAMType;
307 UCHAR SiS_ChannelAB;
308 UCHAR SiS_DataBusWidth;
309 USHORT SiS_ModeType;
310 USHORT SiS_VBInfo;
311 USHORT SiS_TVMode;
312 USHORT SiS_LCDResInfo;
313 USHORT SiS_LCDTypeInfo;
314 USHORT SiS_LCDInfo;
315 USHORT SiS_LCDInfo661;
316 USHORT SiS_VBType;
317 USHORT SiS_VBExtInfo;
318 USHORT SiS_YPbPr;
319 USHORT SiS_SelectCRT2Rate;
320 USHORT SiS_SetFlag;
321 USHORT SiS_RVBHCFACT;
322 USHORT SiS_RVBHCMAX;
323 USHORT SiS_RVBHRS;
324 USHORT SiS_VGAVT;
325 USHORT SiS_VGAHT;
326 USHORT SiS_VT;
327 USHORT SiS_HT;
328 USHORT SiS_VGAVDE;
329 USHORT SiS_VGAHDE;
330 USHORT SiS_VDE;
331 USHORT SiS_HDE;
332 USHORT SiS_NewFlickerMode;
333 USHORT SiS_RY1COE;
334 USHORT SiS_RY2COE;
335 USHORT SiS_RY3COE;
336 USHORT SiS_RY4COE;
337 USHORT SiS_LCDHDES;
338 USHORT SiS_LCDVDES;
339 USHORT SiS_DDC_Port;
340 USHORT SiS_DDC_Index;
341 USHORT SiS_DDC_Data;
342 USHORT SiS_DDC_NData;
343 USHORT SiS_DDC_Clk;
344 USHORT SiS_DDC_NClk;
345 USHORT SiS_DDC_DeviceAddr;
346 USHORT SiS_DDC_ReadAddr;
347 USHORT SiS_DDC_SecAddr;
348 USHORT SiS_ChrontelInit;
349 BOOLEAN SiS_SensibleSR11;
350 USHORT SiS661LCD2TableSize;
351
352 USHORT SiS_PanelMinLVDS;
353 USHORT SiS_PanelMin301;
354
355 const SiS_StStruct *SiS_SModeIDTable;
356 const SiS_StandTableStruct *SiS_StandTable;
357 const SiS_ExtStruct *SiS_EModeIDTable;
358 const SiS_Ext2Struct *SiS_RefIndex;
359 const SiS_VBModeStruct *SiS_VBModeIDTable;
360 const SiS_CRT1TableStruct *SiS_CRT1Table;
361 const SiS_MCLKDataStruct *SiS_MCLKData_0;
362 const SiS_MCLKDataStruct *SiS_MCLKData_1;
363 SiS_VCLKDataStruct *SiS_VCLKData;
364 SiS_VBVCLKDataStruct *SiS_VBVCLKData;
365 const SiS_StResInfoStruct *SiS_StResInfo;
366 const SiS_ModeResInfoStruct *SiS_ModeResInfo;
367
368 const UCHAR *pSiS_OutputSelect;
369 const UCHAR *pSiS_SoftSetting;
370
371 const DRAM4Type *SiS_SR15; /* pointer : point to array */
372#ifdef LINUX_KERNEL
373 UCHAR *pSiS_SR07;
374 const DRAM4Type *SiS_CR40; /* pointer : point to array */
375 UCHAR *SiS_CR49;
376 UCHAR *SiS_SR25;
377 UCHAR *pSiS_SR1F;
378 UCHAR *pSiS_SR21;
379 UCHAR *pSiS_SR22;
380 UCHAR *pSiS_SR23;
381 UCHAR *pSiS_SR24;
382 UCHAR *pSiS_SR31;
383 UCHAR *pSiS_SR32;
384 UCHAR *pSiS_SR33;
385 UCHAR *pSiS_CRT2Data_1_2;
386 UCHAR *pSiS_CRT2Data_4_D;
387 UCHAR *pSiS_CRT2Data_4_E;
388 UCHAR *pSiS_CRT2Data_4_10;
389 const USHORT *pSiS_RGBSenseData;
390 const USHORT *pSiS_VideoSenseData;
391 const USHORT *pSiS_YCSenseData;
392 const USHORT *pSiS_RGBSenseData2;
393 const USHORT *pSiS_VideoSenseData2;
394 const USHORT *pSiS_YCSenseData2;
395#endif 247#endif
248 SISIOADDRESS IOAddress;
249 SISIOADDRESS IOAddress2; /* For dual chip XGI volari */
396 250
397 const SiS_PanelDelayTblStruct *SiS_PanelDelayTbl; 251#ifdef SIS_LINUX_KERNEL
398 const SiS_PanelDelayTblStruct *SiS_PanelDelayTblLVDS; 252 SISIOADDRESS RelIO;
253#endif
254 SISIOADDRESS SiS_P3c4;
255 SISIOADDRESS SiS_P3d4;
256 SISIOADDRESS SiS_P3c0;
257 SISIOADDRESS SiS_P3ce;
258 SISIOADDRESS SiS_P3c2;
259 SISIOADDRESS SiS_P3ca;
260 SISIOADDRESS SiS_P3c6;
261 SISIOADDRESS SiS_P3c7;
262 SISIOADDRESS SiS_P3c8;
263 SISIOADDRESS SiS_P3c9;
264 SISIOADDRESS SiS_P3cb;
265 SISIOADDRESS SiS_P3cc;
266 SISIOADDRESS SiS_P3cd;
267 SISIOADDRESS SiS_P3da;
268 SISIOADDRESS SiS_Part1Port;
269 SISIOADDRESS SiS_Part2Port;
270 SISIOADDRESS SiS_Part3Port;
271 SISIOADDRESS SiS_Part4Port;
272 SISIOADDRESS SiS_Part5Port;
273 SISIOADDRESS SiS_VidCapt;
274 SISIOADDRESS SiS_VidPlay;
275 unsigned short SiS_IF_DEF_LVDS;
276 unsigned short SiS_IF_DEF_CH70xx;
277 unsigned short SiS_IF_DEF_CONEX;
278 unsigned short SiS_IF_DEF_TRUMPION;
279 unsigned short SiS_IF_DEF_DSTN;
280 unsigned short SiS_IF_DEF_FSTN;
281 unsigned short SiS_SysFlags;
282 unsigned char SiS_VGAINFO;
283#ifdef SIS_XORG_XF86
284 unsigned short SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
285#endif
286 BOOLEAN SiS_UseROM;
287 BOOLEAN SiS_ROMNew;
288 BOOLEAN SiS_XGIROM;
289 BOOLEAN SiS_NeedRomModeData;
290 BOOLEAN PanelSelfDetected;
291 BOOLEAN DDCPortMixup;
292 int SiS_CHOverScan;
293 BOOLEAN SiS_CHSOverScan;
294 BOOLEAN SiS_ChSW;
295 BOOLEAN SiS_UseLCDA;
296 int SiS_UseOEM;
297 unsigned int SiS_CustomT;
298 int SiS_UseWide, SiS_UseWideCRT2;
299 int SiS_TVBlue;
300 unsigned short SiS_Backup70xx;
301 BOOLEAN HaveEMI;
302 BOOLEAN HaveEMILCD;
303 BOOLEAN OverruleEMI;
304 unsigned char EMI_30,EMI_31,EMI_32,EMI_33;
305 unsigned short SiS_EMIOffset;
306 unsigned short SiS_PWDOffset;
307 short PDC, PDCA;
308 unsigned char SiS_MyCR63;
309 unsigned short SiS_CRT1Mode;
310 unsigned short SiS_flag_clearbuffer;
311 int SiS_RAMType;
312 unsigned char SiS_ChannelAB;
313 unsigned char SiS_DataBusWidth;
314 unsigned short SiS_ModeType;
315 unsigned short SiS_VBInfo;
316 unsigned short SiS_TVMode;
317 unsigned short SiS_LCDResInfo;
318 unsigned short SiS_LCDTypeInfo;
319 unsigned short SiS_LCDInfo;
320 unsigned short SiS_LCDInfo661;
321 unsigned short SiS_VBType;
322 unsigned short SiS_VBExtInfo;
323 unsigned short SiS_YPbPr;
324 unsigned short SiS_SelectCRT2Rate;
325 unsigned short SiS_SetFlag;
326 unsigned short SiS_RVBHCFACT;
327 unsigned short SiS_RVBHCMAX;
328 unsigned short SiS_RVBHRS;
329 unsigned short SiS_RVBHRS2;
330 unsigned short SiS_VGAVT;
331 unsigned short SiS_VGAHT;
332 unsigned short SiS_VT;
333 unsigned short SiS_HT;
334 unsigned short SiS_VGAVDE;
335 unsigned short SiS_VGAHDE;
336 unsigned short SiS_VDE;
337 unsigned short SiS_HDE;
338 unsigned short SiS_NewFlickerMode;
339 unsigned short SiS_RY1COE;
340 unsigned short SiS_RY2COE;
341 unsigned short SiS_RY3COE;
342 unsigned short SiS_RY4COE;
343 unsigned short SiS_LCDHDES;
344 unsigned short SiS_LCDVDES;
345 unsigned short SiS_DDC_Port;
346 unsigned short SiS_DDC_Index;
347 unsigned short SiS_DDC_Data;
348 unsigned short SiS_DDC_NData;
349 unsigned short SiS_DDC_Clk;
350 unsigned short SiS_DDC_NClk;
351 unsigned short SiS_DDC_DeviceAddr;
352 unsigned short SiS_DDC_ReadAddr;
353 unsigned short SiS_DDC_SecAddr;
354 unsigned short SiS_ChrontelInit;
355 BOOLEAN SiS_SensibleSR11;
356 unsigned short SiS661LCD2TableSize;
357
358 unsigned short SiS_PanelMinLVDS;
359 unsigned short SiS_PanelMin301;
360
361 const struct SiS_St *SiS_SModeIDTable;
362 const struct SiS_StandTable_S *SiS_StandTable;
363 const struct SiS_Ext *SiS_EModeIDTable;
364 const struct SiS_Ext2 *SiS_RefIndex;
365 const struct SiS_VBMode *SiS_VBModeIDTable;
366 const struct SiS_CRT1Table *SiS_CRT1Table;
367 const struct SiS_MCLKData *SiS_MCLKData_0;
368 const struct SiS_MCLKData *SiS_MCLKData_1;
369 struct SiS_VCLKData *SiS_VCLKData;
370 struct SiS_VBVCLKData *SiS_VBVCLKData;
371 const struct SiS_StResInfo_S *SiS_StResInfo;
372 const struct SiS_ModeResInfo_S *SiS_ModeResInfo;
373
374 const unsigned char *pSiS_OutputSelect;
375 const unsigned char *pSiS_SoftSetting;
376
377 const unsigned char *SiS_SR15;
378
379 const struct SiS_PanelDelayTbl *SiS_PanelDelayTbl;
380 const struct SiS_PanelDelayTbl *SiS_PanelDelayTblLVDS;
399 381
400 /* SiS bridge */ 382 /* SiS bridge */
401 383
402 const UCHAR *SiS_NTSCPhase; 384 const struct SiS_LCDData *SiS_ExtLCD1024x768Data;
403 const UCHAR *SiS_PALPhase; 385 const struct SiS_LCDData *SiS_St2LCD1024x768Data;
404 const UCHAR *SiS_NTSCPhase2; 386 const struct SiS_LCDData *SiS_LCD1280x720Data;
405 const UCHAR *SiS_PALPhase2; 387 const struct SiS_LCDData *SiS_StLCD1280x768_2Data;
406 const UCHAR *SiS_PALMPhase; 388 const struct SiS_LCDData *SiS_ExtLCD1280x768_2Data;
407 const UCHAR *SiS_PALNPhase; 389 const struct SiS_LCDData *SiS_LCD1280x800Data;
408 const UCHAR *SiS_PALMPhase2; 390 const struct SiS_LCDData *SiS_LCD1280x800_2Data;
409 const UCHAR *SiS_PALNPhase2; 391 const struct SiS_LCDData *SiS_LCD1280x854Data;
410 const UCHAR *SiS_SpecialPhase; 392 const struct SiS_LCDData *SiS_LCD1280x960Data;
411 const UCHAR *SiS_SpecialPhaseM; 393 const struct SiS_LCDData *SiS_ExtLCD1280x1024Data;
412 const UCHAR *SiS_SpecialPhaseJ; 394 const struct SiS_LCDData *SiS_St2LCD1280x1024Data;
413 const SiS_LCDDataStruct *SiS_ExtLCD1024x768Data; 395 const struct SiS_LCDData *SiS_StLCD1400x1050Data;
414 const SiS_LCDDataStruct *SiS_St2LCD1024x768Data; 396 const struct SiS_LCDData *SiS_ExtLCD1400x1050Data;
415 const SiS_LCDDataStruct *SiS_LCD1280x720Data; 397 const struct SiS_LCDData *SiS_StLCD1600x1200Data;
416 const SiS_LCDDataStruct *SiS_StLCD1280x768_2Data; 398 const struct SiS_LCDData *SiS_ExtLCD1600x1200Data;
417 const SiS_LCDDataStruct *SiS_ExtLCD1280x768_2Data; 399 const struct SiS_LCDData *SiS_LCD1680x1050Data;
418 const SiS_LCDDataStruct *SiS_LCD1280x800Data; 400 const struct SiS_LCDData *SiS_NoScaleData;
419 const SiS_LCDDataStruct *SiS_LCD1280x800_2Data; 401 const struct SiS_TVData *SiS_StPALData;
420 const SiS_LCDDataStruct *SiS_LCD1280x960Data; 402 const struct SiS_TVData *SiS_ExtPALData;
421 const SiS_LCDDataStruct *SiS_ExtLCD1280x1024Data; 403 const struct SiS_TVData *SiS_StNTSCData;
422 const SiS_LCDDataStruct *SiS_St2LCD1280x1024Data; 404 const struct SiS_TVData *SiS_ExtNTSCData;
423 const SiS_LCDDataStruct *SiS_StLCD1400x1050Data; 405 const struct SiS_TVData *SiS_St1HiTVData;
424 const SiS_LCDDataStruct *SiS_ExtLCD1400x1050Data; 406 const struct SiS_TVData *SiS_St2HiTVData;
425 const SiS_LCDDataStruct *SiS_StLCD1600x1200Data; 407 const struct SiS_TVData *SiS_ExtHiTVData;
426 const SiS_LCDDataStruct *SiS_ExtLCD1600x1200Data; 408 const struct SiS_TVData *SiS_St525iData;
427 const SiS_LCDDataStruct *SiS_LCD1680x1050Data; 409 const struct SiS_TVData *SiS_St525pData;
428 const SiS_LCDDataStruct *SiS_NoScaleData; 410 const struct SiS_TVData *SiS_St750pData;
429 const SiS_TVDataStruct *SiS_StPALData; 411 const struct SiS_TVData *SiS_Ext525iData;
430 const SiS_TVDataStruct *SiS_ExtPALData; 412 const struct SiS_TVData *SiS_Ext525pData;
431 const SiS_TVDataStruct *SiS_StNTSCData; 413 const struct SiS_TVData *SiS_Ext750pData;
432 const SiS_TVDataStruct *SiS_ExtNTSCData; 414 const unsigned char *SiS_NTSCTiming;
433 const SiS_TVDataStruct *SiS_St1HiTVData; 415 const unsigned char *SiS_PALTiming;
434 const SiS_TVDataStruct *SiS_St2HiTVData; 416 const unsigned char *SiS_HiTVExtTiming;
435 const SiS_TVDataStruct *SiS_ExtHiTVData; 417 const unsigned char *SiS_HiTVSt1Timing;
436 const SiS_TVDataStruct *SiS_St525iData; 418 const unsigned char *SiS_HiTVSt2Timing;
437 const SiS_TVDataStruct *SiS_St525pData; 419 const unsigned char *SiS_HiTVGroup3Data;
438 const SiS_TVDataStruct *SiS_St750pData; 420 const unsigned char *SiS_HiTVGroup3Simu;
439 const SiS_TVDataStruct *SiS_Ext525iData;
440 const SiS_TVDataStruct *SiS_Ext525pData;
441 const SiS_TVDataStruct *SiS_Ext750pData;
442 const UCHAR *SiS_NTSCTiming;
443 const UCHAR *SiS_PALTiming;
444 const UCHAR *SiS_HiTVExtTiming;
445 const UCHAR *SiS_HiTVSt1Timing;
446 const UCHAR *SiS_HiTVSt2Timing;
447 const UCHAR *SiS_HiTVGroup3Data;
448 const UCHAR *SiS_HiTVGroup3Simu;
449#if 0 421#if 0
450 const UCHAR *SiS_HiTVTextTiming; 422 const unsigned char *SiS_HiTVTextTiming;
451 const UCHAR *SiS_HiTVGroup3Text; 423 const unsigned char *SiS_HiTVGroup3Text;
452#endif 424#endif
453 425
454 const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_1; 426 const struct SiS_Part2PortTbl *SiS_CRT2Part2_1024x768_1;
455 const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_1; 427 const struct SiS_Part2PortTbl *SiS_CRT2Part2_1024x768_2;
456 const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_2; 428 const struct SiS_Part2PortTbl *SiS_CRT2Part2_1024x768_3;
457 const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_2;
458 const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_3;
459 const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_3;
460 429
461 /* LVDS, Chrontel */ 430 /* LVDS, Chrontel */
462 431
463 const SiS_LVDSDataStruct *SiS_LVDS800x600Data_1; 432 const struct SiS_LVDSData *SiS_LVDS320x240Data_1;
464 const SiS_LVDSDataStruct *SiS_LVDS800x600Data_2; 433 const struct SiS_LVDSData *SiS_LVDS320x240Data_2;
465 const SiS_LVDSDataStruct *SiS_LVDS1024x768Data_1; 434 const struct SiS_LVDSData *SiS_LVDS640x480Data_1;
466 const SiS_LVDSDataStruct *SiS_LVDS1024x768Data_2; 435 const struct SiS_LVDSData *SiS_LVDS800x600Data_1;
467 const SiS_LVDSDataStruct *SiS_LVDS1280x1024Data_1; 436 const struct SiS_LVDSData *SiS_LVDS1024x600Data_1;
468 const SiS_LVDSDataStruct *SiS_LVDS1280x1024Data_2; 437 const struct SiS_LVDSData *SiS_LVDS1024x768Data_1;
469 const SiS_LVDSDataStruct *SiS_LVDS1280x960Data_1; 438 const struct SiS_LVDSData *SiS_LVDSBARCO1366Data_1;
470 const SiS_LVDSDataStruct *SiS_LVDS1280x960Data_2; 439 const struct SiS_LVDSData *SiS_LVDSBARCO1366Data_2;
471 const SiS_LVDSDataStruct *SiS_LVDS1400x1050Data_1; 440 const struct SiS_LVDSData *SiS_LVDSBARCO1024Data_1;
472 const SiS_LVDSDataStruct *SiS_LVDS1400x1050Data_2; 441 const struct SiS_LVDSData *SiS_LVDS848x480Data_1;
473 const SiS_LVDSDataStruct *SiS_LVDS1600x1200Data_1; 442 const struct SiS_LVDSData *SiS_LVDS848x480Data_2;
474 const SiS_LVDSDataStruct *SiS_LVDS1600x1200Data_2; 443 const struct SiS_LVDSData *SiS_CHTVUNTSCData;
475 const SiS_LVDSDataStruct *SiS_LVDS1280x768Data_1; 444 const struct SiS_LVDSData *SiS_CHTVONTSCData;
476 const SiS_LVDSDataStruct *SiS_LVDS1280x768Data_2; 445 const struct SiS_LVDSData *SiS_CHTVUPALData;
477 const SiS_LVDSDataStruct *SiS_LVDS1024x600Data_1; 446 const struct SiS_LVDSData *SiS_CHTVOPALData;
478 const SiS_LVDSDataStruct *SiS_LVDS1024x600Data_2; 447 const struct SiS_LVDSData *SiS_CHTVUPALMData;
479 const SiS_LVDSDataStruct *SiS_LVDS1152x768Data_1; 448 const struct SiS_LVDSData *SiS_CHTVOPALMData;
480 const SiS_LVDSDataStruct *SiS_LVDS1152x768Data_2; 449 const struct SiS_LVDSData *SiS_CHTVUPALNData;
481 const SiS_LVDSDataStruct *SiS_LVDS640x480Data_1; 450 const struct SiS_LVDSData *SiS_CHTVOPALNData;
482 const SiS_LVDSDataStruct *SiS_LVDS640x480Data_2; 451 const struct SiS_LVDSData *SiS_CHTVSOPALData;
483 const SiS_LVDSDataStruct *SiS_LVDS320x480Data_1; 452
484 const SiS_LVDSDataStruct *SiS_LVDSXXXxXXXData_1; 453 const struct SiS_LVDSDes *SiS_PanelType04_1a;
485 const SiS_LVDSDataStruct *SiS_LVDSBARCO1366Data_1; 454 const struct SiS_LVDSDes *SiS_PanelType04_2a;
486 const SiS_LVDSDataStruct *SiS_LVDSBARCO1366Data_2; 455 const struct SiS_LVDSDes *SiS_PanelType04_1b;
487 const SiS_LVDSDataStruct *SiS_LVDSBARCO1024Data_1; 456 const struct SiS_LVDSDes *SiS_PanelType04_2b;
488 const SiS_LVDSDataStruct *SiS_LVDSBARCO1024Data_2; 457
489 const SiS_LVDSDataStruct *SiS_LVDS848x480Data_1; 458 const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_1;
490 const SiS_LVDSDataStruct *SiS_LVDS848x480Data_2; 459 const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_2;
491 const SiS_LVDSDataStruct *SiS_CHTVUNTSCData; 460 const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_2_H;
492 const SiS_LVDSDataStruct *SiS_CHTVONTSCData; 461 const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_3;
493 const SiS_LVDSDataStruct *SiS_CHTVUPALData; 462 const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_3_H;
494 const SiS_LVDSDataStruct *SiS_CHTVOPALData; 463 const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1640x480_1;
495 const SiS_LVDSDataStruct *SiS_CHTVUPALMData; 464 const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1640x480_1_H;
496 const SiS_LVDSDataStruct *SiS_CHTVOPALMData; 465 const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1UNTSC;
497 const SiS_LVDSDataStruct *SiS_CHTVUPALNData; 466 const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1ONTSC;
498 const SiS_LVDSDataStruct *SiS_CHTVOPALNData; 467 const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1UPAL;
499 const SiS_LVDSDataStruct *SiS_CHTVSOPALData; 468 const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1OPAL;
500 469 const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1SOPAL;
501 const SiS_LVDSDesStruct *SiS_PanelType00_1; 470
502 const SiS_LVDSDesStruct *SiS_PanelType01_1; 471 const struct SiS_CHTVRegData *SiS_CHTVReg_UNTSC;
503 const SiS_LVDSDesStruct *SiS_PanelType02_1; 472 const struct SiS_CHTVRegData *SiS_CHTVReg_ONTSC;
504 const SiS_LVDSDesStruct *SiS_PanelType03_1; 473 const struct SiS_CHTVRegData *SiS_CHTVReg_UPAL;
505 const SiS_LVDSDesStruct *SiS_PanelType04_1; 474 const struct SiS_CHTVRegData *SiS_CHTVReg_OPAL;
506 const SiS_LVDSDesStruct *SiS_PanelType05_1; 475 const struct SiS_CHTVRegData *SiS_CHTVReg_UPALM;
507 const SiS_LVDSDesStruct *SiS_PanelType06_1; 476 const struct SiS_CHTVRegData *SiS_CHTVReg_OPALM;
508 const SiS_LVDSDesStruct *SiS_PanelType07_1; 477 const struct SiS_CHTVRegData *SiS_CHTVReg_UPALN;
509 const SiS_LVDSDesStruct *SiS_PanelType08_1; 478 const struct SiS_CHTVRegData *SiS_CHTVReg_OPALN;
510 const SiS_LVDSDesStruct *SiS_PanelType09_1; 479 const struct SiS_CHTVRegData *SiS_CHTVReg_SOPAL;
511 const SiS_LVDSDesStruct *SiS_PanelType0a_1; 480
512 const SiS_LVDSDesStruct *SiS_PanelType0b_1; 481 const unsigned char *SiS_CHTVVCLKUNTSC;
513 const SiS_LVDSDesStruct *SiS_PanelType0c_1; 482 const unsigned char *SiS_CHTVVCLKONTSC;
514 const SiS_LVDSDesStruct *SiS_PanelType0d_1; 483 const unsigned char *SiS_CHTVVCLKUPAL;
515 const SiS_LVDSDesStruct *SiS_PanelType0e_1; 484 const unsigned char *SiS_CHTVVCLKOPAL;
516 const SiS_LVDSDesStruct *SiS_PanelType0f_1; 485 const unsigned char *SiS_CHTVVCLKUPALM;
517 const SiS_LVDSDesStruct *SiS_PanelTypeNS_1; 486 const unsigned char *SiS_CHTVVCLKOPALM;
518 const SiS_LVDSDesStruct *SiS_PanelType00_2; 487 const unsigned char *SiS_CHTVVCLKUPALN;
519 const SiS_LVDSDesStruct *SiS_PanelType01_2; 488 const unsigned char *SiS_CHTVVCLKOPALN;
520 const SiS_LVDSDesStruct *SiS_PanelType02_2; 489 const unsigned char *SiS_CHTVVCLKSOPAL;
521 const SiS_LVDSDesStruct *SiS_PanelType03_2; 490
522 const SiS_LVDSDesStruct *SiS_PanelType04_2; 491 unsigned short PanelXRes, PanelHT;
523 const SiS_LVDSDesStruct *SiS_PanelType05_2; 492 unsigned short PanelYRes, PanelVT;
524 const SiS_LVDSDesStruct *SiS_PanelType06_2; 493 unsigned short PanelHRS, PanelHRE;
525 const SiS_LVDSDesStruct *SiS_PanelType07_2; 494 unsigned short PanelVRS, PanelVRE;
526 const SiS_LVDSDesStruct *SiS_PanelType08_2; 495 unsigned short PanelVCLKIdx300;
527 const SiS_LVDSDesStruct *SiS_PanelType09_2; 496 unsigned short PanelVCLKIdx315;
528 const SiS_LVDSDesStruct *SiS_PanelType0a_2; 497 BOOLEAN Alternate1600x1200;
529 const SiS_LVDSDesStruct *SiS_PanelType0b_2; 498
530 const SiS_LVDSDesStruct *SiS_PanelType0c_2; 499 BOOLEAN UseCustomMode;
531 const SiS_LVDSDesStruct *SiS_PanelType0d_2; 500 BOOLEAN CRT1UsesCustomMode;
532 const SiS_LVDSDesStruct *SiS_PanelType0e_2; 501 unsigned short CHDisplay;
533 const SiS_LVDSDesStruct *SiS_PanelType0f_2; 502 unsigned short CHSyncStart;
534 const SiS_LVDSDesStruct *SiS_PanelTypeNS_2; 503 unsigned short CHSyncEnd;
535 const SiS_LVDSDesStruct *SiS_CHTVUNTSCDesData; 504 unsigned short CHTotal;
536 const SiS_LVDSDesStruct *SiS_CHTVONTSCDesData; 505 unsigned short CHBlankStart;
537 const SiS_LVDSDesStruct *SiS_CHTVUPALDesData; 506 unsigned short CHBlankEnd;
538 const SiS_LVDSDesStruct *SiS_CHTVOPALDesData; 507 unsigned short CVDisplay;
539 508 unsigned short CVSyncStart;
540 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_1; 509 unsigned short CVSyncEnd;
541 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_1; 510 unsigned short CVTotal;
542 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_1; 511 unsigned short CVBlankStart;
543 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_1; 512 unsigned short CVBlankEnd;
544 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_1; 513 unsigned int CDClock;
545 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_1; 514 unsigned int CFlags;
546 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_1; 515 unsigned char CCRT1CRTC[17];
547 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_1; 516 unsigned char CSR2B;
548 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_1_H; 517 unsigned char CSR2C;
549 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_1_H; 518 unsigned short CSRClock;
550 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_1_H; 519 unsigned short CSRClock_CRT1;
551 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_1_H; 520 unsigned short CModeFlag;
552 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_1_H; 521 unsigned short CModeFlag_CRT1;
553 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_1_H; 522 unsigned short CInfoFlag;
554 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_1_H; 523
555 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_1_H; 524 int LVDSHL;
556 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_2; 525
557 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_2; 526 BOOLEAN Backup;
558 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_2; 527 unsigned char Backup_Mode;
559 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_2; 528 unsigned char Backup_14;
560 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_2; 529 unsigned char Backup_15;
561 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_2; 530 unsigned char Backup_16;
562 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_2; 531 unsigned char Backup_17;
563 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_2; 532 unsigned char Backup_18;
564 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_2_H; 533 unsigned char Backup_19;
565 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_2_H; 534 unsigned char Backup_1a;
566 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_2_H; 535 unsigned char Backup_1b;
567 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_2_H; 536 unsigned char Backup_1c;
568 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_2_H; 537 unsigned char Backup_1d;
569 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_2_H; 538
570 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_2_H; 539 unsigned char Init_P4_0E;
571 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_2_H; 540
572 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1; 541 int UsePanelScaler;
573 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1_H; 542 int CenterScreen;
574 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1; 543
575 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1_H; 544 unsigned short CP_Vendor, CP_Product;
576 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2; 545 BOOLEAN CP_HaveCustomData;
577 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2_H; 546 int CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
578 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3; 547 int CP_MaxX, CP_MaxY, CP_MaxClock;
579 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3_H; 548 unsigned char CP_PrefSR2B, CP_PrefSR2C;
580 const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1320x480_1; 549 unsigned short CP_PrefClock;
581 const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UNTSC; 550 BOOLEAN CP_Supports64048075;
582 const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1ONTSC; 551 int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */
583 const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UPAL; 552 int CP_HTotal[7], CP_VTotal[7];
584 const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1OPAL; 553 int CP_HSyncStart[7], CP_VSyncStart[7];
585 const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1SOPAL; 554 int CP_HSyncEnd[7], CP_VSyncEnd[7];
586 555 int CP_HBlankStart[7], CP_VBlankStart[7];
587 const SiS_CHTVRegDataStruct *SiS_CHTVReg_UNTSC; 556 int CP_HBlankEnd[7], CP_VBlankEnd[7];
588 const SiS_CHTVRegDataStruct *SiS_CHTVReg_ONTSC; 557 int CP_Clock[7];
589 const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPAL; 558 BOOLEAN CP_DataValid[7];
590 const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPAL; 559 BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
591 const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPALM; 560};
592 const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPALM;
593 const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPALN;
594 const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPALN;
595 const SiS_CHTVRegDataStruct *SiS_CHTVReg_SOPAL;
596
597 const UCHAR *SiS_CHTVVCLKUNTSC;
598 const UCHAR *SiS_CHTVVCLKONTSC;
599 const UCHAR *SiS_CHTVVCLKUPAL;
600 const UCHAR *SiS_CHTVVCLKOPAL;
601 const UCHAR *SiS_CHTVVCLKUPALM;
602 const UCHAR *SiS_CHTVVCLKOPALM;
603 const UCHAR *SiS_CHTVVCLKUPALN;
604 const UCHAR *SiS_CHTVVCLKOPALN;
605 const UCHAR *SiS_CHTVVCLKSOPAL;
606
607 USHORT PanelXRes, PanelHT;
608 USHORT PanelYRes, PanelVT;
609 USHORT PanelHRS, PanelHRE;
610 USHORT PanelVRS, PanelVRE;
611 USHORT PanelVCLKIdx300;
612 USHORT PanelVCLKIdx315;
613
614 BOOLEAN UseCustomMode;
615 BOOLEAN CRT1UsesCustomMode;
616 USHORT CHDisplay;
617 USHORT CHSyncStart;
618 USHORT CHSyncEnd;
619 USHORT CHTotal;
620 USHORT CHBlankStart;
621 USHORT CHBlankEnd;
622 USHORT CVDisplay;
623 USHORT CVSyncStart;
624 USHORT CVSyncEnd;
625 USHORT CVTotal;
626 USHORT CVBlankStart;
627 USHORT CVBlankEnd;
628 ULONG CDClock;
629 ULONG CFlags;
630 UCHAR CCRT1CRTC[17];
631 UCHAR CSR2B;
632 UCHAR CSR2C;
633 USHORT CSRClock;
634 USHORT CSRClock_CRT1;
635 USHORT CModeFlag;
636 USHORT CModeFlag_CRT1;
637 USHORT CInfoFlag;
638
639 int LVDSHL;
640
641 BOOLEAN Backup;
642 UCHAR Backup_Mode;
643 UCHAR Backup_14;
644 UCHAR Backup_15;
645 UCHAR Backup_16;
646 UCHAR Backup_17;
647 UCHAR Backup_18;
648 UCHAR Backup_19;
649 UCHAR Backup_1a;
650 UCHAR Backup_1b;
651 UCHAR Backup_1c;
652 UCHAR Backup_1d;
653
654 int UsePanelScaler;
655 int CenterScreen;
656
657 USHORT CP_Vendor, CP_Product;
658 BOOLEAN CP_HaveCustomData;
659 int CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
660 int CP_MaxX, CP_MaxY, CP_MaxClock;
661 UCHAR CP_PrefSR2B, CP_PrefSR2C;
662 USHORT CP_PrefClock;
663 BOOLEAN CP_Supports64048075;
664 int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */
665 int CP_HTotal[7], CP_VTotal[7];
666 int CP_HSyncStart[7], CP_VSyncStart[7];
667 int CP_HSyncEnd[7], CP_VSyncEnd[7];
668 int CP_HBlankStart[7], CP_VBlankStart[7];
669 int CP_HBlankEnd[7], CP_VBlankEnd[7];
670 int CP_Clock[7];
671 BOOLEAN CP_DataValid[7];
672 BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
673} SiS_Private;
674 561
675#endif 562#endif
676 563