3 * Data and prototypes for init301.c
5 * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
7 * If distributed as part of the Linux kernel, the following license terms
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.
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.
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
24 * Otherwise, the following license terms apply:
26 * * Redistribution and use in source and binary forms, with or without
27 * * modification, are permitted provided that the following conditions
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.
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.
51 * Author: Thomas Winischhofer <thomas@winischhofer.net>
67 #include "xf86PciInfo.h"
76 #include <linux/config.h>
77 #include <linux/version.h>
79 #include <linux/types.h>
80 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
81 #include <linux/sisfb.h>
83 #include <video/sisfb.h>
87 const UCHAR SiS_YPbPrTable[3][64] = {
89 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
90 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
91 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
92 0x0c,0x50,0x00,0x97,0x00,0xda,0x4a,0x17,
93 0x7d,0x05,0x4b,0x00,0x00,0xe2,0x00,0x02,
94 0x03,0x0a,0x65,0x9d,0x08,0x92,0x8f,0x40,
95 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x53,
96 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
99 0x1d,0x11,0x06,0x09,0x0b,0x0c,0x0c,0x0c,
100 0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a,
101 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
102 0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4f,0x13,
103 0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8,
104 0x51,0x5e,0x60,0x49,0x7d,0x92,0x0f,0x40,
105 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x4b,
106 0x43,0x41,0x11,0x00,0xfc,0xff,0x32,0x00
109 0x13,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c,
110 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a,
111 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
112 0xed,0x50,0x70,0x9f,0x16,0x59,0x2b,0x13,
113 0x27,0x0b,0x27,0xfc,0x30,0x27,0x1c,0xb0,
114 0x4b,0x4b,0x6f,0x2f,0x63,0x92,0x0f,0x40,
115 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x27,
116 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00
120 const UCHAR SiS_HiTVGroup3_1[] = {
121 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13,
122 0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6,
123 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
124 0xac, 0xda, 0x60, 0xfe, 0x6a, 0x9a, 0x06, 0x10,
125 0xd1, 0x04, 0x18, 0x0a, 0xff, 0x80, 0x00, 0x80,
126 0x3b, 0x77, 0x00, 0xef, 0xe0, 0x10, 0xb0, 0xe0,
127 0x10, 0x4f, 0x0f, 0x0f, 0x05, 0x0f, 0x08, 0x6e,
128 0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01
131 const UCHAR SiS_HiTVGroup3_2[] = {
132 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a,
133 0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6,
134 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
135 0xac, 0x6a, 0x60, 0x2b, 0x52, 0xcd, 0x61, 0x10,
136 0x51, 0x04, 0x18, 0x0a, 0x1f, 0x80, 0x00, 0x80,
137 0xff, 0xa4, 0x04, 0x2b, 0x94, 0x21, 0x72, 0x94,
138 0x26, 0x05, 0x01, 0x0f, 0xed, 0x0f, 0x0a, 0x64,
139 0x18, 0x1d, 0x23, 0x28, 0x4c, 0xaa, 0x01
142 /* 301C / 302ELV (?) extended Part2 TV registers */
144 static const UCHAR SiS_Part2CLVX_1[] = {
146 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E,
147 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C,
148 0x7C,0x14,0x14,0x7C,0x7C,0x11,0x17,0x7C,0x7D,0x0E,0x19,0x7C,0x7E,0x0B,0x1B,0x7C,
149 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E
152 static const UCHAR SiS_Part2CLVX_2[] = {
154 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E,
155 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C,
156 0x7C,0x14,0x14,0x7C,0x7C,0x11,0x17,0x7C,0x7D,0x0E,0x19,0x7C,0x7E,0x0B,0x1B,0x7C,
157 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E
160 static const UCHAR SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */
162 0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D,0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D,
163 0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C,0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C,
164 0x7D,0x13,0x13,0x7D,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x7D,0x7C,0x0E,0x18,0x7E,
165 0x7D,0x0C,0x19,0x7E,0x7D,0x0A,0x19,0x00,0x7D,0x08,0x1A,0x01,0x7E,0x06,0x1A,0x02,
167 0x07,0x14,0x07,0x7E,0x06,0x14,0x09,0x7D,0x05,0x14,0x0A,0x7D,0x04,0x13,0x0B,0x7E,
168 0x03,0x13,0x0C,0x7E,0x02,0x12,0x0D,0x7F,0x01,0x12,0x0E,0x7F,0x01,0x11,0x0F,0x7F,
169 0x00,0x10,0x10,0x00,0x7F,0x0F,0x11,0x01,0x7F,0x0E,0x12,0x01,0x7E,0x0D,0x12,0x03,
170 0x7E,0x0C,0x13,0x03,0x7E,0x0B,0x13,0x04,0x7E,0x0A,0x14,0x04,0x7D,0x09,0x14,0x06,
172 0x09,0x0F,0x09,0x7F,0x08,0x0F,0x09,0x00,0x07,0x0F,0x0A,0x00,0x06,0x0F,0x0A,0x01,
173 0x06,0x0E,0x0B,0x01,0x05,0x0E,0x0B,0x02,0x04,0x0E,0x0C,0x02,0x04,0x0D,0x0C,0x03,
174 0x03,0x0D,0x0D,0x03,0x02,0x0C,0x0D,0x05,0x02,0x0C,0x0E,0x04,0x01,0x0B,0x0E,0x06,
175 0x01,0x0B,0x0E,0x06,0x00,0x0A,0x0F,0x07,0x00,0x0A,0x0F,0x07,0x00,0x09,0x0F,0x08,
179 static const UCHAR SiS_Part2CLVX_4[] = { /* PAL */
181 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D,
182 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D,
183 0x7D,0x13,0x13,0x7D,0x7D,0x11,0x14,0x7E,0x7D,0x0F,0x16,0x7E,0x7D,0x0E,0x17,0x7E,
184 0x7D,0x0C,0x18,0x7F,0x7D,0x0A,0x18,0x01,0x7D,0x08,0x19,0x02,0x7D,0x06,0x19,0x04,
186 0x08,0x12,0x08,0x7E,0x07,0x12,0x09,0x7E,0x06,0x12,0x0A,0x7E,0x05,0x11,0x0B,0x7F,
187 0x04,0x11,0x0C,0x7F,0x03,0x11,0x0C,0x00,0x03,0x10,0x0D,0x00,0x02,0x0F,0x0E,0x01,
188 0x01,0x0F,0x0F,0x01,0x01,0x0E,0x0F,0x02,0x00,0x0D,0x10,0x03,0x7F,0x0C,0x11,0x04,
189 0x7F,0x0C,0x11,0x04,0x7F,0x0B,0x11,0x05,0x7E,0x0A,0x12,0x06,0x7E,0x09,0x12,0x07,
191 0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D,
192 0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C,
193 0x7C,0x14,0x14,0x7C,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x7D,0x7C,0x0D,0x18,0x7F,
194 0x7D,0x0B,0x19,0x7F,0x7D,0x09,0x1A,0x00,0x7D,0x07,0x1A,0x02,0x7E,0x05,0x1B,0x02,
198 static const UCHAR SiS_Part2CLVX_5[] = { /* 750p */
200 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D,
201 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D,
202 0x7D,0x13,0x13,0x7D,0x7D,0x11,0x14,0x7E,0x7D,0x0F,0x16,0x7E,0x7D,0x0E,0x17,0x7E,
203 0x7D,0x0C,0x18,0x7F,0x7D,0x0A,0x18,0x01,0x7D,0x08,0x19,0x02,0x7D,0x06,0x19,0x04,
207 static const UCHAR SiS_Part2CLVX_6[] = { /* 1080i */
209 0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D,
210 0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C,
211 0x7C,0x14,0x14,0x7C,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x1D /* 0x7D? */ ,0x7C,0x0D,0x18,0x7F,
212 0x7D,0x0B,0x19,0x7F,0x7D,0x09,0x1A,0x00,0x7D,0x07,0x1A,0x02,0x7E,0x05,0x1B,0x02,
218 /* 661 et al LCD data structure */
219 static const UCHAR SiS_LCDStruct661[] = {
221 0x0B,0xEA,0x81,0x10,0x00,0xC0,0x03,0x21,0x5A,0x23,0x5A,0x23,0x02,
222 0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x30,0x10,
224 0x09,0xEA,0x81,0x80,0xA3,0x70,0x03,0x19,0xD2,0x2A,0xF8,0x2F,0x02,
225 0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x30,0x10,
227 0x03,0xEA,0x81,0x40,0xA1,0x70,0x03,0x19,0xD2,0x2A,0xF8,0x2F,0x02,
228 0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x30,0x10,
230 0x02,0xEA,0x80,0x00,0x11,0x88,0x06,0x0B,0xF5,0x6C,0x35,0x62,0x02,
231 0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x28,0x10,
236 void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
237 void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
238 void SiS_EnableCRT2(SiS_Private *SiS_Pr);
239 USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
240 void SiS_WaitRetrace1(SiS_Private *SiS_Pr);
241 BOOLEAN SiS_IsDualEdge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
242 BOOLEAN SiS_IsVAMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
243 void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo);
244 void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo,
245 USHORT ModeIdIndex,PSIS_HW_INFO HwInfo,
247 void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
248 void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
249 void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
250 USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
251 USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
252 USHORT SiS_GetResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
253 void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
254 void SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
255 BOOLEAN SiS_SetCRT2Group(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo);
256 void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
257 void SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
259 void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
260 USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
261 void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
262 USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
263 void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
264 USHORT SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
265 void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh);
267 void SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
268 void SiS_Chrontel701xOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
269 void SiS_ChrontelInitTVVSync(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
270 void SiS_ChrontelDoSomething1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
271 void SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
272 void SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr);
275 USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
276 void SiS_SetSwitchDDC2(SiS_Private *SiS_Pr);
277 USHORT SiS_SetStart(SiS_Private *SiS_Pr);
278 USHORT SiS_SetStop(SiS_Private *SiS_Pr);
279 void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime);
280 USHORT SiS_SetSCLKLow(SiS_Private *SiS_Pr);
281 USHORT SiS_SetSCLKHigh(SiS_Private *SiS_Pr);
282 USHORT SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
283 USHORT SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
284 USHORT SiS_CheckACK(SiS_Private *SiS_Pr);
286 USHORT SiS_InitDDCRegs(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
287 USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32);
288 USHORT SiS_WriteDABDDC(SiS_Private *SiS_Pr);
289 USHORT SiS_PrepareReadDDC(SiS_Private *SiS_Pr);
290 USHORT SiS_PrepareDDC(SiS_Private *SiS_Pr);
291 void SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno);
292 USHORT SiS_DoProbeDDC(SiS_Private *SiS_Pr);
293 USHORT SiS_ProbeDDC(SiS_Private *SiS_Pr);
294 USHORT SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, unsigned char *buffer);
295 USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
296 USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer);
298 USHORT SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS);
299 USHORT SiS_SenseVGA2DDC(SiS_Private *SiS_Pr, SISPtr pSiS);
303 void SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
304 USHORT ModeNo,USHORT ModeIdIndex);
305 void SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
306 USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI);
307 void SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO);
310 void SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
311 USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex);
312 void SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
313 USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex);
316 extern void SiS_SetReg(SISIOADDRESS, USHORT, USHORT);
317 extern void SiS_SetRegByte(SISIOADDRESS, USHORT);
318 extern void SiS_SetRegShort(SISIOADDRESS, USHORT);
319 extern void SiS_SetRegLong(SISIOADDRESS, ULONG);
320 extern UCHAR SiS_GetReg(SISIOADDRESS, USHORT);
321 extern UCHAR SiS_GetRegByte(SISIOADDRESS);
322 extern USHORT SiS_GetRegShort(SISIOADDRESS);
323 extern ULONG SiS_GetRegLong(SISIOADDRESS);
324 extern void SiS_SetRegANDOR(SISIOADDRESS Port,USHORT Index,USHORT DataAND,USHORT DataOR);
325 extern void SiS_SetRegOR(SISIOADDRESS Port,USHORT Index,USHORT DataOR);
326 extern void SiS_SetRegAND(SISIOADDRESS Port,USHORT Index,USHORT DataAND);
328 extern void SiS_DisplayOff(SiS_Private *SiS_Pr);
329 extern void SiS_DisplayOn(SiS_Private *SiS_Pr);
331 extern BOOLEAN SiS_SearchModeID(SiS_Private *, USHORT *, USHORT *);
332 extern UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo,USHORT ModeIdIndex);
334 extern USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
335 extern USHORT SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
336 USHORT RefreshRateTableIndex,PSIS_HW_INFO HwInfo);
338 extern void SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO,USHORT ModeNo,