1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.h,v 1.23 2003/09/09 10:29:01 twini Exp $ */
3 * Data and prototypes for init301.c
5 * Copyright 2002, 2003 by Thomas Winischhofer, Vienna, Austria
7 * If distributed as part of the linux kernel, the contents of this file
8 * is entirely covered by the GPL.
10 * Otherwise, the following terms apply:
12 * Permission to use, copy, modify, distribute, and sell this software and its
13 * documentation for any purpose is hereby granted without fee, provided that
14 * the above copyright notice appear in all copies and that both that
15 * copyright notice and this permission notice appear in supporting
16 * documentation, and that the name of the copyright holder not be used in
17 * advertising or publicity pertaining to distribution of the software without
18 * specific, written prior permission. The copyright holder makes no representations
19 * about the suitability of this software for any purpose. It is provided
20 * "as is" without express or implied warranty.
22 * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
23 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
24 * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
25 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
26 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
27 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28 * PERFORMANCE OF THIS SOFTWARE.
30 * Author: Thomas Winischhofer <thomas@winischhofer.net>
32 * Based on code by Silicon Intergrated Systems
48 #include "xf86PciInfo.h"
57 #include <linux/config.h>
58 #include <linux/version.h>
60 #include <linux/types.h>
61 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
62 #include <linux/sisfb.h>
64 #include <video/sisfb.h>
68 const UCHAR SiS_HiVisionTable
[3][64] = {
70 0x17, 0x1d, 0x03, 0x09, 0x05, 0x06, 0x0c, 0x0c,
71 0x94, 0x49, 0x01, 0x0a, 0x06, 0x0d, 0x04, 0x0a,
72 0x06, 0x14, 0x0d, 0x04, 0x0a, 0x00, 0x85, 0x1b,
73 0x0c, 0x50, 0x00, 0x97, 0x00, 0xd4, 0x4a, 0x17,
74 0x7d, 0x05, 0x4b, 0x00, 0x00, 0xe2, 0x00, 0x02,
75 0x03, 0x0a, 0x65, 0x9d, 0x08, 0x92, 0x8f, 0x40,
76 0x60, 0x80, 0x14, 0x90, 0x8c, 0x60, 0x14, 0x53,
77 0x00, 0x40, 0x44, 0x00, 0xdb, 0x02, 0x3b, 0x00
80 0x1d, 0x1d, 0x06, 0x09, 0x0b, 0x0c, 0x0c, 0x0c,
81 0x98, 0x0a, 0x01, 0x0d, 0x06, 0x0d, 0x04, 0x0a,
82 0x06, 0x14, 0x0d, 0x04, 0x0a, 0x00, 0x85, 0x3f,
83 0x0c, 0x50, 0xb2, 0x2e, 0x16, 0xb5, 0xf4, 0x03,
84 0x7d, 0x11, 0x7d, 0xea, 0x30, 0x36, 0x18, 0x96,
85 0x21, 0x0a, 0x58, 0xee, 0x42, 0x92, 0x0f, 0x40,
86 0x60, 0x80, 0x14, 0x90, 0x8c, 0x60, 0x04, 0xf3,
87 0x00, 0x40, 0x11, 0x00, 0xfc, 0xff, 0x32, 0x00
90 0x13, 0x1d, 0xe8, 0x09, 0x09, 0xed, 0x0c, 0x0c,
91 0x98, 0x0a, 0x01, 0x0c, 0x06, 0x0d, 0x04, 0x0a,
92 0x06, 0x14, 0x0d, 0x04, 0x0a, 0x00, 0x85, 0x3f,
93 0xed, 0x50, 0x70, 0x9f, 0x16, 0x59, 0x2b, 0x13,
94 0x27, 0x0b, 0x27, 0xfc, 0x30, 0x27, 0x1c, 0xb0,
95 0x4b, 0x4b, 0x6f, 0x2f, 0x63, 0x92, 0x0f, 0x40,
96 0x60, 0x80, 0x14, 0x90, 0x8c, 0x60, 0x14, 0x2a,
97 0x00, 0x40, 0x11, 0x00, 0xfc, 0xff, 0x32, 0x00
101 const UCHAR SiS_HiTVGroup3_1
[] = {
102 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13,
103 0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6,
104 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
105 0xac, 0xda, 0x60, 0xfe, 0x6a, 0x9a, 0x06, 0x10,
106 0xd1, 0x04, 0x18, 0x0a, 0xff, 0x80, 0x00, 0x80,
107 0x3b, 0x77, 0x00, 0xef, 0xe0, 0x10, 0xb0, 0xe0,
108 0x10, 0x4f, 0x0f, 0x0f, 0x05, 0x0f, 0x08, 0x6e,
109 0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01
112 const UCHAR SiS_HiTVGroup3_2
[] = {
113 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a,
114 0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6,
115 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
116 0xac, 0x6a, 0x60, 0x2b, 0x52, 0xcd, 0x61, 0x10,
117 0x51, 0x04, 0x18, 0x0a, 0x1f, 0x80, 0x00, 0x80,
118 0xff, 0xa4, 0x04, 0x2b, 0x94, 0x21, 0x72, 0x94,
119 0x26, 0x05, 0x01, 0x0f, 0xed, 0x0f, 0x0a, 0x64,
120 0x18, 0x1d, 0x23, 0x28, 0x4c, 0xaa, 0x01
123 extern BOOLEAN
SiS_SearchVBModeID(SiS_Private
*SiS_Pr
, UCHAR
*RomAddr
, USHORT
*);
125 BOOLEAN
SiS_Is301B(SiS_Private
*SiS_Pr
, USHORT BaseAddr
);
126 BOOLEAN
SiS_IsNotM650or651(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
127 BOOLEAN
SiS_IsVAMode(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
128 BOOLEAN
SiS_IsDualEdge(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
129 BOOLEAN
SiS_IsDualLink(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
130 BOOLEAN
SiS_CRT2IsLCD(SiS_Private
*SiS_Pr
, USHORT BaseAddr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
131 void SiS_SetDefCRT2ExtRegs(SiS_Private
*SiS_Pr
, USHORT BaseAddr
);
132 USHORT
SiS_GetRatePtrCRT2(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
, USHORT ModeNo
,USHORT ModeIdIndex
,
133 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
134 BOOLEAN
SiS_AdjustCRT2Rate(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT MODEIdIndex
,
135 USHORT RefreshRateTableIndex
,USHORT
*i
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
136 void SiS_SaveCRT2Info(SiS_Private
*SiS_Pr
, USHORT ModeNo
);
137 void SiS_GetCRT2Data(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
138 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
139 void SiS_GetCRT2DataLVDS(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
140 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
142 void SiS_GetCRT2PtrA(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
143 USHORT RefreshRateTableIndex
,USHORT
*CRT2Index
,USHORT
*ResIndex
);
145 void SiS_GetCRT2Part2Ptr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
146 USHORT RefreshRateTableIndex
,USHORT
*CRT2Index
, USHORT
*ResIndex
,
147 PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
148 void SiS_GetCRT2Data301(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
149 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
150 USHORT
SiS_GetResInfo(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
);
151 void SiS_GetCRT2ResInfo(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
152 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
153 void SiS_GetRAMDAC2DATA(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
154 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
155 void SiS_GetCRT2Ptr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
156 USHORT RefreshRateTableIndex
,USHORT
*CRT2Index
,USHORT
*ResIndex
,
157 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
158 void SiS_SetCRT2ModeRegs(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
159 PSIS_HW_DEVICE_INFO
);
160 void SiS_SetHiVision(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
161 void SiS_GetLVDSDesData(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
162 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
,
164 void SiS_SetCRT2Offset(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
165 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
166 USHORT
SiS_GetOffset(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
167 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
168 USHORT
SiS_GetColorDepth(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
);
169 USHORT
SiS_GetMCLK(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
170 USHORT
SiS_CalcDelayVB(SiS_Private
*SiS_Pr
);
171 USHORT
SiS_GetVCLK2Ptr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
172 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
173 void SiS_SetCRT2Sync(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,
174 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
175 void SiS_SetRegANDOR(USHORT Port
,USHORT Index
,USHORT DataAND
,USHORT DataOR
);
176 void SiS_SetRegOR(USHORT Port
,USHORT Index
,USHORT DataOR
);
177 void SiS_SetRegAND(USHORT Port
,USHORT Index
,USHORT DataAND
);
178 USHORT
SiS_GetVGAHT2(SiS_Private
*SiS_Pr
);
179 void SiS_Set300Part2Regs(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
,
180 USHORT ModeIdIndex
, USHORT RefreshRateTableIndex
,
181 USHORT BaseAddr
, USHORT ModeNo
);
182 void SiS_SetGroup2(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
183 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
184 void SiS_SetGroup3(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
185 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
186 void SiS_SetGroup4(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
187 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
188 void SiS_SetGroup5(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,
190 void SiS_FinalizeLCD(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
191 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
192 void SiS_SetCRT2VCLK(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
193 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
194 void SiS_EnableCRT2(SiS_Private
*SiS_Pr
);
195 void SiS_GetVBInfo(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
196 PSIS_HW_DEVICE_INFO HwDeviceExtension
, int checkcrt2mode
);
197 BOOLEAN
SiS_BridgeIsOn(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,PSIS_HW_DEVICE_INFO
);
198 BOOLEAN
SiS_BridgeIsEnable(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,PSIS_HW_DEVICE_INFO
);
199 BOOLEAN
SiS_BridgeInSlave(SiS_Private
*SiS_Pr
);
200 void SiS_SetTVSystem(SiS_Private
*SiS_Pr
);
201 void SiS_LongWait(SiS_Private
*SiS_Pr
);
202 USHORT
SiS_GetQueueConfig(SiS_Private
*SiS_Pr
);
203 void SiS_VBLongWait(SiS_Private
*SiS_Pr
);
204 USHORT
SiS_GetVCLKLen(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
);
205 void SiS_WaitVBRetrace(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
206 void SiS_WaitRetrace1(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
207 void SiS_WaitRetrace2(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
208 void SiS_WaitRetraceDDC(SiS_Private
*SiS_Pr
);
209 void SiS_SetCRT2ECLK(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
, USHORT ModeNo
,USHORT ModeIdIndex
,
210 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
211 void SiS_GetLVDSDesPtr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
212 USHORT RefreshRateTableIndex
,USHORT
*PanelIndex
,USHORT
*ResIndex
,
213 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
215 void SiS_GetLVDSDesPtrA(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
216 USHORT RefreshRateTableIndex
,USHORT
*PanelIndex
,USHORT
*ResIndex
,
217 PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
219 void SiS_SetTPData(SiS_Private
*SiS_Pr
);
220 void SiS_SetChrontelGPIO(SiS_Private
*SiS_Pr
, USHORT myvbinfo
);
221 void SiS_ModCRT1CRTC(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
222 USHORT RefreshRateTableIndex
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
223 void SiS_SetCHTVReg(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
224 USHORT RefreshRateTableIndex
);
225 void SiS_GetCHTVRegPtr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
226 USHORT RefreshRateTableIndex
);
227 void SiS_SetCH700x(SiS_Private
*SiS_Pr
, USHORT tempax
);
228 USHORT
SiS_GetCH700x(SiS_Private
*SiS_Pr
, USHORT tempax
);
229 void SiS_SetCH701x(SiS_Private
*SiS_Pr
, USHORT tempax
);
230 USHORT
SiS_GetCH701x(SiS_Private
*SiS_Pr
, USHORT tempax
);
231 void SiS_SetCH70xx(SiS_Private
*SiS_Pr
, USHORT tempax
);
232 USHORT
SiS_GetCH70xx(SiS_Private
*SiS_Pr
, USHORT tempax
);
234 USHORT
SiS_I2C_GetByte(SiS_Private
*SiS_Pr
);
235 Bool
SiS_I2C_PutByte(SiS_Private
*SiS_Pr
, USHORT data
);
236 Bool
SiS_I2C_Address(SiS_Private
*SiS_Pr
, USHORT addr
);
237 void SiS_I2C_Stop(SiS_Private
*SiS_Pr
);
239 void SiS_SetCH70xxANDOR(SiS_Private
*SiS_Pr
, USHORT tempax
,USHORT tempbh
);
240 void SiS_SetSwitchDDC2(SiS_Private
*SiS_Pr
);
241 USHORT
SiS_SetStart(SiS_Private
*SiS_Pr
);
242 USHORT
SiS_SetStop(SiS_Private
*SiS_Pr
);
243 void SiS_DDC2Delay(SiS_Private
*SiS_Pr
, USHORT delaytime
);
244 USHORT
SiS_SetSCLKLow(SiS_Private
*SiS_Pr
);
245 USHORT
SiS_SetSCLKHigh(SiS_Private
*SiS_Pr
);
246 USHORT
SiS_ReadDDC2Data(SiS_Private
*SiS_Pr
, USHORT tempax
);
247 USHORT
SiS_WriteDDC2Data(SiS_Private
*SiS_Pr
, USHORT tempax
);
248 USHORT
SiS_CheckACK(SiS_Private
*SiS_Pr
);
251 void SiS_OEM310Setting(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT BaseAddr
,
252 UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
);
253 void SiS_OEMLCD(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT BaseAddr
,
254 UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,USHORT RefreshRateTableIndex
);
257 void SiS_OEM300Setting(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT BaseAddr
,
258 UCHAR
*ROMAddr
,USHORT ModeNo
, USHORT ModeIdIndex
, USHORT RefTabindex
);
259 void SetOEMLCDData2(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT BaseAddr
,
260 UCHAR
*ROMAddr
, USHORT ModeNo
, USHORT ModeIdIndex
,USHORT RefTableIndex
);
262 BOOLEAN
SiS_LowModeStuff(SiS_Private
*SiS_Pr
, USHORT ModeNo
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
264 void SiS_GetLCDResInfo(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
, USHORT ModeIdIndex
,
265 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
266 /* void SiS_CHACRT1CRTC(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex,
267 USHORT RefreshRateTableIndex); */
269 BOOLEAN
SiS_SetCRT2Group(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,
270 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
271 void SiS_SetGroup1(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
272 PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT RefreshRateTableIndex
);
273 void SiS_SetGroup1_LVDS(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
274 PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT RefreshRateTableIndex
);
276 void SiS_SetGroup1_LCDA(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
277 PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT RefreshRateTableIndex
);
279 void SiS_SetGroup1_301(SiS_Private
*SiS_Pr
, USHORT BaseAddr
,UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
280 PSIS_HW_DEVICE_INFO HwDeviceExtension
,USHORT RefreshRateTableIndex
);
282 void SiS_SetCRT2FIFO_300(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,
283 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
286 void SiS_SetCRT2FIFO_310(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,
287 PSIS_HW_DEVICE_INFO HwDeviceExtension
);
288 void SiS_CRT2AutoThreshold(SiS_Private
*SiS_Pr
, USHORT BaseAddr
);
290 BOOLEAN
SiS_GetLCDDDCInfo(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
291 void SiS_UnLockCRT2(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO
,USHORT BaseAddr
);
292 void SiS_LockCRT2(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO
,USHORT BaseAddr
);
293 void SiS_DisableBridge(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO
,USHORT BaseAddr
);
294 void SiS_EnableBridge(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO
,USHORT BaseAddr
);
295 void SiS_SetPanelDelay(SiS_Private
*SiS_Pr
, UCHAR
* ROMAddr
,PSIS_HW_DEVICE_INFO
,USHORT DelayTime
);
296 void SiS_SetPanelDelayLoop(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
,
297 USHORT DelayTime
, USHORT DelayLoop
);
298 void SiS_ShortDelay(SiS_Private
*SiS_Pr
, USHORT delay
);
299 void SiS_LongDelay(SiS_Private
*SiS_Pr
, USHORT delay
);
300 void SiS_GenericDelay(SiS_Private
*SiS_Pr
, USHORT delay
);
301 void SiS_VBWait(SiS_Private
*SiS_Pr
);
303 void SiS_SiS30xBLOn(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
304 void SiS_SiS30xBLOff(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
306 void SiS_Chrontel701xBLOn(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
307 void SiS_Chrontel701xBLOff(SiS_Private
*SiS_Pr
);
309 void SiS_Chrontel701xOn(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
,
311 void SiS_Chrontel701xOff(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
312 void SiS_ChrontelResetDB(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
313 void SiS_ChrontelDoSomething4(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
314 void SiS_ChrontelDoSomething3(SiS_Private
*SiS_Pr
, USHORT ModeNo
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
315 void SiS_ChrontelDoSomething2(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
316 void SiS_ChrontelDoSomething1(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
317 BOOLEAN
SiS_WeHaveBacklightCtrl(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
318 void SiS_ChrontelPowerSequencing(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
319 void SiS_SetCH701xForLCD(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
321 void SiS_ChrontelDoSomething5(SiS_Private
*SiS_Pr
);
325 BOOLEAN
SiS_IsSomethingCR5F(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
327 BOOLEAN
SiS_IsYPbPr(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
328 BOOLEAN
SiS_IsChScart(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
329 BOOLEAN
SiS_IsTVOrYPbPrOrScart(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
330 BOOLEAN
SiS_IsLCDOrLCDA(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
, USHORT BaseAddr
);
331 BOOLEAN
SiS_CR36BIOSWord23b(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
332 BOOLEAN
SiS_CR36BIOSWord23d(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
333 BOOLEAN
SiS_IsSR13_CR30(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO HwDeviceExtension
);
335 extern void SiS_SetReg1(USHORT
, USHORT
, USHORT
);
336 extern void SiS_SetReg3(USHORT
, USHORT
);
337 extern UCHAR
SiS_GetReg1(USHORT
, USHORT
);
338 extern UCHAR
SiS_GetReg2(USHORT
);
339 extern BOOLEAN
SiS_SearchModeID(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
, USHORT
*ModeNo
,USHORT
*ModeIdIndex
);
340 extern BOOLEAN
SiS_GetRatePtr(SiS_Private
*SiS_Pr
, ULONG
, USHORT
);
341 extern void SiS_SetReg4(USHORT
, ULONG
);
342 extern ULONG
SiS_GetReg3(USHORT
);
343 extern void SiS_SetReg5(USHORT
, USHORT
);
344 extern USHORT
SiS_GetReg4(USHORT
);
345 extern void SiS_DisplayOff(SiS_Private
*SiS_Pr
);
346 extern void SiS_DisplayOn(SiS_Private
*SiS_Pr
);
347 extern UCHAR
SiS_GetModePtr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
, USHORT ModeNo
,USHORT ModeIdIndex
);
348 extern BOOLEAN
SiS_GetLCDACRT1Ptr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
349 USHORT RefreshRateTableIndex
,USHORT
*ResInfo
,USHORT
*DisplayType
);
350 extern BOOLEAN
SiS_GetLVDSCRT1Ptr(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,USHORT ModeNo
,USHORT ModeIdIndex
,
351 USHORT RefreshRateTableIndex
,USHORT
*ResInfo
,USHORT
*DisplayType
);
352 extern void SiS_LoadDAC(SiS_Private
*SiS_Pr
, PSIS_HW_DEVICE_INFO
, UCHAR
*ROMAddr
,USHORT ModeNo
,
355 extern UCHAR
SiS_Get310DRAMType(SiS_Private
*SiS_Pr
, UCHAR
*ROMAddr
,PSIS_HW_DEVICE_INFO HwDeviceExtension
);
359 USHORT
SiS_InitDDCRegs(SiS_Private
*SiS_Pr
, unsigned long VBFlags
, int VGAEngine
,
360 USHORT adaptnum
, USHORT DDCdatatype
, BOOLEAN checkcr32
);
361 USHORT
SiS_WriteDABDDC(SiS_Private
*SiS_Pr
);
362 USHORT
SiS_PrepareReadDDC(SiS_Private
*SiS_Pr
);
363 USHORT
SiS_PrepareDDC(SiS_Private
*SiS_Pr
);
364 void SiS_SendACK(SiS_Private
*SiS_Pr
, USHORT yesno
);
365 USHORT
SiS_DoProbeDDC(SiS_Private
*SiS_Pr
);
366 USHORT
SiS_ProbeDDC(SiS_Private
*SiS_Pr
);
367 USHORT
SiS_ReadDDC(SiS_Private
*SiS_Pr
, USHORT DDCdatatype
, unsigned char *buffer
);
368 USHORT
SiS_HandleDDC(SiS_Private
*SiS_Pr
, unsigned long VBFlags
, int VGAEngine
,
369 USHORT adaptnum
, USHORT DDCdatatype
, unsigned char *buffer
);
371 USHORT
SiS_SenseLCDDDC(SiS_Private
*SiS_Pr
, SISPtr pSiS
);
372 USHORT
SiS_SenseVGA2DDC(SiS_Private
*SiS_Pr
, SISPtr pSiS
);