Lines Matching refs:SiS_Pr

86 InitCommonPointer(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)  in InitCommonPointer()  argument
88 SiS_Pr->SiS_StResInfo = SiS_StResInfo; in InitCommonPointer()
89 SiS_Pr->SiS_ModeResInfo = SiS_ModeResInfo; in InitCommonPointer()
90 SiS_Pr->SiS_StandTable = SiS_StandTable; in InitCommonPointer()
92 SiS_Pr->SiS_NTSCPhase = SiS_NTSCPhase; in InitCommonPointer()
93 SiS_Pr->SiS_PALPhase = SiS_PALPhase; in InitCommonPointer()
94 SiS_Pr->SiS_NTSCPhase2 = SiS_NTSCPhase2; in InitCommonPointer()
95 SiS_Pr->SiS_PALPhase2 = SiS_PALPhase2; in InitCommonPointer()
96 SiS_Pr->SiS_PALMPhase = SiS_PALMPhase; in InitCommonPointer()
97 SiS_Pr->SiS_PALNPhase = SiS_PALNPhase; in InitCommonPointer()
98 SiS_Pr->SiS_PALMPhase2 = SiS_PALMPhase2; in InitCommonPointer()
99 SiS_Pr->SiS_PALNPhase2 = SiS_PALNPhase2; in InitCommonPointer()
100 SiS_Pr->SiS_SpecialPhase = SiS_SpecialPhase; in InitCommonPointer()
101 SiS_Pr->SiS_SpecialPhaseM = SiS_SpecialPhaseM; in InitCommonPointer()
102 SiS_Pr->SiS_SpecialPhaseJ = SiS_SpecialPhaseJ; in InitCommonPointer()
104 SiS_Pr->SiS_NTSCTiming = SiS_NTSCTiming; in InitCommonPointer()
105 SiS_Pr->SiS_PALTiming = SiS_PALTiming; in InitCommonPointer()
106 SiS_Pr->SiS_HiTVSt1Timing = SiS_HiTVSt1Timing; in InitCommonPointer()
107 SiS_Pr->SiS_HiTVSt2Timing = SiS_HiTVSt2Timing; in InitCommonPointer()
109 SiS_Pr->SiS_HiTVExtTiming = SiS_HiTVExtTiming; in InitCommonPointer()
110 SiS_Pr->SiS_HiTVGroup3Data = SiS_HiTVGroup3Data; in InitCommonPointer()
111 SiS_Pr->SiS_HiTVGroup3Simu = SiS_HiTVGroup3Simu; in InitCommonPointer()
113 SiS_Pr->SiS_HiTVTextTiming = SiS_HiTVTextTiming; in InitCommonPointer()
114 SiS_Pr->SiS_HiTVGroup3Text = SiS_HiTVGroup3Text; in InitCommonPointer()
117 SiS_Pr->SiS_StPALData = SiS_StPALData; in InitCommonPointer()
118 SiS_Pr->SiS_ExtPALData = SiS_ExtPALData; in InitCommonPointer()
119 SiS_Pr->SiS_StNTSCData = SiS_StNTSCData; in InitCommonPointer()
120 SiS_Pr->SiS_ExtNTSCData = SiS_ExtNTSCData; in InitCommonPointer()
121 SiS_Pr->SiS_St1HiTVData = SiS_StHiTVData; in InitCommonPointer()
122 SiS_Pr->SiS_St2HiTVData = SiS_St2HiTVData; in InitCommonPointer()
123 SiS_Pr->SiS_ExtHiTVData = SiS_ExtHiTVData; in InitCommonPointer()
124 SiS_Pr->SiS_St525iData = SiS_StNTSCData; in InitCommonPointer()
125 SiS_Pr->SiS_St525pData = SiS_St525pData; in InitCommonPointer()
126 SiS_Pr->SiS_St750pData = SiS_St750pData; in InitCommonPointer()
127 SiS_Pr->SiS_Ext525iData = SiS_ExtNTSCData; in InitCommonPointer()
128 SiS_Pr->SiS_Ext525pData = SiS_ExtNTSCData; in InitCommonPointer()
129 SiS_Pr->SiS_Ext750pData = SiS_Ext750pData; in InitCommonPointer()
131 SiS_Pr->pSiS_OutputSelect = &SiS_OutputSelect; in InitCommonPointer()
132 SiS_Pr->pSiS_SoftSetting = &SiS_SoftSetting; in InitCommonPointer()
134 SiS_Pr->SiS_LCD1280x720Data = SiS_LCD1280x720Data; in InitCommonPointer()
135 SiS_Pr->SiS_StLCD1280x768_2Data = SiS_StLCD1280x768_2Data; in InitCommonPointer()
136 SiS_Pr->SiS_ExtLCD1280x768_2Data = SiS_ExtLCD1280x768_2Data; in InitCommonPointer()
137 SiS_Pr->SiS_LCD1280x768_3Data = SiS_LCD1280x768_3Data; in InitCommonPointer()
138 SiS_Pr->SiS_LCD1280x800Data = SiS_LCD1280x800Data; in InitCommonPointer()
139 SiS_Pr->SiS_LCD1280x960Data = SiS_LCD1280x960Data; in InitCommonPointer()
140 SiS_Pr->SiS_StLCD1400x1050Data = SiS_StLCD1400x1050Data; in InitCommonPointer()
141 SiS_Pr->SiS_ExtLCD1400x1050Data = SiS_ExtLCD1400x1050Data; in InitCommonPointer()
142 SiS_Pr->SiS_LCD1680x1050Data = SiS_LCD1680x1050Data; in InitCommonPointer()
143 SiS_Pr->SiS_StLCD1600x1200Data = SiS_StLCD1600x1200Data; in InitCommonPointer()
144 SiS_Pr->SiS_ExtLCD1600x1200Data = SiS_ExtLCD1600x1200Data; in InitCommonPointer()
145 SiS_Pr->SiS_NoScaleData = SiS_NoScaleData; in InitCommonPointer()
147 SiS_Pr->SiS_LVDS320x480Data_1 = SiS_LVDS320x480Data_1; in InitCommonPointer()
148 SiS_Pr->SiS_LVDS800x600Data_1 = SiS_LVDS800x600Data_1; in InitCommonPointer()
149 SiS_Pr->SiS_LVDS800x600Data_2 = SiS_LVDS800x600Data_2; in InitCommonPointer()
150 SiS_Pr->SiS_LVDS1024x768Data_1 = SiS_LVDS1024x768Data_1; in InitCommonPointer()
151 SiS_Pr->SiS_LVDS1024x768Data_2 = SiS_LVDS1024x768Data_2; in InitCommonPointer()
152 SiS_Pr->SiS_LVDS1280x1024Data_1 = SiS_LVDS1280x1024Data_1; in InitCommonPointer()
153 SiS_Pr->SiS_LVDS1280x1024Data_2 = SiS_LVDS1280x1024Data_2; in InitCommonPointer()
154 SiS_Pr->SiS_LVDS1400x1050Data_1 = SiS_LVDS1400x1050Data_1; in InitCommonPointer()
155 SiS_Pr->SiS_LVDS1400x1050Data_2 = SiS_LVDS1400x1050Data_2; in InitCommonPointer()
156 SiS_Pr->SiS_LVDS1600x1200Data_1 = SiS_LVDS1600x1200Data_1; in InitCommonPointer()
157 SiS_Pr->SiS_LVDS1600x1200Data_2 = SiS_LVDS1600x1200Data_2; in InitCommonPointer()
158 SiS_Pr->SiS_LVDS1280x768Data_1 = SiS_LVDS1280x768Data_1; in InitCommonPointer()
159 SiS_Pr->SiS_LVDS1280x768Data_2 = SiS_LVDS1280x768Data_2; in InitCommonPointer()
160 SiS_Pr->SiS_LVDS1024x600Data_1 = SiS_LVDS1024x600Data_1; in InitCommonPointer()
161 SiS_Pr->SiS_LVDS1024x600Data_2 = SiS_LVDS1024x600Data_2; in InitCommonPointer()
162 SiS_Pr->SiS_LVDS1152x768Data_1 = SiS_LVDS1152x768Data_1; in InitCommonPointer()
163 SiS_Pr->SiS_LVDS1152x768Data_2 = SiS_LVDS1152x768Data_2; in InitCommonPointer()
164 SiS_Pr->SiS_LVDSXXXxXXXData_1 = SiS_LVDSXXXxXXXData_1; in InitCommonPointer()
165 SiS_Pr->SiS_LVDS1280x960Data_1 = SiS_LVDS1280x960Data_1; in InitCommonPointer()
166 SiS_Pr->SiS_LVDS1280x960Data_2 = SiS_LVDS1280x960Data_2; in InitCommonPointer()
167 SiS_Pr->SiS_LVDS640x480Data_1 = SiS_LVDS640x480Data_1; in InitCommonPointer()
168 SiS_Pr->SiS_LVDS1280x960Data_1 = SiS_LVDS1280x1024Data_1; in InitCommonPointer()
169 SiS_Pr->SiS_LVDS1280x960Data_2 = SiS_LVDS1280x1024Data_2; in InitCommonPointer()
170 SiS_Pr->SiS_LVDS640x480Data_1 = SiS_LVDS640x480Data_1; in InitCommonPointer()
171 SiS_Pr->SiS_LVDS640x480Data_2 = SiS_LVDS640x480Data_2; in InitCommonPointer()
173 SiS_Pr->SiS_LVDS848x480Data_1 = SiS_LVDS848x480Data_1; in InitCommonPointer()
174 SiS_Pr->SiS_LVDS848x480Data_2 = SiS_LVDS848x480Data_2; in InitCommonPointer()
175 SiS_Pr->SiS_LVDSBARCO1024Data_1 = SiS_LVDSBARCO1024Data_1; in InitCommonPointer()
176 SiS_Pr->SiS_LVDSBARCO1024Data_2 = SiS_LVDSBARCO1024Data_2; in InitCommonPointer()
177 SiS_Pr->SiS_LVDSBARCO1366Data_1 = SiS_LVDSBARCO1366Data_1; in InitCommonPointer()
178 SiS_Pr->SiS_LVDSBARCO1366Data_2 = SiS_LVDSBARCO1366Data_2; in InitCommonPointer()
180 SiS_Pr->SiS_LVDSCRT11280x768_1 = SiS_LVDSCRT11280x768_1; in InitCommonPointer()
181 SiS_Pr->SiS_LVDSCRT11024x600_1 = SiS_LVDSCRT11024x600_1; in InitCommonPointer()
182 SiS_Pr->SiS_LVDSCRT11152x768_1 = SiS_LVDSCRT11152x768_1; in InitCommonPointer()
183 SiS_Pr->SiS_LVDSCRT11280x768_1_H = SiS_LVDSCRT11280x768_1_H; in InitCommonPointer()
184 SiS_Pr->SiS_LVDSCRT11024x600_1_H = SiS_LVDSCRT11024x600_1_H; in InitCommonPointer()
185 SiS_Pr->SiS_LVDSCRT11152x768_1_H = SiS_LVDSCRT11152x768_1_H; in InitCommonPointer()
186 SiS_Pr->SiS_LVDSCRT11280x768_2 = SiS_LVDSCRT11280x768_2; in InitCommonPointer()
187 SiS_Pr->SiS_LVDSCRT11024x600_2 = SiS_LVDSCRT11024x600_2; in InitCommonPointer()
188 SiS_Pr->SiS_LVDSCRT11152x768_2 = SiS_LVDSCRT11152x768_2; in InitCommonPointer()
189 SiS_Pr->SiS_LVDSCRT11280x768_2_H = SiS_LVDSCRT11280x768_2_H; in InitCommonPointer()
190 SiS_Pr->SiS_LVDSCRT11024x600_2_H = SiS_LVDSCRT11024x600_2_H; in InitCommonPointer()
191 SiS_Pr->SiS_LVDSCRT11152x768_2_H = SiS_LVDSCRT11152x768_2_H; in InitCommonPointer()
192 SiS_Pr->SiS_LVDSCRT1320x480_1 = SiS_LVDSCRT1320x480_1; in InitCommonPointer()
193 SiS_Pr->SiS_LVDSCRT1640x480_1 = SiS_LVDSCRT1640x480_1; in InitCommonPointer()
194 SiS_Pr->SiS_LVDSCRT1640x480_1_H = SiS_LVDSCRT1640x480_1_H; in InitCommonPointer()
195 SiS_Pr->SiS_LVDSCRT1640x480_2 = SiS_LVDSCRT1640x480_2; in InitCommonPointer()
196 SiS_Pr->SiS_LVDSCRT1640x480_2_H = SiS_LVDSCRT1640x480_2_H; in InitCommonPointer()
197 SiS_Pr->SiS_LVDSCRT1640x480_3 = SiS_LVDSCRT1640x480_3; in InitCommonPointer()
198 SiS_Pr->SiS_LVDSCRT1640x480_3_H = SiS_LVDSCRT1640x480_3_H; in InitCommonPointer()
200 SiS_Pr->SiS_CHTVUNTSCData = SiS_CHTVUNTSCData; in InitCommonPointer()
201 SiS_Pr->SiS_CHTVONTSCData = SiS_CHTVONTSCData; in InitCommonPointer()
203 SiS_Pr->SiS_CHTVUNTSCDesData = SiS_CHTVUNTSCDesData; in InitCommonPointer()
204 SiS_Pr->SiS_CHTVONTSCDesData = SiS_CHTVONTSCDesData; in InitCommonPointer()
205 SiS_Pr->SiS_CHTVUPALDesData = SiS_CHTVUPALDesData; in InitCommonPointer()
206 SiS_Pr->SiS_CHTVOPALDesData = SiS_CHTVOPALDesData; in InitCommonPointer()
208 SiS_Pr->SiS_PanelMinLVDS = Panel_800x600; /* lowest value LVDS/LCDA */ in InitCommonPointer()
209 SiS_Pr->SiS_PanelMin301 = Panel_1024x768; /* lowest value 301 */ in InitCommonPointer()
214 InitTo300Pointer(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in InitTo300Pointer() argument
216 InitCommonPointer(SiS_Pr, HwInfo); in InitTo300Pointer()
246 SiS_Pr->SiS_SModeIDTable = SiS300_SModeIDTable; in InitTo300Pointer()
247 SiS_Pr->SiS_VBModeIDTable = SiS300_VBModeIDTable; in InitTo300Pointer()
248 SiS_Pr->SiS_EModeIDTable = SiS300_EModeIDTable; in InitTo300Pointer()
249 SiS_Pr->SiS_RefIndex = SiS300_RefIndex; in InitTo300Pointer()
250 SiS_Pr->SiS_CRT1Table = SiS300_CRT1Table; in InitTo300Pointer()
252 SiS_Pr->SiS_MCLKData_0 = SiS300_MCLKData_300; /* 300 */ in InitTo300Pointer()
254 SiS_Pr->SiS_MCLKData_0 = SiS300_MCLKData_630; /* 630, 730 */ in InitTo300Pointer()
256 SiS_Pr->SiS_VCLKData = SiS300_VCLKData; in InitTo300Pointer()
257 SiS_Pr->SiS_VBVCLKData = (SiS_VBVCLKDataStruct *)SiS300_VCLKData; in InitTo300Pointer()
259 SiS_Pr->SiS_SR15 = SiS300_SR15; in InitTo300Pointer()
262 SiS_Pr->pSiS_SR07 = &SiS300_SR07; in InitTo300Pointer()
263 SiS_Pr->SiS_CR40 = SiS300_CR40; in InitTo300Pointer()
264 SiS_Pr->SiS_CR49 = SiS300_CR49; in InitTo300Pointer()
265 SiS_Pr->pSiS_SR1F = &SiS300_SR1F; in InitTo300Pointer()
266 SiS_Pr->pSiS_SR21 = &SiS300_SR21; in InitTo300Pointer()
267 SiS_Pr->pSiS_SR22 = &SiS300_SR22; in InitTo300Pointer()
268 SiS_Pr->pSiS_SR23 = &SiS300_SR23; in InitTo300Pointer()
269 SiS_Pr->pSiS_SR24 = &SiS300_SR24; in InitTo300Pointer()
270 SiS_Pr->SiS_SR25 = SiS300_SR25; in InitTo300Pointer()
271 SiS_Pr->pSiS_SR31 = &SiS300_SR31; in InitTo300Pointer()
272 SiS_Pr->pSiS_SR32 = &SiS300_SR32; in InitTo300Pointer()
273 SiS_Pr->pSiS_SR33 = &SiS300_SR33; in InitTo300Pointer()
274 SiS_Pr->pSiS_CRT2Data_1_2 = &SiS300_CRT2Data_1_2; in InitTo300Pointer()
275 SiS_Pr->pSiS_CRT2Data_4_D = &SiS300_CRT2Data_4_D; in InitTo300Pointer()
276 SiS_Pr->pSiS_CRT2Data_4_E = &SiS300_CRT2Data_4_E; in InitTo300Pointer()
277 SiS_Pr->pSiS_CRT2Data_4_10 = &SiS300_CRT2Data_4_10; in InitTo300Pointer()
278 SiS_Pr->pSiS_RGBSenseData = &SiS300_RGBSenseData; in InitTo300Pointer()
279 SiS_Pr->pSiS_VideoSenseData = &SiS300_VideoSenseData; in InitTo300Pointer()
280 SiS_Pr->pSiS_YCSenseData = &SiS300_YCSenseData; in InitTo300Pointer()
281 SiS_Pr->pSiS_RGBSenseData2 = &SiS300_RGBSenseData2; in InitTo300Pointer()
282 SiS_Pr->pSiS_VideoSenseData2 = &SiS300_VideoSenseData2; in InitTo300Pointer()
283 SiS_Pr->pSiS_YCSenseData2 = &SiS300_YCSenseData2; in InitTo300Pointer()
286 SiS_Pr->SiS_PanelDelayTbl = SiS300_PanelDelayTbl; in InitTo300Pointer()
287 SiS_Pr->SiS_PanelDelayTblLVDS = SiS300_PanelDelayTbl; in InitTo300Pointer()
289 SiS_Pr->SiS_ExtLCD1024x768Data = SiS300_ExtLCD1024x768Data; in InitTo300Pointer()
290 SiS_Pr->SiS_St2LCD1024x768Data = SiS300_St2LCD1024x768Data; in InitTo300Pointer()
291 SiS_Pr->SiS_ExtLCD1280x1024Data = SiS300_ExtLCD1280x1024Data; in InitTo300Pointer()
292 SiS_Pr->SiS_St2LCD1280x1024Data = SiS300_St2LCD1280x1024Data; in InitTo300Pointer()
294 SiS_Pr->SiS_CRT2Part2_1024x768_1 = SiS300_CRT2Part2_1024x768_1; in InitTo300Pointer()
295 SiS_Pr->SiS_CRT2Part2_1280x1024_1 = SiS300_CRT2Part2_1280x1024_1; in InitTo300Pointer()
296 SiS_Pr->SiS_CRT2Part2_1024x768_2 = SiS300_CRT2Part2_1024x768_2; in InitTo300Pointer()
297 SiS_Pr->SiS_CRT2Part2_1280x1024_2 = SiS300_CRT2Part2_1280x1024_2; in InitTo300Pointer()
298 SiS_Pr->SiS_CRT2Part2_1024x768_3 = SiS300_CRT2Part2_1024x768_3; in InitTo300Pointer()
299 SiS_Pr->SiS_CRT2Part2_1280x1024_3 = SiS300_CRT2Part2_1280x1024_3; in InitTo300Pointer()
301 SiS_Pr->SiS_CHTVUPALData = SiS300_CHTVUPALData; in InitTo300Pointer()
302 SiS_Pr->SiS_CHTVOPALData = SiS300_CHTVOPALData; in InitTo300Pointer()
303 SiS_Pr->SiS_CHTVUPALMData = SiS_CHTVUNTSCData; /* not supported on 300 series */ in InitTo300Pointer()
304 SiS_Pr->SiS_CHTVOPALMData = SiS_CHTVONTSCData; /* not supported on 300 series */ in InitTo300Pointer()
305 SiS_Pr->SiS_CHTVUPALNData = SiS300_CHTVUPALData; /* not supported on 300 series */ in InitTo300Pointer()
306 SiS_Pr->SiS_CHTVOPALNData = SiS300_CHTVOPALData; /* not supported on 300 series */ in InitTo300Pointer()
307 SiS_Pr->SiS_CHTVSOPALData = SiS300_CHTVSOPALData; in InitTo300Pointer()
309 SiS_Pr->SiS_PanelType00_1 = SiS300_PanelType00_1; in InitTo300Pointer()
310 SiS_Pr->SiS_PanelType01_1 = SiS300_PanelType01_1; in InitTo300Pointer()
311 SiS_Pr->SiS_PanelType02_1 = SiS300_PanelType02_1; in InitTo300Pointer()
312 SiS_Pr->SiS_PanelType03_1 = SiS300_PanelType03_1; in InitTo300Pointer()
313 SiS_Pr->SiS_PanelType04_1 = SiS300_PanelType04_1; in InitTo300Pointer()
314 SiS_Pr->SiS_PanelType05_1 = SiS300_PanelType05_1; in InitTo300Pointer()
315 SiS_Pr->SiS_PanelType06_1 = SiS300_PanelType06_1; in InitTo300Pointer()
316 SiS_Pr->SiS_PanelType07_1 = SiS300_PanelType07_1; in InitTo300Pointer()
317 SiS_Pr->SiS_PanelType08_1 = SiS300_PanelType08_1; in InitTo300Pointer()
318 SiS_Pr->SiS_PanelType09_1 = SiS300_PanelType09_1; in InitTo300Pointer()
319 SiS_Pr->SiS_PanelType0a_1 = SiS300_PanelType0a_1; in InitTo300Pointer()
320 SiS_Pr->SiS_PanelType0b_1 = SiS300_PanelType0b_1; in InitTo300Pointer()
321 SiS_Pr->SiS_PanelType0c_1 = SiS300_PanelType0c_1; in InitTo300Pointer()
322 SiS_Pr->SiS_PanelType0d_1 = SiS300_PanelType0d_1; in InitTo300Pointer()
323 SiS_Pr->SiS_PanelType0e_1 = SiS300_PanelType0e_1; in InitTo300Pointer()
324 SiS_Pr->SiS_PanelType0f_1 = SiS300_PanelType0f_1; in InitTo300Pointer()
325 SiS_Pr->SiS_PanelType00_2 = SiS300_PanelType00_2; in InitTo300Pointer()
326 SiS_Pr->SiS_PanelType01_2 = SiS300_PanelType01_2; in InitTo300Pointer()
327 SiS_Pr->SiS_PanelType02_2 = SiS300_PanelType02_2; in InitTo300Pointer()
328 SiS_Pr->SiS_PanelType03_2 = SiS300_PanelType03_2; in InitTo300Pointer()
329 SiS_Pr->SiS_PanelType04_2 = SiS300_PanelType04_2; in InitTo300Pointer()
330 SiS_Pr->SiS_PanelType05_2 = SiS300_PanelType05_2; in InitTo300Pointer()
331 SiS_Pr->SiS_PanelType06_2 = SiS300_PanelType06_2; in InitTo300Pointer()
332 SiS_Pr->SiS_PanelType07_2 = SiS300_PanelType07_2; in InitTo300Pointer()
333 SiS_Pr->SiS_PanelType08_2 = SiS300_PanelType08_2; in InitTo300Pointer()
334 SiS_Pr->SiS_PanelType09_2 = SiS300_PanelType09_2; in InitTo300Pointer()
335 SiS_Pr->SiS_PanelType0a_2 = SiS300_PanelType0a_2; in InitTo300Pointer()
336 SiS_Pr->SiS_PanelType0b_2 = SiS300_PanelType0b_2; in InitTo300Pointer()
337 SiS_Pr->SiS_PanelType0c_2 = SiS300_PanelType0c_2; in InitTo300Pointer()
338 SiS_Pr->SiS_PanelType0d_2 = SiS300_PanelType0d_2; in InitTo300Pointer()
339 SiS_Pr->SiS_PanelType0e_2 = SiS300_PanelType0e_2; in InitTo300Pointer()
340 SiS_Pr->SiS_PanelType0f_2 = SiS300_PanelType0f_2; in InitTo300Pointer()
341 SiS_Pr->SiS_PanelTypeNS_1 = SiS300_PanelTypeNS_1; in InitTo300Pointer()
342 SiS_Pr->SiS_PanelTypeNS_2 = SiS300_PanelTypeNS_2; in InitTo300Pointer()
344 if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) { in InitTo300Pointer()
345 SiS_Pr->SiS_PanelType04_1 = SiS300_PanelType04_1a; in InitTo300Pointer()
346 SiS_Pr->SiS_PanelType04_2 = SiS300_PanelType04_2a; in InitTo300Pointer()
348 if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) { in InitTo300Pointer()
349 SiS_Pr->SiS_PanelType04_1 = SiS300_PanelType04_1b; in InitTo300Pointer()
350 SiS_Pr->SiS_PanelType04_2 = SiS300_PanelType04_2b; in InitTo300Pointer()
353 SiS_Pr->SiS_LVDSCRT1800x600_1 = SiS300_LVDSCRT1800x600_1; in InitTo300Pointer()
354 SiS_Pr->SiS_LVDSCRT1800x600_1_H = SiS300_LVDSCRT1800x600_1_H; in InitTo300Pointer()
355 SiS_Pr->SiS_LVDSCRT1800x600_2 = SiS300_LVDSCRT1800x600_2; in InitTo300Pointer()
356 SiS_Pr->SiS_LVDSCRT1800x600_2_H = SiS300_LVDSCRT1800x600_2_H; in InitTo300Pointer()
357 SiS_Pr->SiS_LVDSCRT11024x768_1 = SiS300_LVDSCRT11024x768_1; in InitTo300Pointer()
358 SiS_Pr->SiS_LVDSCRT11024x768_1_H = SiS300_LVDSCRT11024x768_1_H; in InitTo300Pointer()
359 SiS_Pr->SiS_LVDSCRT11024x768_2 = SiS300_LVDSCRT11024x768_2; in InitTo300Pointer()
360 SiS_Pr->SiS_LVDSCRT11024x768_2_H = SiS300_LVDSCRT11024x768_2_H; in InitTo300Pointer()
361 SiS_Pr->SiS_LVDSCRT11280x1024_1 = SiS300_LVDSCRT11280x1024_1; in InitTo300Pointer()
362 SiS_Pr->SiS_LVDSCRT11280x1024_1_H = SiS300_LVDSCRT11280x1024_1_H; in InitTo300Pointer()
363 SiS_Pr->SiS_LVDSCRT11280x1024_2 = SiS300_LVDSCRT11280x1024_2; in InitTo300Pointer()
364 SiS_Pr->SiS_LVDSCRT11280x1024_2_H = SiS300_LVDSCRT11280x1024_2_H; in InitTo300Pointer()
365 SiS_Pr->SiS_LVDSCRT1XXXxXXX_1 = SiS300_LVDSCRT1XXXxXXX_1; in InitTo300Pointer()
366 SiS_Pr->SiS_LVDSCRT1XXXxXXX_1_H = SiS300_LVDSCRT1XXXxXXX_1_H; in InitTo300Pointer()
368 SiS_Pr->SiS_CHTVCRT1UNTSC = SiS300_CHTVCRT1UNTSC; in InitTo300Pointer()
369 SiS_Pr->SiS_CHTVCRT1ONTSC = SiS300_CHTVCRT1ONTSC; in InitTo300Pointer()
370 SiS_Pr->SiS_CHTVCRT1UPAL = SiS300_CHTVCRT1UPAL; in InitTo300Pointer()
371 SiS_Pr->SiS_CHTVCRT1OPAL = SiS300_CHTVCRT1OPAL; in InitTo300Pointer()
372 SiS_Pr->SiS_CHTVCRT1SOPAL = SiS300_CHTVCRT1SOPAL; in InitTo300Pointer()
373 SiS_Pr->SiS_CHTVReg_UNTSC = SiS300_CHTVReg_UNTSC; in InitTo300Pointer()
374 SiS_Pr->SiS_CHTVReg_ONTSC = SiS300_CHTVReg_ONTSC; in InitTo300Pointer()
375 SiS_Pr->SiS_CHTVReg_UPAL = SiS300_CHTVReg_UPAL; in InitTo300Pointer()
376 SiS_Pr->SiS_CHTVReg_OPAL = SiS300_CHTVReg_OPAL; in InitTo300Pointer()
377 SiS_Pr->SiS_CHTVReg_UPALM = SiS300_CHTVReg_UNTSC; /* not supported on 300 series */ in InitTo300Pointer()
378 SiS_Pr->SiS_CHTVReg_OPALM = SiS300_CHTVReg_ONTSC; /* not supported on 300 series */ in InitTo300Pointer()
379 SiS_Pr->SiS_CHTVReg_UPALN = SiS300_CHTVReg_UPAL; /* not supported on 300 series */ in InitTo300Pointer()
380 SiS_Pr->SiS_CHTVReg_OPALN = SiS300_CHTVReg_OPAL; /* not supported on 300 series */ in InitTo300Pointer()
381 SiS_Pr->SiS_CHTVReg_SOPAL = SiS300_CHTVReg_SOPAL; in InitTo300Pointer()
382 SiS_Pr->SiS_CHTVVCLKUNTSC = SiS300_CHTVVCLKUNTSC; in InitTo300Pointer()
383 SiS_Pr->SiS_CHTVVCLKONTSC = SiS300_CHTVVCLKONTSC; in InitTo300Pointer()
384 SiS_Pr->SiS_CHTVVCLKUPAL = SiS300_CHTVVCLKUPAL; in InitTo300Pointer()
385 SiS_Pr->SiS_CHTVVCLKOPAL = SiS300_CHTVVCLKOPAL; in InitTo300Pointer()
386 SiS_Pr->SiS_CHTVVCLKUPALM = SiS300_CHTVVCLKUNTSC; /* not supported on 300 series */ in InitTo300Pointer()
387 SiS_Pr->SiS_CHTVVCLKOPALM = SiS300_CHTVVCLKONTSC; /* not supported on 300 series */ in InitTo300Pointer()
388 SiS_Pr->SiS_CHTVVCLKUPALN = SiS300_CHTVVCLKUPAL; /* not supported on 300 series */ in InitTo300Pointer()
389 SiS_Pr->SiS_CHTVVCLKOPALN = SiS300_CHTVVCLKOPAL; /* not supported on 300 series */ in InitTo300Pointer()
390 SiS_Pr->SiS_CHTVVCLKSOPAL = SiS300_CHTVVCLKSOPAL; in InitTo300Pointer()
396 InitTo310Pointer(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in InitTo310Pointer() argument
398 InitCommonPointer(SiS_Pr, HwInfo); in InitTo310Pointer()
428 SiS_Pr->SiS_SModeIDTable = SiS310_SModeIDTable; in InitTo310Pointer()
429 SiS_Pr->SiS_EModeIDTable = SiS310_EModeIDTable; in InitTo310Pointer()
430 SiS_Pr->SiS_RefIndex = (SiS_Ext2Struct *)SiS310_RefIndex; in InitTo310Pointer()
431 SiS_Pr->SiS_CRT1Table = SiS310_CRT1Table; in InitTo310Pointer()
433 SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_760; /* 760 */ in InitTo310Pointer()
435 SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_660; /* 661/741 */ in InitTo310Pointer()
437 SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_330; /* 330 */ in InitTo310Pointer()
439 SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_650; /* 550, 650, 740 */ in InitTo310Pointer()
441 SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_315; /* 315 */ in InitTo310Pointer()
443 SiS_Pr->SiS_MCLKData_1 = SiS310_MCLKData_1; in InitTo310Pointer()
444 SiS_Pr->SiS_VCLKData = SiS310_VCLKData; in InitTo310Pointer()
445 SiS_Pr->SiS_VBVCLKData = SiS310_VBVCLKData; in InitTo310Pointer()
447 SiS_Pr->SiS_SR15 = SiS310_SR15; in InitTo310Pointer()
450 SiS_Pr->pSiS_SR07 = &SiS310_SR07; in InitTo310Pointer()
451 SiS_Pr->SiS_CR40 = SiS310_CR40; in InitTo310Pointer()
452 SiS_Pr->SiS_CR49 = SiS310_CR49; in InitTo310Pointer()
453 SiS_Pr->pSiS_SR1F = &SiS310_SR1F; in InitTo310Pointer()
454 SiS_Pr->pSiS_SR21 = &SiS310_SR21; in InitTo310Pointer()
455 SiS_Pr->pSiS_SR22 = &SiS310_SR22; in InitTo310Pointer()
456 SiS_Pr->pSiS_SR23 = &SiS310_SR23; in InitTo310Pointer()
457 SiS_Pr->pSiS_SR24 = &SiS310_SR24; in InitTo310Pointer()
458 SiS_Pr->SiS_SR25 = SiS310_SR25; in InitTo310Pointer()
459 SiS_Pr->pSiS_SR31 = &SiS310_SR31; in InitTo310Pointer()
460 SiS_Pr->pSiS_SR32 = &SiS310_SR32; in InitTo310Pointer()
461 SiS_Pr->pSiS_SR33 = &SiS310_SR33; in InitTo310Pointer()
462 SiS_Pr->pSiS_CRT2Data_1_2 = &SiS310_CRT2Data_1_2; in InitTo310Pointer()
463 SiS_Pr->pSiS_CRT2Data_4_D = &SiS310_CRT2Data_4_D; in InitTo310Pointer()
464 SiS_Pr->pSiS_CRT2Data_4_E = &SiS310_CRT2Data_4_E; in InitTo310Pointer()
465 SiS_Pr->pSiS_CRT2Data_4_10 = &SiS310_CRT2Data_4_10; in InitTo310Pointer()
466 SiS_Pr->pSiS_RGBSenseData = &SiS310_RGBSenseData; in InitTo310Pointer()
467 SiS_Pr->pSiS_VideoSenseData = &SiS310_VideoSenseData; in InitTo310Pointer()
468 SiS_Pr->pSiS_YCSenseData = &SiS310_YCSenseData; in InitTo310Pointer()
469 SiS_Pr->pSiS_RGBSenseData2 = &SiS310_RGBSenseData2; in InitTo310Pointer()
470 SiS_Pr->pSiS_VideoSenseData2 = &SiS310_VideoSenseData2; in InitTo310Pointer()
471 SiS_Pr->pSiS_YCSenseData2 = &SiS310_YCSenseData2; in InitTo310Pointer()
474 SiS_Pr->SiS_PanelDelayTbl = SiS310_PanelDelayTbl; in InitTo310Pointer()
475 SiS_Pr->SiS_PanelDelayTblLVDS = SiS310_PanelDelayTblLVDS; in InitTo310Pointer()
477 SiS_Pr->SiS_St2LCD1024x768Data = SiS310_St2LCD1024x768Data; in InitTo310Pointer()
478 SiS_Pr->SiS_ExtLCD1024x768Data = SiS310_ExtLCD1024x768Data; in InitTo310Pointer()
479 SiS_Pr->SiS_St2LCD1280x1024Data = SiS310_St2LCD1280x1024Data; in InitTo310Pointer()
480 SiS_Pr->SiS_ExtLCD1280x1024Data = SiS310_ExtLCD1280x1024Data; in InitTo310Pointer()
482 SiS_Pr->SiS_CRT2Part2_1024x768_1 = SiS310_CRT2Part2_1024x768_1; in InitTo310Pointer()
484 SiS_Pr->SiS_PanelType00_1 = SiS310_PanelType00_1; in InitTo310Pointer()
485 SiS_Pr->SiS_PanelType01_1 = SiS310_PanelType01_1; in InitTo310Pointer()
486 SiS_Pr->SiS_PanelType02_1 = SiS310_PanelType02_1; in InitTo310Pointer()
487 SiS_Pr->SiS_PanelType03_1 = SiS310_PanelType03_1; in InitTo310Pointer()
488 SiS_Pr->SiS_PanelType04_1 = SiS310_PanelType04_1; in InitTo310Pointer()
489 SiS_Pr->SiS_PanelType05_1 = SiS310_PanelType05_1; in InitTo310Pointer()
490 SiS_Pr->SiS_PanelType06_1 = SiS310_PanelType06_1; in InitTo310Pointer()
491 SiS_Pr->SiS_PanelType07_1 = SiS310_PanelType07_1; in InitTo310Pointer()
492 SiS_Pr->SiS_PanelType08_1 = SiS310_PanelType08_1; in InitTo310Pointer()
493 SiS_Pr->SiS_PanelType09_1 = SiS310_PanelType09_1; in InitTo310Pointer()
494 SiS_Pr->SiS_PanelType0a_1 = SiS310_PanelType0a_1; in InitTo310Pointer()
495 SiS_Pr->SiS_PanelType0b_1 = SiS310_PanelType0b_1; in InitTo310Pointer()
496 SiS_Pr->SiS_PanelType0c_1 = SiS310_PanelType0c_1; in InitTo310Pointer()
497 SiS_Pr->SiS_PanelType0d_1 = SiS310_PanelType0d_1; in InitTo310Pointer()
498 SiS_Pr->SiS_PanelType0e_1 = SiS310_PanelType0e_1; in InitTo310Pointer()
499 SiS_Pr->SiS_PanelType0f_1 = SiS310_PanelType0f_1; in InitTo310Pointer()
500 SiS_Pr->SiS_PanelType00_2 = SiS310_PanelType00_2; in InitTo310Pointer()
501 SiS_Pr->SiS_PanelType01_2 = SiS310_PanelType01_2; in InitTo310Pointer()
502 SiS_Pr->SiS_PanelType02_2 = SiS310_PanelType02_2; in InitTo310Pointer()
503 SiS_Pr->SiS_PanelType03_2 = SiS310_PanelType03_2; in InitTo310Pointer()
504 SiS_Pr->SiS_PanelType04_2 = SiS310_PanelType04_2; in InitTo310Pointer()
505 SiS_Pr->SiS_PanelType05_2 = SiS310_PanelType05_2; in InitTo310Pointer()
506 SiS_Pr->SiS_PanelType06_2 = SiS310_PanelType06_2; in InitTo310Pointer()
507 SiS_Pr->SiS_PanelType07_2 = SiS310_PanelType07_2; in InitTo310Pointer()
508 SiS_Pr->SiS_PanelType08_2 = SiS310_PanelType08_2; in InitTo310Pointer()
509 SiS_Pr->SiS_PanelType09_2 = SiS310_PanelType09_2; in InitTo310Pointer()
510 SiS_Pr->SiS_PanelType0a_2 = SiS310_PanelType0a_2; in InitTo310Pointer()
511 SiS_Pr->SiS_PanelType0b_2 = SiS310_PanelType0b_2; in InitTo310Pointer()
512 SiS_Pr->SiS_PanelType0c_2 = SiS310_PanelType0c_2; in InitTo310Pointer()
513 SiS_Pr->SiS_PanelType0d_2 = SiS310_PanelType0d_2; in InitTo310Pointer()
514 SiS_Pr->SiS_PanelType0e_2 = SiS310_PanelType0e_2; in InitTo310Pointer()
515 SiS_Pr->SiS_PanelType0f_2 = SiS310_PanelType0f_2; in InitTo310Pointer()
516 SiS_Pr->SiS_PanelTypeNS_1 = SiS310_PanelTypeNS_1; in InitTo310Pointer()
517 SiS_Pr->SiS_PanelTypeNS_2 = SiS310_PanelTypeNS_2; in InitTo310Pointer()
519 SiS_Pr->SiS_CHTVUPALData = SiS310_CHTVUPALData; in InitTo310Pointer()
520 SiS_Pr->SiS_CHTVOPALData = SiS310_CHTVOPALData; in InitTo310Pointer()
521 SiS_Pr->SiS_CHTVUPALMData = SiS310_CHTVUPALMData; in InitTo310Pointer()
522 SiS_Pr->SiS_CHTVOPALMData = SiS310_CHTVOPALMData; in InitTo310Pointer()
523 SiS_Pr->SiS_CHTVUPALNData = SiS310_CHTVUPALNData; in InitTo310Pointer()
524 SiS_Pr->SiS_CHTVOPALNData = SiS310_CHTVOPALNData; in InitTo310Pointer()
525 SiS_Pr->SiS_CHTVSOPALData = SiS310_CHTVSOPALData; in InitTo310Pointer()
527 SiS_Pr->SiS_LVDSCRT1800x600_1 = SiS310_LVDSCRT1800x600_1; in InitTo310Pointer()
528 SiS_Pr->SiS_LVDSCRT11024x768_1 = SiS310_LVDSCRT11024x768_1; in InitTo310Pointer()
529 SiS_Pr->SiS_LVDSCRT11280x1024_1 = SiS310_LVDSCRT11280x1024_1; in InitTo310Pointer()
530 SiS_Pr->SiS_LVDSCRT11400x1050_1 = SiS310_LVDSCRT11400x1050_1; in InitTo310Pointer()
531 SiS_Pr->SiS_LVDSCRT11600x1200_1 = SiS310_LVDSCRT11600x1200_1; in InitTo310Pointer()
532 SiS_Pr->SiS_LVDSCRT1800x600_1_H = SiS310_LVDSCRT1800x600_1_H; in InitTo310Pointer()
533 SiS_Pr->SiS_LVDSCRT11024x768_1_H = SiS310_LVDSCRT11024x768_1_H; in InitTo310Pointer()
534 SiS_Pr->SiS_LVDSCRT11280x1024_1_H = SiS310_LVDSCRT11280x1024_1_H; in InitTo310Pointer()
535 SiS_Pr->SiS_LVDSCRT11400x1050_1_H = SiS310_LVDSCRT11400x1050_1_H; in InitTo310Pointer()
536 SiS_Pr->SiS_LVDSCRT11600x1200_1_H = SiS310_LVDSCRT11600x1200_1_H; in InitTo310Pointer()
537 SiS_Pr->SiS_LVDSCRT1800x600_2 = SiS310_LVDSCRT1800x600_2; in InitTo310Pointer()
538 SiS_Pr->SiS_LVDSCRT11024x768_2 = SiS310_LVDSCRT11024x768_2; in InitTo310Pointer()
539 SiS_Pr->SiS_LVDSCRT11280x1024_2 = SiS310_LVDSCRT11280x1024_2; in InitTo310Pointer()
540 SiS_Pr->SiS_LVDSCRT11400x1050_2 = SiS310_LVDSCRT11400x1050_2; in InitTo310Pointer()
541 SiS_Pr->SiS_LVDSCRT11600x1200_2 = SiS310_LVDSCRT11600x1200_2; in InitTo310Pointer()
542 SiS_Pr->SiS_LVDSCRT1800x600_2_H = SiS310_LVDSCRT1800x600_2_H; in InitTo310Pointer()
543 SiS_Pr->SiS_LVDSCRT11024x768_2_H = SiS310_LVDSCRT11024x768_2_H; in InitTo310Pointer()
544 SiS_Pr->SiS_LVDSCRT11280x1024_2_H = SiS310_LVDSCRT11280x1024_2_H; in InitTo310Pointer()
545 SiS_Pr->SiS_LVDSCRT11400x1050_2_H = SiS310_LVDSCRT11400x1050_2_H; in InitTo310Pointer()
546 SiS_Pr->SiS_LVDSCRT11600x1200_2_H = SiS310_LVDSCRT11600x1200_2_H; in InitTo310Pointer()
547 SiS_Pr->SiS_LVDSCRT1XXXxXXX_1 = SiS310_LVDSCRT1XXXxXXX_1; in InitTo310Pointer()
548 SiS_Pr->SiS_LVDSCRT1XXXxXXX_1_H = SiS310_LVDSCRT1XXXxXXX_1_H; in InitTo310Pointer()
549 SiS_Pr->SiS_CHTVCRT1UNTSC = SiS310_CHTVCRT1UNTSC; in InitTo310Pointer()
550 SiS_Pr->SiS_CHTVCRT1ONTSC = SiS310_CHTVCRT1ONTSC; in InitTo310Pointer()
551 SiS_Pr->SiS_CHTVCRT1UPAL = SiS310_CHTVCRT1UPAL; in InitTo310Pointer()
552 SiS_Pr->SiS_CHTVCRT1OPAL = SiS310_CHTVCRT1OPAL; in InitTo310Pointer()
553 SiS_Pr->SiS_CHTVCRT1SOPAL = SiS310_CHTVCRT1OPAL; in InitTo310Pointer()
555 SiS_Pr->SiS_CHTVReg_UNTSC = SiS310_CHTVReg_UNTSC; in InitTo310Pointer()
556 SiS_Pr->SiS_CHTVReg_ONTSC = SiS310_CHTVReg_ONTSC; in InitTo310Pointer()
557 SiS_Pr->SiS_CHTVReg_UPAL = SiS310_CHTVReg_UPAL; in InitTo310Pointer()
558 SiS_Pr->SiS_CHTVReg_OPAL = SiS310_CHTVReg_OPAL; in InitTo310Pointer()
559 SiS_Pr->SiS_CHTVReg_UPALM = SiS310_CHTVReg_UPALM; in InitTo310Pointer()
560 SiS_Pr->SiS_CHTVReg_OPALM = SiS310_CHTVReg_OPALM; in InitTo310Pointer()
561 SiS_Pr->SiS_CHTVReg_UPALN = SiS310_CHTVReg_UPALN; in InitTo310Pointer()
562 SiS_Pr->SiS_CHTVReg_OPALN = SiS310_CHTVReg_OPALN; in InitTo310Pointer()
563 SiS_Pr->SiS_CHTVReg_SOPAL = SiS310_CHTVReg_OPAL; in InitTo310Pointer()
565 SiS_Pr->SiS_CHTVVCLKUNTSC = SiS310_CHTVVCLKUNTSC; in InitTo310Pointer()
566 SiS_Pr->SiS_CHTVVCLKONTSC = SiS310_CHTVVCLKONTSC; in InitTo310Pointer()
567 SiS_Pr->SiS_CHTVVCLKUPAL = SiS310_CHTVVCLKUPAL; in InitTo310Pointer()
568 SiS_Pr->SiS_CHTVVCLKOPAL = SiS310_CHTVVCLKOPAL; in InitTo310Pointer()
569 SiS_Pr->SiS_CHTVVCLKUPALM = SiS310_CHTVVCLKUPALM; in InitTo310Pointer()
570 SiS_Pr->SiS_CHTVVCLKOPALM = SiS310_CHTVVCLKOPALM; in InitTo310Pointer()
571 SiS_Pr->SiS_CHTVVCLKUPALN = SiS310_CHTVVCLKUPALN; in InitTo310Pointer()
572 SiS_Pr->SiS_CHTVVCLKOPALN = SiS310_CHTVVCLKOPALN; in InitTo310Pointer()
573 SiS_Pr->SiS_CHTVVCLKSOPAL = SiS310_CHTVVCLKOPAL; in InitTo310Pointer()
578 SiSInitPtr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiSInitPtr() argument
593 InitTo310Pointer(SiS_Pr, HwInfo); in SiSInitPtr()
601 InitTo300Pointer(SiS_Pr, HwInfo); in SiSInitPtr()
1251 SiS_DisplayOn(SiS_Private *SiS_Pr) in SiS_DisplayOn() argument
1253 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x01,0xDF); in SiS_DisplayOn()
1257 SiS_DisplayOff(SiS_Private *SiS_Pr) in SiS_DisplayOff() argument
1259 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x01,0x20); in SiS_DisplayOff()
1268 SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr) in SiSRegInit() argument
1270 SiS_Pr->SiS_P3c4 = BaseAddr + 0x14; in SiSRegInit()
1271 SiS_Pr->SiS_P3d4 = BaseAddr + 0x24; in SiSRegInit()
1272 SiS_Pr->SiS_P3c0 = BaseAddr + 0x10; in SiSRegInit()
1273 SiS_Pr->SiS_P3ce = BaseAddr + 0x1e; in SiSRegInit()
1274 SiS_Pr->SiS_P3c2 = BaseAddr + 0x12; in SiSRegInit()
1275 SiS_Pr->SiS_P3ca = BaseAddr + 0x1a; in SiSRegInit()
1276 SiS_Pr->SiS_P3c6 = BaseAddr + 0x16; in SiSRegInit()
1277 SiS_Pr->SiS_P3c7 = BaseAddr + 0x17; in SiSRegInit()
1278 SiS_Pr->SiS_P3c8 = BaseAddr + 0x18; in SiSRegInit()
1279 SiS_Pr->SiS_P3c9 = BaseAddr + 0x19; in SiSRegInit()
1280 SiS_Pr->SiS_P3cb = BaseAddr + 0x1b; in SiSRegInit()
1281 SiS_Pr->SiS_P3cd = BaseAddr + 0x1d; in SiSRegInit()
1282 SiS_Pr->SiS_P3da = BaseAddr + 0x2a; in SiSRegInit()
1283SiS_Pr->SiS_Part1Port = BaseAddr + SIS_CRT2_PORT_04; /* Digital video interface registers (LCD… in SiSRegInit()
1284 SiS_Pr->SiS_Part2Port = BaseAddr + SIS_CRT2_PORT_10; /* 301 TV Encoder registers */ in SiSRegInit()
1285 SiS_Pr->SiS_Part3Port = BaseAddr + SIS_CRT2_PORT_12; /* 301 Macrovision registers */ in SiSRegInit()
1286 SiS_Pr->SiS_Part4Port = BaseAddr + SIS_CRT2_PORT_14; /* 301 VGA2 (and LCD) registers */ in SiSRegInit()
1287 SiS_Pr->SiS_Part5Port = BaseAddr + SIS_CRT2_PORT_14 + 2; /* 301 palette address port registers */ in SiSRegInit()
1288 SiS_Pr->SiS_DDC_Port = BaseAddr + 0x14; /* DDC Port ( = P3C4, SR11/0A) */ in SiSRegInit()
1289 SiS_Pr->SiS_VidCapt = BaseAddr + SIS_VIDEO_CAPTURE; in SiSRegInit()
1290 SiS_Pr->SiS_VidPlay = BaseAddr + SIS_VIDEO_PLAYBACK; in SiSRegInit()
1298 SiS_GetSysFlags(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_GetSysFlags() argument
1304 SiS_Pr->SiS_SensibleSR11 = FALSE; in SiS_GetSysFlags()
1305 SiS_Pr->SiS_MyCR63 = 0x63; in SiS_GetSysFlags()
1307 SiS_Pr->SiS_MyCR63 = 0x53; in SiS_GetSysFlags()
1309 SiS_Pr->SiS_SensibleSR11 = TRUE; in SiS_GetSysFlags()
1315 SiS_Pr->SiS_SysFlags = 0; in SiS_GetSysFlags()
1317 cr5f = SiS_GetReg(SiS_Pr->SiS_P3d4,0x5f) & 0xf0; in SiS_GetSysFlags()
1318 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x5c,0x07); in SiS_GetSysFlags()
1319 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x5c) & 0xf8; in SiS_GetSysFlags()
1320 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x5c,0xf8); in SiS_GetSysFlags()
1321 temp2 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x5c) & 0xf8; in SiS_GetSysFlags()
1327 SiS_Pr->SiS_SysFlags |= SF_IsM650; break; in SiS_GetSysFlags()
1331 SiS_Pr->SiS_SysFlags |= SF_Is651; break; in SiS_GetSysFlags()
1336 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x5c) & 0xf8; in SiS_GetSysFlags()
1338 case 0x00: SiS_Pr->SiS_SysFlags |= SF_IsM652; break; in SiS_GetSysFlags()
1339 case 0x40: SiS_Pr->SiS_SysFlags |= SF_IsM653; break; in SiS_GetSysFlags()
1340 default: SiS_Pr->SiS_SysFlags |= SF_IsM650; break; in SiS_GetSysFlags()
1344 SiS_Pr->SiS_SysFlags |= SF_Is652; break; in SiS_GetSysFlags()
1346 SiS_Pr->SiS_SysFlags |= SF_IsM650; break; in SiS_GetSysFlags()
1351 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x78); in SiS_GetSysFlags()
1352 if(temp1 & 0x30) SiS_Pr->SiS_SysFlags |= SF_760LFB; in SiS_GetSysFlags()
1361 SiSInitPCIetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiSInitPCIetc() argument
1372 SiS_SetReg(SiS_Pr->SiS_P3c4,0x20,0xa1); in SiSInitPCIetc()
1378 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x5A); in SiSInitPCIetc()
1390 SiS_SetReg(SiS_Pr->SiS_P3c4,0x20,0xa1); in SiSInitPCIetc()
1397 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0xDA); in SiSInitPCIetc()
1400 SiS_SetReg(SiS_Pr->SiS_P3c4,0x20,0xa1); in SiSInitPCIetc()
1404 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x40); in SiSInitPCIetc()
1413 SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiSSetLVDSetc() argument
1417 SiS_Pr->SiS_IF_DEF_LVDS = 0; in SiSSetLVDSetc()
1418 SiS_Pr->SiS_IF_DEF_TRUMPION = 0; in SiSSetLVDSetc()
1419 SiS_Pr->SiS_IF_DEF_CH70xx = 0; in SiSSetLVDSetc()
1420 SiS_Pr->SiS_IF_DEF_DSTN = 0; in SiSSetLVDSetc()
1421 SiS_Pr->SiS_IF_DEF_FSTN = 0; in SiSSetLVDSetc()
1422 SiS_Pr->SiS_IF_DEF_CONEX = 0; in SiSSetLVDSetc()
1424 SiS_Pr->SiS_ChrontelInit = 0; in SiSSetLVDSetc()
1427 temp = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x00); in SiSSetLVDSetc()
1435 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37); in SiSSetLVDSetc()
1437 if((temp >= 2) && (temp <= 5)) SiS_Pr->SiS_IF_DEF_LVDS = 1; in SiSSetLVDSetc()
1438 if(temp == 3) SiS_Pr->SiS_IF_DEF_TRUMPION = 1; in SiSSetLVDSetc()
1441 SiS_Pr->SiS_Backup70xx = SiS_GetCH700x(SiS_Pr, 0x0e); in SiSSetLVDSetc()
1442 SiS_Pr->SiS_IF_DEF_CH70xx = 1; in SiSSetLVDSetc()
1451 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37); in SiSSetLVDSetc()
1453 if((temp >= 2) && (temp <= 3)) SiS_Pr->SiS_IF_DEF_LVDS = 1; in SiSSetLVDSetc()
1454 if(temp == 3) SiS_Pr->SiS_IF_DEF_CH70xx = 2; in SiSSetLVDSetc()
1460 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiSSetLVDSetc()
1462 if((temp >= 2) && (temp <= 3)) SiS_Pr->SiS_IF_DEF_LVDS = 1; in SiSSetLVDSetc()
1463 if(temp == 3) SiS_Pr->SiS_IF_DEF_CH70xx = 2; in SiSSetLVDSetc()
1464 if(temp == 4) SiS_Pr->SiS_IF_DEF_CONEX = 1; /* Not yet supported */ in SiSSetLVDSetc()
1477 SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable) in SiS_SetEnableDstn() argument
1479 SiS_Pr->SiS_IF_DEF_DSTN = enable ? 1 : 0; in SiS_SetEnableDstn()
1483 SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable) in SiS_SetEnableFstn() argument
1485 SiS_Pr->SiS_IF_DEF_FSTN = enable ? 1 : 0; in SiS_SetEnableFstn()
1493 SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiSDetermineROMLayout661() argument
1527 SiSDetermineROMUsage(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiSDetermineROMUsage() argument
1532 SiS_Pr->SiS_UseROM = FALSE; in SiSDetermineROMUsage()
1533 SiS_Pr->SiS_ROMNew = FALSE; in SiSDetermineROMUsage()
1542 SiS_Pr->SiS_UseROM = TRUE; in SiSDetermineROMUsage()
1547 SiS_Pr->SiS_UseROM = TRUE; in SiSDetermineROMUsage()
1550 SiS_Pr->SiS_UseROM = TRUE; in SiSDetermineROMUsage()
1551 if((SiS_Pr->SiS_ROMNew = SiSDetermineROMLayout661(SiS_Pr, HwInfo))) { in SiSDetermineROMUsage()
1555 SiS_Pr->SiS661LCD2TableSize = 32; in SiSDetermineROMUsage()
1557 SiS_Pr->SiS661LCD2TableSize = 34; in SiSDetermineROMUsage()
1559 SiS_Pr->SiS661LCD2TableSize = 36; /* 0.94 final */ in SiSDetermineROMUsage()
1571 SiS_SetSegRegLower(SiS_Private *SiS_Pr, USHORT value) in SiS_SetSegRegLower() argument
1576 temp = SiS_GetRegByte(SiS_Pr->SiS_P3cb) & 0xf0; in SiS_SetSegRegLower()
1578 SiS_SetRegByte(SiS_Pr->SiS_P3cb, temp); in SiS_SetSegRegLower()
1579 temp = SiS_GetRegByte(SiS_Pr->SiS_P3cd) & 0xf0; in SiS_SetSegRegLower()
1581 SiS_SetRegByte(SiS_Pr->SiS_P3cd, temp); in SiS_SetSegRegLower()
1585 SiS_SetSegRegUpper(SiS_Private *SiS_Pr, USHORT value) in SiS_SetSegRegUpper() argument
1590 temp = SiS_GetRegByte(SiS_Pr->SiS_P3cb) & 0x0f; in SiS_SetSegRegUpper()
1592 SiS_SetRegByte(SiS_Pr->SiS_P3cb, temp); in SiS_SetSegRegUpper()
1593 temp = SiS_GetRegByte(SiS_Pr->SiS_P3cd) & 0x0f; in SiS_SetSegRegUpper()
1595 SiS_SetRegByte(SiS_Pr->SiS_P3cd, temp); in SiS_SetSegRegUpper()
1599 SiS_SetSegmentReg(SiS_Private *SiS_Pr, USHORT value) in SiS_SetSegmentReg() argument
1601 SiS_SetSegRegLower(SiS_Pr, value); in SiS_SetSegmentReg()
1602 SiS_SetSegRegUpper(SiS_Pr, value); in SiS_SetSegmentReg()
1606 SiS_ResetSegmentReg(SiS_Private *SiS_Pr) in SiS_ResetSegmentReg() argument
1608 SiS_SetSegmentReg(SiS_Pr, 0); in SiS_ResetSegmentReg()
1612 SiS_SetSegmentRegOver(SiS_Private *SiS_Pr, USHORT value) in SiS_SetSegmentRegOver() argument
1618 SiS_SetReg(SiS_Pr->SiS_P3c4,0x1d,temp); in SiS_SetSegmentRegOver()
1619 SiS_SetSegmentReg(SiS_Pr, value); in SiS_SetSegmentRegOver()
1623 SiS_ResetSegmentRegOver(SiS_Private *SiS_Pr) in SiS_ResetSegmentRegOver() argument
1625 SiS_SetSegmentRegOver(SiS_Pr, 0); in SiS_ResetSegmentRegOver()
1629 SiS_ResetSegmentRegisters(SiS_Private *SiS_Pr,PSIS_HW_INFO HwInfo) in SiS_ResetSegmentRegisters() argument
1632 SiS_ResetSegmentReg(SiS_Pr); in SiS_ResetSegmentRegisters()
1633 SiS_ResetSegmentRegOver(SiS_Pr); in SiS_ResetSegmentRegisters()
1642 SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_GetVBType() argument
1646 SiS_Pr->SiS_VBType = 0; in SiS_GetVBType()
1648 if((SiS_Pr->SiS_IF_DEF_LVDS) || (SiS_Pr->SiS_IF_DEF_CONEX)) in SiS_GetVBType()
1651 flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x00); in SiS_GetVBType()
1655 rev = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x01); in SiS_GetVBType()
1658 SiS_Pr->SiS_VBType = VB_SIS302B; in SiS_GetVBType()
1661 SiS_Pr->SiS_VBType = VB_SIS301C; in SiS_GetVBType()
1663 SiS_Pr->SiS_VBType = VB_SIS301B; in SiS_GetVBType()
1665 nolcd = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x23); in SiS_GetVBType()
1666 if(!(nolcd & 0x02)) SiS_Pr->SiS_VBType |= VB_NoLCD; in SiS_GetVBType()
1668 SiS_Pr->SiS_VBType = VB_SIS301; in SiS_GetVBType()
1671 if(SiS_Pr->SiS_VBType & (VB_SIS301B | VB_SIS301C | VB_SIS302B)) { in SiS_GetVBType()
1673 flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x39); in SiS_GetVBType()
1674 if(flag == 0xff) SiS_Pr->SiS_VBType = VB_SIS302LV; in SiS_GetVBType()
1675 else SiS_Pr->SiS_VBType = VB_SIS301C; /* VB_SIS302ELV; */ in SiS_GetVBType()
1677 SiS_Pr->SiS_VBType = VB_SIS301LV; in SiS_GetVBType()
1688 SiS_CheckMemorySize(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in SiS_CheckMemorySize() argument
1694 if(SiS_Pr->UseCustomMode) { in SiS_CheckMemorySize()
1695 modeflag = SiS_Pr->CModeFlag; in SiS_CheckMemorySize()
1698 modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; in SiS_CheckMemorySize()
1700 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; in SiS_CheckMemorySize()
1719 SiS_Get310DRAMType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_Get310DRAMType() argument
1723 if((*SiS_Pr->pSiS_SoftSetting) & SoftDRAMType) { in SiS_Get310DRAMType()
1724 data = (*SiS_Pr->pSiS_SoftSetting) & 0x03; in SiS_Get310DRAMType()
1727 data = SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0x07; in SiS_Get310DRAMType()
1728 if(SiS_Pr->SiS_ROMNew) { in SiS_Get310DRAMType()
1729 data = ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0xc0) >> 6); in SiS_Get310DRAMType()
1732 data = SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x07; in SiS_Get310DRAMType()
1734 data = SiS_GetReg(SiS_Pr->SiS_P3c4,0x3a) & 0x03; in SiS_Get310DRAMType()
1737 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x5f) & 0x30; in SiS_Get310DRAMType()
1755 SiS_GetMCLK(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_GetMCLK() argument
1760 index = SiS_Get310DRAMType(SiS_Pr, HwInfo); in SiS_GetMCLK()
1762 if(SiS_Pr->SiS_ROMNew) { in SiS_GetMCLK()
1765 return(SiS_Pr->SiS_MCLKData_0[index].CLOCK); in SiS_GetMCLK()
1768 return(SiS_Pr->SiS_MCLKData_1[index].CLOCK); in SiS_GetMCLK()
1770 return(SiS_Pr->SiS_MCLKData_0[index].CLOCK); in SiS_GetMCLK()
1781 SiS_ClearBuffer(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo) in SiS_ClearBuffer() argument
1788 if(SiS_Pr->SiS_ModeType >= ModeEGA) { in SiS_ClearBuffer()
1796 if(SiS_Pr->SiS_ModeType < ModeCGA) { in SiS_ClearBuffer()
1811 SiS_SearchModeID(SiS_Private *SiS_Pr, USHORT *ModeNo, USHORT *ModeIdIndex) in SiS_SearchModeID() argument
1813 UCHAR VGAINFO = SiS_Pr->SiS_VGAINFO; in SiS_SearchModeID()
1820 if(SiS_Pr->SiS_SModeIDTable[*ModeIdIndex].St_ModeID == (*ModeNo)) break; in SiS_SearchModeID()
1821 if(SiS_Pr->SiS_SModeIDTable[*ModeIdIndex].St_ModeID == 0xFF) return FALSE; in SiS_SearchModeID()
1838 if(SiS_Pr->SiS_EModeIDTable[*ModeIdIndex].Ext_ModeID == (*ModeNo)) break; in SiS_SearchModeID()
1839 if(SiS_Pr->SiS_EModeIDTable[*ModeIdIndex].Ext_ModeID == 0xFF) return FALSE; in SiS_SearchModeID()
1851 SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex) in SiS_GetModePtr() argument
1856 index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_StTableIndex; in SiS_GetModePtr()
1858 if(SiS_Pr->SiS_ModeType <= ModeEGA) index = 0x1B; in SiS_GetModePtr()
1869 SiS_DoLowModeTest(SiS_Private *SiS_Pr, USHORT ModeNo, PSIS_HW_INFO HwInfo) in SiS_DoLowModeTest() argument
1875 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x11); in SiS_DoLowModeTest()
1876 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x11,0x80); in SiS_DoLowModeTest()
1877 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x00); in SiS_DoLowModeTest()
1878 SiS_SetReg(SiS_Pr->SiS_P3d4,0x00,0x55); in SiS_DoLowModeTest()
1879 temp2 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x00); in SiS_DoLowModeTest()
1880 SiS_SetReg(SiS_Pr->SiS_P3d4,0x00,temp1); in SiS_DoLowModeTest()
1881 SiS_SetReg(SiS_Pr->SiS_P3d4,0x11,temp); in SiS_DoLowModeTest()
1889 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01); in SiS_DoLowModeTest()
1896 SiS_SetLowModeTest(SiS_Private *SiS_Pr, USHORT ModeNo, PSIS_HW_INFO HwInfo) in SiS_SetLowModeTest() argument
1898 if(SiS_DoLowModeTest(SiS_Pr, ModeNo, HwInfo)) { in SiS_SetLowModeTest()
1899 SiS_Pr->SiS_SetFlag |= LowModeTests; in SiS_SetLowModeTest()
1908 SiS_SetupCR5x(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_SetupCR5x() argument
1910 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiS_SetupCR5x()
1912 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f); in SiS_SetupCR5x()
1913 if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20); in SiS_SetupCR5x()
1914 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7); in SiS_SetupCR5x()
1916 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x61,0xf7); in SiS_SetupCR5x()
1917 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f); in SiS_SetupCR5x()
1918 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7); in SiS_SetupCR5x()
1919 if(!SiS_Pr->SiS_ROMNew) { in SiS_SetupCR5x()
1920 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x3a,0xef); in SiS_SetupCR5x()
1927 SiS_HandleCRT1(SiS_Private *SiS_Pr) in SiS_HandleCRT1() argument
1929 SiS_SetRegAND(SiS_Pr->SiS_P3d4,SiS_Pr->SiS_MyCR63,0xbf); in SiS_HandleCRT1()
1931 if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x15) & 0x01)) { in SiS_HandleCRT1()
1932 if((SiS_GetReg(SiS_Pr->SiS_P3c4,0x15) & 0x0a) || in SiS_HandleCRT1()
1933 (SiS_GetReg(SiS_Pr->SiS_P3c4,0x16) & 0x01)) { in SiS_HandleCRT1()
1934 SiS_SetRegOR(SiS_Pr->SiS_P3d4,SiS_Pr->SiS_MyCR63,0x40); in SiS_HandleCRT1()
1945 SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex) in SiS_GetColorDepth() argument
1953 modeflag = SiS_Pr->CModeFlag; in SiS_GetColorDepth()
1956 modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; in SiS_GetColorDepth()
1958 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; in SiS_GetColorDepth()
1971 SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex, in SiS_GetOffset() argument
1976 if(SiS_Pr->UseCustomMode) { in SiS_GetOffset()
1977 infoflag = SiS_Pr->CInfoFlag; in SiS_GetOffset()
1978 xres = SiS_Pr->CHDisplay; in SiS_GetOffset()
1980 infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag; in SiS_GetOffset()
1981 xres = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes; in SiS_GetOffset()
1984 colordepth = SiS_GetColorDepth(SiS_Pr,ModeNo,ModeIdIndex); in SiS_GetOffset()
2002 SiS_SetSeqRegs(SiS_Private *SiS_Pr, USHORT StandTableIndex, PSIS_HW_INFO HwInfo) in SiS_SetSeqRegs() argument
2007 SiS_SetReg(SiS_Pr->SiS_P3c4,0x00,0x03); /* Set SR0 */ in SiS_SetSeqRegs()
2009 SRdata = SiS_Pr->SiS_StandTable[StandTableIndex].SR[0]; in SiS_SetSeqRegs()
2011 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiS_SetSeqRegs()
2012 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) { in SiS_SetSeqRegs()
2016 if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToTV)) { in SiS_SetSeqRegs()
2017 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { in SiS_SetSeqRegs()
2021 } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) { in SiS_SetSeqRegs()
2022 if(SiS_Pr->SiS_VBType & VB_NoLCD) { in SiS_SetSeqRegs()
2023 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { in SiS_SetSeqRegs()
2030 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { in SiS_SetSeqRegs()
2031 if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) { in SiS_SetSeqRegs()
2032 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) { in SiS_SetSeqRegs()
2033 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { in SiS_SetSeqRegs()
2038 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) { in SiS_SetSeqRegs()
2039 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { in SiS_SetSeqRegs()
2047 SiS_SetReg(SiS_Pr->SiS_P3c4,0x01,SRdata); in SiS_SetSeqRegs()
2050 SRdata = SiS_Pr->SiS_StandTable[StandTableIndex].SR[i-1]; in SiS_SetSeqRegs()
2051 SiS_SetReg(SiS_Pr->SiS_P3c4,i,SRdata); in SiS_SetSeqRegs()
2060 SiS_SetMiscRegs(SiS_Private *SiS_Pr, USHORT StandTableIndex, PSIS_HW_INFO HwInfo) in SiS_SetMiscRegs() argument
2064 Miscdata = SiS_Pr->SiS_StandTable[StandTableIndex].MISC; in SiS_SetMiscRegs()
2067 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiS_SetMiscRegs()
2068 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) { in SiS_SetMiscRegs()
2074 SiS_SetRegByte(SiS_Pr->SiS_P3c2,Miscdata); in SiS_SetMiscRegs()
2082 SiS_SetCRTCRegs(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in SiS_SetCRTCRegs() argument
2088 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f); /* Unlock CRTC */ in SiS_SetCRTCRegs()
2091 CRTCdata = SiS_Pr->SiS_StandTable[StandTableIndex].CRTC[i]; in SiS_SetCRTCRegs()
2092 SiS_SetReg(SiS_Pr->SiS_P3d4,i,CRTCdata); /* Set CRTC(3d4) */ in SiS_SetCRTCRegs()
2095 SiS_SetupCR5x(SiS_Pr, HwInfo); in SiS_SetCRTCRegs()
2097 CRTCdata = SiS_Pr->SiS_StandTable[StandTableIndex].CRTC[i]; in SiS_SetCRTCRegs()
2098 SiS_SetReg(SiS_Pr->SiS_P3d4,i,CRTCdata); in SiS_SetCRTCRegs()
2103 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { in SiS_SetCRTCRegs()
2104 if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToTV)) { in SiS_SetCRTCRegs()
2105 SiS_SetReg(SiS_Pr->SiS_P3d4,0x18,0xFE); in SiS_SetCRTCRegs()
2116 SiS_SetATTRegs(SiS_Private *SiS_Pr, USHORT StandTableIndex, in SiS_SetATTRegs() argument
2123 ARdata = SiS_Pr->SiS_StandTable[StandTableIndex].ATTR[i]; in SiS_SetATTRegs()
2135 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiS_SetATTRegs()
2136 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) ARdata=0; in SiS_SetATTRegs()
2138 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { in SiS_SetATTRegs()
2139 if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) { in SiS_SetATTRegs()
2140 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) { in SiS_SetATTRegs()
2141 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) ARdata=0; in SiS_SetATTRegs()
2146 if(SiS_Pr->SiS_VBInfo & (SetCRT2ToTV | SetCRT2ToLCD)) { in SiS_SetATTRegs()
2147 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) ARdata=0; in SiS_SetATTRegs()
2149 } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) { in SiS_SetATTRegs()
2153 if(SiS_Pr->SiS_VBType & VB_SIS301B302B) { in SiS_SetATTRegs()
2154 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) ARdata=0; in SiS_SetATTRegs()
2160 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) ARdata=0; in SiS_SetATTRegs()
2164 SiS_GetRegByte(SiS_Pr->SiS_P3da); /* reset 3da */ in SiS_SetATTRegs()
2165 SiS_SetRegByte(SiS_Pr->SiS_P3c0,i); /* set index */ in SiS_SetATTRegs()
2166 SiS_SetRegByte(SiS_Pr->SiS_P3c0,ARdata); /* set data */ in SiS_SetATTRegs()
2168 SiS_GetRegByte(SiS_Pr->SiS_P3da); /* reset 3da */ in SiS_SetATTRegs()
2169 SiS_SetRegByte(SiS_Pr->SiS_P3c0,0x14); /* set index */ in SiS_SetATTRegs()
2170 SiS_SetRegByte(SiS_Pr->SiS_P3c0,0x00); /* set data */ in SiS_SetATTRegs()
2172 SiS_GetRegByte(SiS_Pr->SiS_P3da); in SiS_SetATTRegs()
2173 SiS_SetRegByte(SiS_Pr->SiS_P3c0,0x20); /* Enable Attribute */ in SiS_SetATTRegs()
2174 SiS_GetRegByte(SiS_Pr->SiS_P3da); in SiS_SetATTRegs()
2182 SiS_SetGRCRegs(SiS_Private *SiS_Pr, USHORT StandTableIndex) in SiS_SetGRCRegs() argument
2188 GRdata = SiS_Pr->SiS_StandTable[StandTableIndex].GRC[i]; in SiS_SetGRCRegs()
2189 SiS_SetReg(SiS_Pr->SiS_P3ce,i,GRdata); in SiS_SetGRCRegs()
2192 if(SiS_Pr->SiS_ModeType > ModeVGA) { in SiS_SetGRCRegs()
2194 SiS_SetRegAND(SiS_Pr->SiS_P3ce,0x05,0xBF); in SiS_SetGRCRegs()
2203 SiS_ClearExt1Regs(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo) in SiS_ClearExt1Regs() argument
2208 SiS_SetReg(SiS_Pr->SiS_P3c4,i,0x00); in SiS_ClearExt1Regs()
2212 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x37,0xFE); in SiS_ClearExt1Regs()
2215 SiS_SetReg(SiS_Pr->SiS_P3c4,0x0e,0x20); in SiS_ClearExt1Regs()
2226 SiS_ResetCRT1VCLK(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_ResetCRT1VCLK() argument
2230 if(SiS_Pr->SiS_IF_DEF_LVDS == 0) return; in SiS_ResetCRT1VCLK()
2233 if((SiS_Pr->SiS_IF_DEF_LVDS == 0) && in SiS_ResetCRT1VCLK()
2234 (!(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)) ) { in SiS_ResetCRT1VCLK()
2240 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x31,0xCF,0x20); in SiS_ResetCRT1VCLK()
2242 SiS_SetReg(SiS_Pr->SiS_P3c4,0x31,0x20); in SiS_ResetCRT1VCLK()
2244 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2B,SiS_Pr->SiS_VCLKData[1].SR2B); in SiS_ResetCRT1VCLK()
2245 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2C,SiS_Pr->SiS_VCLKData[1].SR2C); in SiS_ResetCRT1VCLK()
2246 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2D,0x80); in SiS_ResetCRT1VCLK()
2248 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x31,0xcf,0x10); in SiS_ResetCRT1VCLK()
2250 SiS_SetReg(SiS_Pr->SiS_P3c4,0x31,0x10); in SiS_ResetCRT1VCLK()
2252 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2B,SiS_Pr->SiS_VCLKData[0].SR2B); in SiS_ResetCRT1VCLK()
2253 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2C,SiS_Pr->SiS_VCLKData[0].SR2C); in SiS_ResetCRT1VCLK()
2254 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2D,0x80); in SiS_ResetCRT1VCLK()
2262 SiS_SetCRT1Sync(SiS_Private *SiS_Pr, USHORT RefreshRateTableIndex) in SiS_SetCRT1Sync() argument
2266 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1Sync()
2267 sync = SiS_Pr->CInfoFlag >> 8; in SiS_SetCRT1Sync()
2269 sync = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag >> 8; in SiS_SetCRT1Sync()
2274 SiS_SetRegByte(SiS_Pr->SiS_P3c2,sync); in SiS_SetCRT1Sync()
2282 SiS_SetCRT1CRTC(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, in SiS_SetCRT1CRTC() argument
2289 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f); /* unlock cr0-7 */ in SiS_SetCRT1CRTC()
2291 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1CRTC()
2293 modeflag = SiS_Pr->CModeFlag; in SiS_SetCRT1CRTC()
2296 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_SetCRT1CRTC()
2299 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_SetCRT1CRTC()
2302 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_SetCRT1CRTC()
2305 SiS_SetReg(SiS_Pr->SiS_P3c4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_SetCRT1CRTC()
2308 temp = SiS_Pr->CCRT1CRTC[16] & 0xE0; in SiS_SetCRT1CRTC()
2309 SiS_SetReg(SiS_Pr->SiS_P3c4,0x0E,temp); in SiS_SetCRT1CRTC()
2311 temp = (SiS_Pr->CCRT1CRTC[16] & 0x01) << 5; in SiS_SetCRT1CRTC()
2313 SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0x5F,temp); in SiS_SetCRT1CRTC()
2318 modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; in SiS_SetCRT1CRTC()
2320 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; in SiS_SetCRT1CRTC()
2323 index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC; in SiS_SetCRT1CRTC()
2326 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]); in SiS_SetCRT1CRTC()
2329 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]); in SiS_SetCRT1CRTC()
2332 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]); in SiS_SetCRT1CRTC()
2335 SiS_SetReg(SiS_Pr->SiS_P3c4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]); in SiS_SetCRT1CRTC()
2338 temp = SiS_Pr->SiS_CRT1Table[index].CR[16] & 0xE0; in SiS_SetCRT1CRTC()
2339 SiS_SetReg(SiS_Pr->SiS_P3c4,0x0E,temp); in SiS_SetCRT1CRTC()
2341 temp = ((SiS_Pr->SiS_CRT1Table[index].CR[16]) & 0x01) << 5; in SiS_SetCRT1CRTC()
2343 SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0x5F,temp); in SiS_SetCRT1CRTC()
2347 if(SiS_Pr->SiS_ModeType > ModeVGA) SiS_SetReg(SiS_Pr->SiS_P3d4,0x14,0x4F); in SiS_SetCRT1CRTC()
2357 SiS_SetCRT1Offset(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, in SiS_SetCRT1Offset() argument
2363 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1Offset()
2364 infoflag = SiS_Pr->CInfoFlag; in SiS_SetCRT1Offset()
2366 infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag; in SiS_SetCRT1Offset()
2369 DisplayUnit = SiS_GetOffset(SiS_Pr,ModeNo,ModeIdIndex, in SiS_SetCRT1Offset()
2373 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0E,0xF0,temp); in SiS_SetCRT1Offset()
2376 SiS_SetReg(SiS_Pr->SiS_P3d4,0x13,temp); in SiS_SetCRT1Offset()
2384 SiS_SetReg(SiS_Pr->SiS_P3c4,0x10,temp); in SiS_SetCRT1Offset()
2392 SiS_SetCRT1VCLK(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, in SiS_SetCRT1VCLK() argument
2397 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1VCLK()
2398 clka = SiS_Pr->CSR2B; in SiS_SetCRT1VCLK()
2399 clkb = SiS_Pr->CSR2C; in SiS_SetCRT1VCLK()
2401 index = SiS_GetVCLK2Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo); in SiS_SetCRT1VCLK()
2402 if((SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) { in SiS_SetCRT1VCLK()
2403 clka = SiS_Pr->SiS_VBVCLKData[index].Part4_A; in SiS_SetCRT1VCLK()
2404 clkb = SiS_Pr->SiS_VBVCLKData[index].Part4_B; in SiS_SetCRT1VCLK()
2406 clka = SiS_Pr->SiS_VCLKData[index].SR2B; in SiS_SetCRT1VCLK()
2407 clkb = SiS_Pr->SiS_VCLKData[index].SR2C; in SiS_SetCRT1VCLK()
2412 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x31,0xCF); in SiS_SetCRT1VCLK()
2414 SiS_SetReg(SiS_Pr->SiS_P3c4,0x31,0x00); in SiS_SetCRT1VCLK()
2417 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2B,clka); in SiS_SetCRT1VCLK()
2418 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2C,clkb); in SiS_SetCRT1VCLK()
2421 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2D,0x01); in SiS_SetCRT1VCLK()
2423 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2D,0x80); in SiS_SetCRT1VCLK()
2433 SiS_DoCalcDelay(SiS_Private *SiS_Pr, USHORT MCLK, USHORT VCLK, USHORT colordepth, USHORT key) in SiS_DoCalcDelay() argument
2448 tempah = SiS_GetReg(SiS_Pr->SiS_P3c4,0x18); in SiS_DoCalcDelay()
2456 tempbx = SiS_GetReg(SiS_Pr->SiS_P3c4,0x16); in SiS_DoCalcDelay()
2458 tempah = SiS_GetReg(SiS_Pr->SiS_P3c4,0x14); in SiS_DoCalcDelay()
2480 SiS_CalcDelay(SiS_Private *SiS_Pr, USHORT VCLK, USHORT colordepth, USHORT MCLK) in SiS_CalcDelay() argument
2484 tempbx = SiS_DoCalcDelay(SiS_Pr, MCLK, VCLK, colordepth, 0); in SiS_CalcDelay()
2485 tempax = SiS_DoCalcDelay(SiS_Pr, MCLK, VCLK, colordepth, 1); in SiS_CalcDelay()
2493 SiS_SetCRT1FIFO_300(SiS_Private *SiS_Pr, USHORT ModeNo, PSIS_HW_INFO HwInfo, in SiS_SetCRT1FIFO_300() argument
2502 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1FIFO_300()
2503 VCLK = SiS_Pr->CSRClock; in SiS_SetCRT1FIFO_300()
2505 index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK; in SiS_SetCRT1FIFO_300()
2507 VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK; /* Get VCLK */ in SiS_SetCRT1FIFO_300()
2510 switch (SiS_Pr->SiS_ModeType - ModeEGA) { /* Get half colordepth */ in SiS_SetCRT1FIFO_300()
2519 index = SiS_GetReg(SiS_Pr->SiS_P3c4,0x3A); in SiS_SetCRT1FIFO_300()
2521 MCLK = SiS_Pr->SiS_MCLKData_0[index].CLOCK; /* Get MCLK */ in SiS_SetCRT1FIFO_300()
2523 tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiS_SetCRT1FIFO_300()
2525 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x16,0x3c,tempah); in SiS_SetCRT1FIFO_300()
2528 ThresholdLow = SiS_CalcDelay(SiS_Pr, VCLK, colorth, MCLK); in SiS_SetCRT1FIFO_300()
2531 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x16,0xfc); in SiS_SetCRT1FIFO_300()
2533 tempah = SiS_GetReg(SiS_Pr->SiS_P3c4,0x16); in SiS_SetCRT1FIFO_300()
2538 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x16,0x3f,tempah); in SiS_SetCRT1FIFO_300()
2545 SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,temp); in SiS_SetCRT1FIFO_300()
2549 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0f,0x9f,temp); in SiS_SetCRT1FIFO_300()
2552 SiS_SetReg(SiS_Pr->SiS_P3c4,0x3B,0x09); in SiS_SetCRT1FIFO_300()
2557 SiS_SetReg(SiS_Pr->SiS_P3c4,0x09,temp); in SiS_SetCRT1FIFO_300()
2561 SiS_CalcDelay2(SiS_Private *SiS_Pr, UCHAR key, PSIS_HW_INFO HwInfo) in SiS_CalcDelay2() argument
2600 data = SiS_GetReg(SiS_Pr->SiS_P3c4,0x14); in SiS_CalcDelay2()
2608 SiS_SetCRT1FIFO_630(SiS_Private *SiS_Pr, USHORT ModeNo, in SiS_SetCRT1FIFO_630() argument
2633 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1FIFO_630()
2634 VCLK = SiS_Pr->CSRClock; in SiS_SetCRT1FIFO_630()
2636 index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK; in SiS_SetCRT1FIFO_630()
2638 VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK; /* Get VCLK */ in SiS_SetCRT1FIFO_630()
2641 index = SiS_GetReg(SiS_Pr->SiS_P3c4,0x1A); in SiS_SetCRT1FIFO_630()
2643 MCLK = SiS_Pr->SiS_MCLKData_0[index].CLOCK; /* Get MCLK */ in SiS_SetCRT1FIFO_630()
2645 data2 = SiS_Pr->SiS_ModeType - ModeEGA; /* Get half colordepth */ in SiS_SetCRT1FIFO_630()
2658 B = SiS_CalcDelay2(SiS_Pr, FQBQData730[i], HwInfo) * VCLK * colorth; in SiS_SetCRT1FIFO_630()
2682 B = SiS_CalcDelay2(SiS_Pr, FQBQData[i], HwInfo) * VCLK * colorth; in SiS_SetCRT1FIFO_630()
2795 SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,data); in SiS_SetCRT1FIFO_630()
2798 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0F,0xDF,data); in SiS_SetCRT1FIFO_630()
2801 SiS_SetReg(SiS_Pr->SiS_P3c4,0x3B,0x09); in SiS_SetCRT1FIFO_630()
2806 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x09,0x80,data); in SiS_SetCRT1FIFO_630()
2812 SiS_SetCRT1FIFO_310(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, in SiS_SetCRT1FIFO_310() argument
2818 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x3D,0xFE); in SiS_SetCRT1FIFO_310()
2820 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1FIFO_310()
2821 modeflag = SiS_Pr->CModeFlag; in SiS_SetCRT1FIFO_310()
2823 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; in SiS_SetCRT1FIFO_310()
2826 SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0xAE); in SiS_SetCRT1FIFO_310()
2827 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x09,0xF0); in SiS_SetCRT1FIFO_310()
2831 SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0x34); in SiS_SetCRT1FIFO_310()
2832 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x3D,0x01); in SiS_SetCRT1FIFO_310()
2836 SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0x34); in SiS_SetCRT1FIFO_310()
2837 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x3D,0x01); in SiS_SetCRT1FIFO_310()
2849 SiS_SetVCLKState(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in SiS_SetVCLKState() argument
2856 if(SiS_Pr->UseCustomMode) { in SiS_SetVCLKState()
2857 VCLK = SiS_Pr->CSRClock; in SiS_SetVCLKState()
2859 index = SiS_GetVCLK2Ptr(SiS_Pr,ModeNo,ModeIdIndex, in SiS_SetVCLKState()
2861 VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK; in SiS_SetVCLKState()
2868 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0x7B,data); in SiS_SetVCLKState()
2872 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xF7,data); in SiS_SetVCLKState()
2877 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xf3,data); in SiS_SetVCLKState()
2880 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1f,0xe7); in SiS_SetVCLKState()
2887 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xE8,0x10); in SiS_SetVCLKState()
2901 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xFC,data); in SiS_SetVCLKState()
2906 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xF8,data); in SiS_SetVCLKState()
2913 SiS_SetCRT1ModeRegs(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in SiS_SetCRT1ModeRegs() argument
2924 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1ModeRegs()
2925 modeflag = SiS_Pr->CModeFlag; in SiS_SetCRT1ModeRegs()
2926 infoflag = SiS_Pr->CInfoFlag; in SiS_SetCRT1ModeRegs()
2927 xres = SiS_Pr->CHDisplay; in SiS_SetCRT1ModeRegs()
2929 resindex = SiS_GetResInfo(SiS_Pr,ModeNo,ModeIdIndex); in SiS_SetCRT1ModeRegs()
2931 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; in SiS_SetCRT1ModeRegs()
2932 infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag; in SiS_SetCRT1ModeRegs()
2933 xres = SiS_Pr->SiS_ModeResInfo[resindex].HTotal; in SiS_SetCRT1ModeRegs()
2935 modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; in SiS_SetCRT1ModeRegs()
2936 xres = SiS_Pr->SiS_StResInfo[resindex].HTotal; in SiS_SetCRT1ModeRegs()
2941 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1F,0x3F); in SiS_SetCRT1ModeRegs()
2945 if(SiS_Pr->SiS_ModeType > ModeEGA) { in SiS_SetCRT1ModeRegs()
2947 data |= ((SiS_Pr->SiS_ModeType - ModeVGA) << 2); in SiS_SetCRT1ModeRegs()
2951 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x06,0xC0,data); in SiS_SetCRT1ModeRegs()
2960 SiS_SetReg(SiS_Pr->SiS_P3d4,0x19,(data & 0xFF)); in SiS_SetCRT1ModeRegs()
2961 SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x1a,0xFC,(data >> 8)); in SiS_SetCRT1ModeRegs()
2965 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x01,0x08); in SiS_SetCRT1ModeRegs()
2971 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0F,0xF7,data); in SiS_SetCRT1ModeRegs()
2973 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0F,0xB7,data); in SiS_SetCRT1ModeRegs()
2974 if(SiS_Pr->SiS_ModeType == ModeEGA) { in SiS_SetCRT1ModeRegs()
2976 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x0F,0x40); in SiS_SetCRT1ModeRegs()
2982 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x31,0xfb); in SiS_SetCRT1ModeRegs()
2988 data = SiS_Get310DRAMType(SiS_Pr, HwInfo); in SiS_SetCRT1ModeRegs()
2989 data = SiS_Pr->SiS_SR15[2][data]; in SiS_SetCRT1ModeRegs()
2990 if(SiS_Pr->SiS_ModeType == ModeText) { in SiS_SetCRT1ModeRegs()
2993 data2 = SiS_GetOffset(SiS_Pr,ModeNo,ModeIdIndex, in SiS_SetCRT1ModeRegs()
2997 data3 = SiS_GetColorDepth(SiS_Pr,ModeNo,ModeIdIndex) >> 1; in SiS_SetCRT1ModeRegs()
3005 SiS_SetReg(SiS_Pr->SiS_P3c4,0x17,data); in SiS_SetCRT1ModeRegs()
3008 ((HwInfo->jChipType == SIS_760) && (SiS_Pr->SiS_SysFlags & SF_760LFB))) { in SiS_SetCRT1ModeRegs()
3010 data = SiS_Get310DRAMType(SiS_Pr, HwInfo); in SiS_SetCRT1ModeRegs()
3012 data = SiS_Pr->SiS_SR15[2][data]; in SiS_SetCRT1ModeRegs()
3014 if(SiS_Pr->SiS_ROMNew) data = ROMAddr[0xf6]; in SiS_SetCRT1ModeRegs()
3015 else if(SiS_Pr->SiS_UseROM) data = ROMAddr[0x100 + data]; in SiS_SetCRT1ModeRegs()
3018 if(SiS_Pr->SiS_ModeType <= ModeEGA) { in SiS_SetCRT1ModeRegs()
3021 if(SiS_Pr->UseCustomMode) { in SiS_SetCRT1ModeRegs()
3022 data2 = SiS_Pr->CSRClock; in SiS_SetCRT1ModeRegs()
3024 data2 = SiS_GetVCLK2Ptr(SiS_Pr,ModeNo,ModeIdIndex, in SiS_SetCRT1ModeRegs()
3026 data2 = SiS_Pr->SiS_VCLKData[data2].CLOCK; in SiS_SetCRT1ModeRegs()
3029 data3 = SiS_GetColorDepth(SiS_Pr,ModeNo,ModeIdIndex) >> 1; in SiS_SetCRT1ModeRegs()
3032 longdata = SiS_GetMCLK(SiS_Pr, HwInfo) * 1024; in SiS_SetCRT1ModeRegs()
3037 if(SiS_Pr->SiS_ModeType != Mode16Bpp) { in SiS_SetCRT1ModeRegs()
3061 SiS_SetReg(SiS_Pr->SiS_P3c4,0x17,data); in SiS_SetCRT1ModeRegs()
3066 if(SiS_Pr->SiS_ModeType != ModeText) { in SiS_SetCRT1ModeRegs()
3068 if(SiS_Pr->SiS_ModeType != ModeEGA) { in SiS_SetCRT1ModeRegs()
3072 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x21,0x1F,data); in SiS_SetCRT1ModeRegs()
3074 SiS_SetVCLKState(SiS_Pr, HwInfo, ModeNo, RefreshRateTableIndex, ModeIdIndex); in SiS_SetCRT1ModeRegs()
3078 if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x31) & 0x40) { in SiS_SetCRT1ModeRegs()
3079 SiS_SetReg(SiS_Pr->SiS_P3d4,0x52,0x2c); in SiS_SetCRT1ModeRegs()
3081 SiS_SetReg(SiS_Pr->SiS_P3d4,0x52,0x6c); in SiS_SetCRT1ModeRegs()
3093 SiS_ClearDAC(SiS_Private *SiS_Pr, ULONG port)
3106 SiS_WriteDAC(SiS_Private *SiS_Pr, SISIOADDRESS DACData, USHORT shiftflag, in SiS_WriteDAC() argument
3138 SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in SiS_LoadDAC() argument
3149 data = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; in SiS_LoadDAC()
3151 if(SiS_Pr->UseCustomMode) { in SiS_LoadDAC()
3152 data = SiS_Pr->CModeFlag; in SiS_LoadDAC()
3154 data = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; in SiS_LoadDAC()
3170 if( ( (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && /* 301B-DH LCD */ in SiS_LoadDAC()
3171 (SiS_Pr->SiS_VBType & VB_NoLCD) ) || in SiS_LoadDAC()
3172 (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) || /* LCDA */ in SiS_LoadDAC()
3173 (!(SiS_Pr->SiS_SetFlag & ProgrammingCRT2)) ) { /* Programming CRT1 */ in SiS_LoadDAC()
3174 DACAddr = SiS_Pr->SiS_P3c8; in SiS_LoadDAC()
3175 DACData = SiS_Pr->SiS_P3c9; in SiS_LoadDAC()
3177 SiS_SetRegByte(SiS_Pr->SiS_P3c6,0xFF); in SiS_LoadDAC()
3180 DACAddr = SiS_Pr->SiS_Part5Port; in SiS_LoadDAC()
3181 DACData = SiS_Pr->SiS_Part5Port + 1; in SiS_LoadDAC()
3215 SiS_WriteDAC(SiS_Pr, DACData, shiftflag, dl, ah, al, dh); in SiS_LoadDAC()
3223 SiS_WriteDAC(SiS_Pr, DACData, shiftflag, dl, ah, al, dh); in SiS_LoadDAC()
3237 SiS_SetCRT1Group(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in SiS_SetCRT1Group() argument
3242 SiS_Pr->SiS_CRT1Mode = ModeNo; in SiS_SetCRT1Group()
3243 StandTableIndex = SiS_GetModePtr(SiS_Pr, ModeNo, ModeIdIndex); in SiS_SetCRT1Group()
3244 if(SiS_Pr->SiS_SetFlag & LowModeTests) { in SiS_SetCRT1Group()
3245 if(SiS_Pr->SiS_VBInfo & (SetSimuScanMode | SwitchCRT2)) { in SiS_SetCRT1Group()
3246 SiS_DisableBridge(SiS_Pr, HwInfo); in SiS_SetCRT1Group()
3250 SiS_ResetSegmentRegisters(SiS_Pr, HwInfo); in SiS_SetCRT1Group()
3252 SiS_SetSeqRegs(SiS_Pr, StandTableIndex, HwInfo); in SiS_SetCRT1Group()
3253 SiS_SetMiscRegs(SiS_Pr, StandTableIndex, HwInfo); in SiS_SetCRT1Group()
3254 SiS_SetCRTCRegs(SiS_Pr, HwInfo, StandTableIndex); in SiS_SetCRT1Group()
3255 SiS_SetATTRegs(SiS_Pr, StandTableIndex, HwInfo); in SiS_SetCRT1Group()
3256 SiS_SetGRCRegs(SiS_Pr, StandTableIndex); in SiS_SetCRT1Group()
3257 SiS_ClearExt1Regs(SiS_Pr, HwInfo, ModeNo); in SiS_SetCRT1Group()
3258 SiS_ResetCRT1VCLK(SiS_Pr, HwInfo); in SiS_SetCRT1Group()
3260 SiS_Pr->SiS_SelectCRT2Rate = 0; in SiS_SetCRT1Group()
3261 SiS_Pr->SiS_SetFlag &= (~ProgrammingCRT2); in SiS_SetCRT1Group()
3265 SiS_Pr->SiS_VBType, SiS_Pr->SiS_VBInfo); in SiS_SetCRT1Group()
3268 if(SiS_Pr->SiS_VBInfo & SetSimuScanMode) { in SiS_SetCRT1Group()
3269 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { in SiS_SetCRT1Group()
3270 SiS_Pr->SiS_SetFlag |= ProgrammingCRT2; in SiS_SetCRT1Group()
3274 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) { in SiS_SetCRT1Group()
3275 SiS_Pr->SiS_SetFlag |= ProgrammingCRT2; in SiS_SetCRT1Group()
3278 RefreshRateTableIndex = SiS_GetRatePtr(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiS_SetCRT1Group()
3280 if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) { in SiS_SetCRT1Group()
3281 SiS_Pr->SiS_SetFlag &= ~ProgrammingCRT2; in SiS_SetCRT1Group()
3285 SiS_SetCRT1Sync(SiS_Pr, RefreshRateTableIndex); in SiS_SetCRT1Group()
3286 SiS_SetCRT1CRTC(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo); in SiS_SetCRT1Group()
3287 SiS_SetCRT1Offset(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo); in SiS_SetCRT1Group()
3288 SiS_SetCRT1VCLK(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, RefreshRateTableIndex); in SiS_SetCRT1Group()
3293 SiS_SetCRT1FIFO_300(SiS_Pr, ModeNo,HwInfo,RefreshRateTableIndex); in SiS_SetCRT1Group()
3297 SiS_SetCRT1FIFO_630(SiS_Pr, ModeNo, HwInfo, RefreshRateTableIndex); in SiS_SetCRT1Group()
3302 SiS_SetCRT1FIFO_310(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiS_SetCRT1Group()
3306 SiS_SetCRT1ModeRegs(SiS_Pr, HwInfo, ModeNo, ModeIdIndex, RefreshRateTableIndex); in SiS_SetCRT1Group()
3308 SiS_LoadDAC(SiS_Pr, HwInfo, ModeNo, ModeIdIndex); in SiS_SetCRT1Group()
3311 if(SiS_Pr->SiS_flag_clearbuffer) { in SiS_SetCRT1Group()
3312 SiS_ClearBuffer(SiS_Pr,HwInfo,ModeNo); in SiS_SetCRT1Group()
3316 if(!(SiS_Pr->SiS_VBInfo & (SetSimuScanMode | SwitchCRT2 | SetCRT2ToLCDA))) { in SiS_SetCRT1Group()
3317 SiS_WaitRetrace1(SiS_Pr); in SiS_SetCRT1Group()
3318 SiS_DisplayOn(SiS_Pr); in SiS_SetCRT1Group()
3327 SiS_ResetVB(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_ResetVB() argument
3332 if(SiS_Pr->SiS_UseROM) { in SiS_ResetVB()
3335 if(SiS_Pr->SiS_ROMNew) temp = ROMAddr[0x80] | 0x40; in SiS_ResetVB()
3336 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp); in SiS_ResetVB()
3339 if(SiS_Pr->SiS_ROMNew) temp = ROMAddr[0x80]; in SiS_ResetVB()
3341 else if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x7b) >= 100) temp |= 0x40; in SiS_ResetVB()
3342 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp); in SiS_ResetVB()
3352 SiS_StrangeStuff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_StrangeStuff() argument
3355 SiS_SetReg(SiS_Pr->SiS_VidCapt, 0x3f, 0x00); /* Fiddle with capture regs */ in SiS_StrangeStuff()
3356 SiS_SetReg(SiS_Pr->SiS_VidCapt, 0x00, 0x00); in SiS_StrangeStuff()
3357 SiS_SetReg(SiS_Pr->SiS_VidPlay, 0x00, 0x86); /* (BIOS does NOT unlock) */ in SiS_StrangeStuff()
3358 SiS_SetRegAND(SiS_Pr->SiS_VidPlay, 0x30, 0xfe); /* Fiddle with video regs */ in SiS_StrangeStuff()
3359 SiS_SetRegAND(SiS_Pr->SiS_VidPlay, 0x3f, 0xef); in SiS_StrangeStuff()
3370 SiS_SetPitchCRT1(SiS_Private *SiS_Pr, ScrnInfoPtr pScrn) in SiS_SetPitchCRT1() argument
3375 SiS_SetReg(SiS_Pr->SiS_P3d4,0x13,(HDisplay & 0xFF)); in SiS_SetPitchCRT1()
3376 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0E,0xF0,(HDisplay>>8)); in SiS_SetPitchCRT1()
3380 SiS_SetPitchCRT2(SiS_Private *SiS_Pr, ScrnInfoPtr pScrn) in SiS_SetPitchCRT2() argument
3387 SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2F, 0x01); in SiS_SetPitchCRT2()
3389 SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x24, 0x01); in SiS_SetPitchCRT2()
3391 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x07,(HDisplay & 0xFF)); in SiS_SetPitchCRT2()
3392 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0xF0,(HDisplay >> 8)); in SiS_SetPitchCRT2()
3396 SiS_SetPitch(SiS_Private *SiS_Pr, ScrnInfoPtr pScrn) in SiS_SetPitch() argument
3403 (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0xa0) == 0x20) || in SiS_SetPitch()
3405 (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x50) == 0x10) ) ) { in SiS_SetPitch()
3411 SiS_SetPitchCRT1(SiS_Pr, pScrn); in SiS_SetPitch()
3415 SiS_SetPitchCRT2(SiS_Pr, pScrn); in SiS_SetPitch()
3427 SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,ScrnInfoPtr pScrn,USHORT ModeNo, BOOLEAN dosetp… in SiSSetMode() argument
3430 SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,USHORT ModeNo) in SiSSetMode()
3440 SiS_Pr->UseCustomMode = FALSE; in SiSSetMode()
3441 SiS_Pr->CRT1UsesCustomMode = FALSE; in SiSSetMode()
3444 if(SiS_Pr->UseCustomMode) { in SiSSetMode()
3448 SiSInitPtr(SiS_Pr, HwInfo); in SiSSetMode()
3449 SiSRegInit(SiS_Pr, BaseAddr); in SiSSetMode()
3450 SiS_GetSysFlags(SiS_Pr, HwInfo); in SiSSetMode()
3453 if(pScrn) SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff); in SiSSetMode()
3456 SiS_Pr->SiS_VGAINFO = 0x11; in SiSSetMode()
3458 SiSInitPCIetc(SiS_Pr, HwInfo); in SiSSetMode()
3459 SiSSetLVDSetc(SiS_Pr, HwInfo); in SiSSetMode()
3460 SiSDetermineROMUsage(SiS_Pr, HwInfo); in SiSSetMode()
3462 SiS_Pr->SiS_flag_clearbuffer = 0; in SiSSetMode()
3464 if(!SiS_Pr->UseCustomMode) { in SiSSetMode()
3466 if(!(ModeNo & 0x80)) SiS_Pr->SiS_flag_clearbuffer = 1; in SiSSetMode()
3472 KeepLockReg = SiS_GetReg(SiS_Pr->SiS_P3c4,0x05); in SiSSetMode()
3474 SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86); in SiSSetMode()
3476 SiS_UnLockCRT2(SiS_Pr, HwInfo); in SiSSetMode()
3478 if(!SiS_Pr->UseCustomMode) { in SiSSetMode()
3479 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; in SiSSetMode()
3484 SiS_GetVBType(SiS_Pr, HwInfo); in SiSSetMode()
3488 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiSSetMode()
3490 SiS_ResetVB(SiS_Pr, HwInfo); in SiSSetMode()
3491 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x32,0x10); in SiSSetMode()
3492 SiS_SetRegOR(SiS_Pr->SiS_Part2Port,0x00,0x0c); in SiSSetMode()
3493 backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiSSetMode()
3495 backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiSSetMode()
3500 SiS_GetVBInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, (SiS_Pr->UseCustomMode) ? 0 : 1); in SiSSetMode()
3501 SiS_SetYPbPr(SiS_Pr, HwInfo); in SiSSetMode()
3502 SiS_SetTVMode(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiSSetMode()
3503 SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiSSetMode()
3504 SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo); in SiSSetMode()
3508 temp = SiS_CheckMemorySize(SiS_Pr, HwInfo, ModeNo, ModeIdIndex); in SiSSetMode()
3513 SiS_SetupCR5x(SiS_Pr, HwInfo); in SiSSetMode()
3516 if(SiS_Pr->UseCustomMode) { in SiSSetMode()
3517 SiS_Pr->CRT1UsesCustomMode = TRUE; in SiSSetMode()
3518 SiS_Pr->CSRClock_CRT1 = SiS_Pr->CSRClock; in SiSSetMode()
3519 SiS_Pr->CModeFlag_CRT1 = SiS_Pr->CModeFlag; in SiSSetMode()
3521 SiS_Pr->CRT1UsesCustomMode = FALSE; in SiSSetMode()
3525 if( (SiS_Pr->SiS_VBInfo & (SetSimuScanMode | SetCRT2ToLCDA)) || in SiSSetMode()
3526 (!(SiS_Pr->SiS_VBInfo & SwitchCRT2)) ) { in SiSSetMode()
3527 SiS_SetCRT1Group(SiS_Pr, HwInfo, ModeNo, ModeIdIndex); in SiSSetMode()
3531 if(SiS_Pr->SiS_VBInfo & (SetSimuScanMode | SwitchCRT2 | SetCRT2ToLCDA)) { in SiSSetMode()
3532 if( (SiS_Pr->SiS_VBType & VB_SISVB) || in SiSSetMode()
3533 (SiS_Pr->SiS_IF_DEF_LVDS == 1) || in SiSSetMode()
3534 (SiS_Pr->SiS_IF_DEF_CH70xx != 0) || in SiSSetMode()
3535 (SiS_Pr->SiS_IF_DEF_TRUMPION != 0) ) { in SiSSetMode()
3536 SiS_SetCRT2Group(SiS_Pr, HwInfo, ModeNo); in SiSSetMode()
3540 SiS_HandleCRT1(SiS_Pr); in SiSSetMode()
3542 SiS_StrangeStuff(SiS_Pr, HwInfo); in SiSSetMode()
3544 SiS_DisplayOn(SiS_Pr); in SiSSetMode()
3545 SiS_SetRegByte(SiS_Pr->SiS_P3c6,0xFF); in SiSSetMode()
3548 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { in SiSSetMode()
3549 if(!(SiS_IsDualEdge(SiS_Pr, HwInfo))) { in SiSSetMode()
3550 SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x13,0xfb); in SiSSetMode()
3555 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiSSetMode()
3557 if(!SiS_Pr->SiS_ROMNew) { in SiSSetMode()
3558 if(SiS_IsVAMode(SiS_Pr,HwInfo)) { in SiSSetMode()
3559 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01); in SiSSetMode()
3561 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x35,0xFE); in SiSSetMode()
3565 SiS_SetReg(SiS_Pr->SiS_P3d4,0x38,backupreg); in SiSSetMode()
3567 if((IS_SIS650) && (SiS_GetReg(SiS_Pr->SiS_P3d4,0x30) & 0xfc)) { in SiSSetMode()
3569 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x80); in SiSSetMode()
3570 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x56,0x08); in SiSSetMode()
3574 if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x30) & SetCRT2ToLCD) { in SiSSetMode()
3575 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x38,0xfc); in SiSSetMode()
3579 SiS_SetReg(SiS_Pr->SiS_P3d4,0x35,backupreg); in SiSSetMode()
3587 SiS_SetPitch(SiS_Pr, pScrn); in SiSSetMode()
3596 if(KeepLockReg == 0xA1) SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86); in SiSSetMode()
3597 else SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x00); in SiSSetMode()
3610 SiSBIOSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn, in SiSBIOSSetMode() argument
3616 SiS_Pr->UseCustomMode = FALSE; in SiSBIOSSetMode()
3621 SiS_Pr->CHDisplay, in SiSBIOSSetMode()
3622 (mode->Flags & V_INTERLACE ? SiS_Pr->CVDisplay * 2 : in SiSBIOSSetMode()
3623 (mode->Flags & V_DBLSCAN ? SiS_Pr->CVDisplay / 2 : in SiSBIOSSetMode()
3624 SiS_Pr->CVDisplay))); in SiSBIOSSetMode()
3626 return(SiSSetMode(SiS_Pr, HwInfo, pScrn, ModeNo, TRUE)); in SiSBIOSSetMode()
3635 return(SiSSetMode(SiS_Pr, HwInfo, pScrn, ModeNo, TRUE)); in SiSBIOSSetMode()
3643 SiSBIOSSetModeCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn, in SiSBIOSSetModeCRT2() argument
3655 SiS_Pr->UseCustomMode = FALSE; in SiSBIOSSetModeCRT2()
3680 SiSRegInit(SiS_Pr, BaseAddr); in SiSBIOSSetModeCRT2()
3681 SiSInitPtr(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3682 SiS_GetSysFlags(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3684 SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff); in SiSBIOSSetModeCRT2()
3686 SiS_Pr->SiS_VGAINFO = 0x11; in SiSBIOSSetModeCRT2()
3688 SiSInitPCIetc(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3689 SiSSetLVDSetc(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3690 SiSDetermineROMUsage(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3698 pSiSEnt->CRT2CR30 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30); in SiSBIOSSetModeCRT2()
3699 pSiSEnt->CRT2CR31 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x31); in SiSBIOSSetModeCRT2()
3700 pSiSEnt->CRT2CR35 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiSBIOSSetModeCRT2()
3701 pSiSEnt->CRT2CR38 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiSBIOSSetModeCRT2()
3715 SiS_Pr->SiS_flag_clearbuffer=0; in SiSBIOSSetModeCRT2()
3717 if(SiS_Pr->UseCustomMode) { in SiSBIOSSetModeCRT2()
3719 USHORT temptemp = SiS_Pr->CVDisplay; in SiSBIOSSetModeCRT2()
3721 if(SiS_Pr->CModeFlag & DoubleScanMode) temptemp >>= 1; in SiSBIOSSetModeCRT2()
3722 else if(SiS_Pr->CInfoFlag & InterlaceMode) temptemp <<= 1; in SiSBIOSSetModeCRT2()
3726 SiS_Pr->CHDisplay, temptemp); in SiSBIOSSetModeCRT2()
3735 SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86); in SiSBIOSSetModeCRT2()
3737 SiS_UnLockCRT2(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3739 if(!SiS_Pr->UseCustomMode) { in SiSBIOSSetModeCRT2()
3740 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; in SiSBIOSSetModeCRT2()
3745 SiS_GetVBType(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3747 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiSBIOSSetModeCRT2()
3749 SiS_ResetVB(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3750 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x32,0x10); in SiSBIOSSetModeCRT2()
3751 SiS_SetRegOR(SiS_Pr->SiS_Part2Port,0x00,0x0c); in SiSBIOSSetModeCRT2()
3752 backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiSBIOSSetModeCRT2()
3754 backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiSBIOSSetModeCRT2()
3759 if(!SiS_Pr->UseCustomMode) { in SiSBIOSSetModeCRT2()
3760 SiS_GetVBInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, 1); in SiSBIOSSetModeCRT2()
3763 SiS_GetVBInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, 0); in SiSBIOSSetModeCRT2()
3765 SiS_SetYPbPr(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3766 SiS_SetTVMode(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiSBIOSSetModeCRT2()
3767 SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiSBIOSSetModeCRT2()
3768 SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo); in SiSBIOSSetModeCRT2()
3771 if( (SiS_Pr->SiS_VBType & VB_SISVB) || in SiSBIOSSetModeCRT2()
3772 (SiS_Pr->SiS_IF_DEF_LVDS == 1) || in SiSBIOSSetModeCRT2()
3773 (SiS_Pr->SiS_IF_DEF_CH70xx != 0) || in SiSBIOSSetModeCRT2()
3774 (SiS_Pr->SiS_IF_DEF_TRUMPION != 0) ) { in SiSBIOSSetModeCRT2()
3775 SiS_SetCRT2Group(SiS_Pr, HwInfo, ModeNo); in SiSBIOSSetModeCRT2()
3778 SiS_StrangeStuff(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT2()
3780 SiS_DisplayOn(SiS_Pr); in SiSBIOSSetModeCRT2()
3781 SiS_SetRegByte(SiS_Pr->SiS_P3c6,0xFF); in SiSBIOSSetModeCRT2()
3784 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { in SiSBIOSSetModeCRT2()
3785 if(!(SiS_IsDualEdge(SiS_Pr, HwInfo))) { in SiSBIOSSetModeCRT2()
3786 SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x13,0xfb); in SiSBIOSSetModeCRT2()
3791 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiSBIOSSetModeCRT2()
3793 if(!SiS_Pr->SiS_ROMNew) { in SiSBIOSSetModeCRT2()
3794 if(SiS_IsVAMode(SiS_Pr,HwInfo)) { in SiSBIOSSetModeCRT2()
3795 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01); in SiSBIOSSetModeCRT2()
3797 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x35,0xFE); in SiSBIOSSetModeCRT2()
3801 SiS_SetReg(SiS_Pr->SiS_P3d4,0x38,backupreg); in SiSBIOSSetModeCRT2()
3803 if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x30) & SetCRT2ToLCD) { in SiSBIOSSetModeCRT2()
3804 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x38,0xfc); in SiSBIOSSetModeCRT2()
3808 SiS_SetReg(SiS_Pr->SiS_P3d4,0x35,backupreg); in SiSBIOSSetModeCRT2()
3813 SiS_SetPitchCRT2(SiS_Pr, pScrn); in SiSBIOSSetModeCRT2()
3824 SiSBIOSSetModeCRT1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn, in SiSBIOSSetModeCRT1() argument
3837 SiS_Pr->UseCustomMode = FALSE; in SiSBIOSSetModeCRT1()
3841 USHORT temptemp = SiS_Pr->CVDisplay; in SiSBIOSSetModeCRT1()
3843 if(SiS_Pr->CModeFlag & DoubleScanMode) temptemp >>= 1; in SiSBIOSSetModeCRT1()
3844 else if(SiS_Pr->CInfoFlag & InterlaceMode) temptemp <<= 1; in SiSBIOSSetModeCRT1()
3848 SiS_Pr->CHDisplay, temptemp); in SiSBIOSSetModeCRT1()
3860 SiSInitPtr(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3861 SiSRegInit(SiS_Pr, BaseAddr); in SiSBIOSSetModeCRT1()
3862 SiS_GetSysFlags(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3864 SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff); in SiSBIOSSetModeCRT1()
3866 SiS_Pr->SiS_VGAINFO = 0x11; in SiSBIOSSetModeCRT1()
3868 SiSInitPCIetc(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3869 SiSSetLVDSetc(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3870 SiSDetermineROMUsage(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3873 SiS_Pr->SiS_flag_clearbuffer = 0; in SiSBIOSSetModeCRT1()
3875 SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86); in SiSBIOSSetModeCRT1()
3877 SiS_UnLockCRT2(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3879 if(!SiS_Pr->UseCustomMode) { in SiSBIOSSetModeCRT1()
3880 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; in SiSBIOSSetModeCRT1()
3886 SiS_GetVBType(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3888 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiSBIOSSetModeCRT1()
3890 backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiSBIOSSetModeCRT1()
3892 backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiSBIOSSetModeCRT1()
3898 SiS_GetVBInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, 0); in SiSBIOSSetModeCRT1()
3899 SiS_SetYPbPr(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3900 SiS_SetTVMode(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiSBIOSSetModeCRT1()
3901 SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo); in SiSBIOSSetModeCRT1()
3902 SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo); in SiSBIOSSetModeCRT1()
3905 SiS_SetupCR5x(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3909 SiS_SetCRT1Group(SiS_Pr, HwInfo, ModeNo, ModeIdIndex); in SiSBIOSSetModeCRT1()
3910 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) { in SiSBIOSSetModeCRT1()
3911 SiS_SetCRT2Group(SiS_Pr, HwInfo, ModeNo); in SiSBIOSSetModeCRT1()
3915 SiS_SetPitchCRT1(SiS_Pr, pScrn); in SiSBIOSSetModeCRT1()
3924 if(SiS_Pr->UseCustomMode) { in SiSBIOSSetModeCRT1()
3925 SiS_Pr->CRT1UsesCustomMode = TRUE; in SiSBIOSSetModeCRT1()
3926 SiS_Pr->CSRClock_CRT1 = SiS_Pr->CSRClock; in SiSBIOSSetModeCRT1()
3927 SiS_Pr->CModeFlag_CRT1 = SiS_Pr->CModeFlag; in SiSBIOSSetModeCRT1()
3929 SiS_Pr->CRT1UsesCustomMode = FALSE; in SiSBIOSSetModeCRT1()
3938 backupcustom = SiS_Pr->UseCustomMode; in SiSBIOSSetModeCRT1()
3939 backupcr30 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30); in SiSBIOSSetModeCRT1()
3940 backupcr31 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x31); in SiSBIOSSetModeCRT1()
3941 backupcr35 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiSBIOSSetModeCRT1()
3942 backupcr38 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiSBIOSSetModeCRT1()
3943 if(SiS_Pr->SiS_VBType & VB_SISVB) { in SiSBIOSSetModeCRT1()
3946 backupp40d = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x0d) & 0x08; in SiSBIOSSetModeCRT1()
3949 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) { in SiSBIOSSetModeCRT1()
3950 SiS_SetReg(SiS_Pr->SiS_P3d4,0x30,pSiSEnt->CRT2CR30); in SiSBIOSSetModeCRT1()
3951 SiS_SetReg(SiS_Pr->SiS_P3d4,0x31,pSiSEnt->CRT2CR31); in SiSBIOSSetModeCRT1()
3952 SiS_SetReg(SiS_Pr->SiS_P3d4,0x35,pSiSEnt->CRT2CR35); in SiSBIOSSetModeCRT1()
3953 SiS_SetReg(SiS_Pr->SiS_P3d4,0x38,pSiSEnt->CRT2CR38); in SiSBIOSSetModeCRT1()
3955 SiSBIOSSetModeCRT2(SiS_Pr, HwInfo, pSiSEnt->pScrn_1, in SiSBIOSSetModeCRT1()
3957 SiS_SetReg(SiS_Pr->SiS_P3d4,0x30,backupcr30); in SiSBIOSSetModeCRT1()
3958 SiS_SetReg(SiS_Pr->SiS_P3d4,0x31,backupcr31); in SiSBIOSSetModeCRT1()
3959 SiS_SetReg(SiS_Pr->SiS_P3d4,0x35,backupcr35); in SiSBIOSSetModeCRT1()
3960 SiS_SetReg(SiS_Pr->SiS_P3d4,0x38,backupcr38); in SiSBIOSSetModeCRT1()
3961 if(SiS_Pr->SiS_VBType & VB_SISVB) { in SiSBIOSSetModeCRT1()
3962 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0d, ~0x08, backupp40d); in SiSBIOSSetModeCRT1()
3964 SiS_Pr->UseCustomMode = backupcustom; in SiSBIOSSetModeCRT1()
3973 SiS_HandleCRT1(SiS_Pr); in SiSBIOSSetModeCRT1()
3975 SiS_StrangeStuff(SiS_Pr, HwInfo); in SiSBIOSSetModeCRT1()
3977 SiS_DisplayOn(SiS_Pr); in SiSBIOSSetModeCRT1()
3978 SiS_SetRegByte(SiS_Pr->SiS_P3c6,0xFF); in SiSBIOSSetModeCRT1()
3980 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) { in SiSBIOSSetModeCRT1()
3982 SiS_SetReg(SiS_Pr->SiS_P3d4,0x38,backupreg); in SiSBIOSSetModeCRT1()
3985 SiS_SetReg(SiS_Pr->SiS_P3d4,0x35,backupreg); in SiSBIOSSetModeCRT1()
3999 SiS_GetPanelID(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) in SiS_GetPanelID() argument
4017 tempax = SiS_GetReg(SiS_Pr->SiS_P3c4,0x18); in SiS_GetPanelID()
4020 if(SiS_Pr->SiS_IF_DEF_LVDS == 1){ in SiS_GetPanelID()
4022 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x38); in SiS_GetPanelID()
4026 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x39); in SiS_GetPanelID()
4035 SiS_SetReg(SiS_Pr->SiS_P3d4,0x36,temp); in SiS_GetPanelID()
4037 SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x37,~(LCDSyncBit|LCDRGB18Bit),temp); in SiS_GetPanelID()
4043 tempax = SiS_GetReg(SiS_Pr->SiS_P3c4,0x1a); in SiS_GetPanelID()
4046 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { in SiS_GetPanelID()
4060 SiS_SetReg(SiS_Pr->SiS_P3d4,0x36,temp); in SiS_GetPanelID()
4063 SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x37,~(LCDSyncBit|LCDRGB18Bit),temp); in SiS_GetPanelID()
4064 if(SiS_Pr->SiS_VBType & VB_SISVB) { in SiS_GetPanelID()
4066 SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x39,0xfb,temp); in SiS_GetPanelID()
4082 SiS_CalcCRRegisters(SiS_Private *SiS_Pr, int depth) in SiS_CalcCRRegisters() argument
4084 SiS_Pr->CCRT1CRTC[0] = ((SiS_Pr->CHTotal >> 3) - 5) & 0xff; /* CR0 */ in SiS_CalcCRRegisters()
4085 SiS_Pr->CCRT1CRTC[1] = (SiS_Pr->CHDisplay >> 3) - 1; /* CR1 */ in SiS_CalcCRRegisters()
4086 SiS_Pr->CCRT1CRTC[2] = (SiS_Pr->CHBlankStart >> 3) - 1; /* CR2 */ in SiS_CalcCRRegisters()
4087 SiS_Pr->CCRT1CRTC[3] = (((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x1F) | 0x80; /* CR3 */ in SiS_CalcCRRegisters()
4088 SiS_Pr->CCRT1CRTC[4] = (SiS_Pr->CHSyncStart >> 3) + 3; /* CR4 */ in SiS_CalcCRRegisters()
4089 SiS_Pr->CCRT1CRTC[5] = ((((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x20) << 2) | /* CR5 */ in SiS_CalcCRRegisters()
4090 (((SiS_Pr->CHSyncEnd >> 3) + 3) & 0x1F); in SiS_CalcCRRegisters()
4092 SiS_Pr->CCRT1CRTC[6] = (SiS_Pr->CVTotal - 2) & 0xFF; /* CR6 */ in SiS_CalcCRRegisters()
4093 SiS_Pr->CCRT1CRTC[7] = (((SiS_Pr->CVTotal - 2) & 0x100) >> 8) /* CR7 */ in SiS_CalcCRRegisters()
4094 | (((SiS_Pr->CVDisplay - 1) & 0x100) >> 7) in SiS_CalcCRRegisters()
4095 | ((SiS_Pr->CVSyncStart & 0x100) >> 6) in SiS_CalcCRRegisters()
4096 | (((SiS_Pr->CVBlankStart - 1) & 0x100) >> 5) in SiS_CalcCRRegisters()
4098 | (((SiS_Pr->CVTotal - 2) & 0x200) >> 4) in SiS_CalcCRRegisters()
4099 | (((SiS_Pr->CVDisplay - 1) & 0x200) >> 3) in SiS_CalcCRRegisters()
4100 | ((SiS_Pr->CVSyncStart & 0x200) >> 2); in SiS_CalcCRRegisters()
4102 SiS_Pr->CCRT1CRTC[16] = ((((SiS_Pr->CVBlankStart - 1) & 0x200) >> 4) >> 5); /* CR9 */ in SiS_CalcCRRegisters()
4105 if(SiS_Pr->CHDisplay >= 1600) SiS_Pr->CCRT1CRTC[16] |= 0x60; /* SRE */ in SiS_CalcCRRegisters()
4106 else if(SiS_Pr->CHDisplay >= 640) SiS_Pr->CCRT1CRTC[16] |= 0x40; in SiS_CalcCRRegisters()
4116 SiS_Pr->CCRT1CRTC[8] = (SiS_Pr->CVSyncStart ) & 0xFF; /* CR10 */ in SiS_CalcCRRegisters()
4117 SiS_Pr->CCRT1CRTC[9] = ((SiS_Pr->CVSyncEnd ) & 0x0F) | 0x80; /* CR11 */ in SiS_CalcCRRegisters()
4118 SiS_Pr->CCRT1CRTC[10] = (SiS_Pr->CVDisplay - 1) & 0xFF; /* CR12 */ in SiS_CalcCRRegisters()
4119 SiS_Pr->CCRT1CRTC[11] = (SiS_Pr->CVBlankStart - 1) & 0xFF; /* CR15 */ in SiS_CalcCRRegisters()
4120 SiS_Pr->CCRT1CRTC[12] = (SiS_Pr->CVBlankEnd - 1) & 0xFF; /* CR16 */ in SiS_CalcCRRegisters()
4122 SiS_Pr->CCRT1CRTC[13] = /* SRA */ in SiS_CalcCRRegisters()
4123 GETBITSTR((SiS_Pr->CVTotal -2), 10:10, 0:0) | in SiS_CalcCRRegisters()
4124 GETBITSTR((SiS_Pr->CVDisplay -1), 10:10, 1:1) | in SiS_CalcCRRegisters()
4125 GETBITSTR((SiS_Pr->CVBlankStart-1), 10:10, 2:2) | in SiS_CalcCRRegisters()
4126 GETBITSTR((SiS_Pr->CVSyncStart ), 10:10, 3:3) | in SiS_CalcCRRegisters()
4127 GETBITSTR((SiS_Pr->CVBlankEnd -1), 8:8, 4:4) | in SiS_CalcCRRegisters()
4128 GETBITSTR((SiS_Pr->CVSyncEnd ), 4:4, 5:5) ; in SiS_CalcCRRegisters()
4130 SiS_Pr->CCRT1CRTC[14] = /* SRB */ in SiS_CalcCRRegisters()
4131 GETBITSTR((SiS_Pr->CHTotal >> 3) - 5, 9:8, 1:0) | in SiS_CalcCRRegisters()
4132 GETBITSTR((SiS_Pr->CHDisplay >> 3) - 1, 9:8, 3:2) | in SiS_CalcCRRegisters()
4133 GETBITSTR((SiS_Pr->CHBlankStart >> 3) - 1, 9:8, 5:4) | in SiS_CalcCRRegisters()
4134 GETBITSTR((SiS_Pr->CHSyncStart >> 3) + 3, 9:8, 7:6) ; in SiS_CalcCRRegisters()
4137 SiS_Pr->CCRT1CRTC[15] = /* SRC */ in SiS_CalcCRRegisters()
4138 GETBITSTR((SiS_Pr->CHBlankEnd >> 3) - 1, 7:6, 1:0) | in SiS_CalcCRRegisters()
4139 GETBITSTR((SiS_Pr->CHSyncEnd >> 3) + 3, 5:5, 2:2) ; in SiS_CalcCRRegisters()
4143 SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex) in SiS_CalcLCDACRT1Timing() argument
4145 USHORT modeflag, tempax, tempbx, VGAHDE = SiS_Pr->SiS_VGAHDE; in SiS_CalcLCDACRT1Timing()
4149 if(SiS_Pr->SiS_LCDInfo & LCDPass11) return; in SiS_CalcLCDACRT1Timing()
4152 modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; in SiS_CalcLCDACRT1Timing()
4153 } else if(SiS_Pr->UseCustomMode) { in SiS_CalcLCDACRT1Timing()
4154 modeflag = SiS_Pr->CModeFlag; in SiS_CalcLCDACRT1Timing()
4156 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; in SiS_CalcLCDACRT1Timing()
4161 SiS_Pr->CHDisplay = VGAHDE; in SiS_CalcLCDACRT1Timing()
4162 SiS_Pr->CHBlankStart = VGAHDE; in SiS_CalcLCDACRT1Timing()
4164 SiS_Pr->CVDisplay = SiS_Pr->SiS_VGAVDE; in SiS_CalcLCDACRT1Timing()
4165 SiS_Pr->CVBlankStart = SiS_Pr->SiS_VGAVDE; in SiS_CalcLCDACRT1Timing()
4167 tempbx = SiS_Pr->PanelHT - SiS_Pr->PanelXRes; in SiS_CalcLCDACRT1Timing()
4168 tempax = SiS_Pr->SiS_VGAHDE; /* not /2 ! */ in SiS_CalcLCDACRT1Timing()
4169 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { in SiS_CalcLCDACRT1Timing()
4170 tempax = SiS_Pr->PanelXRes; in SiS_CalcLCDACRT1Timing()
4174 SiS_Pr->CHTotal = SiS_Pr->CHBlankEnd = tempbx; in SiS_CalcLCDACRT1Timing()
4177 tempbx = SiS_Pr->CHTotal; in SiS_CalcLCDACRT1Timing()
4178 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { in SiS_CalcLCDACRT1Timing()
4179 tempbx = SiS_Pr->PanelXRes; in SiS_CalcLCDACRT1Timing()
4184 tempax += SiS_Pr->PanelHRS; in SiS_CalcLCDACRT1Timing()
4185 SiS_Pr->CHSyncStart = tempax; in SiS_CalcLCDACRT1Timing()
4186 tempax += SiS_Pr->PanelHRE; in SiS_CalcLCDACRT1Timing()
4187 SiS_Pr->CHSyncEnd = tempax; in SiS_CalcLCDACRT1Timing()
4189 tempbx = SiS_Pr->PanelVT - SiS_Pr->PanelYRes; in SiS_CalcLCDACRT1Timing()
4190 tempax = SiS_Pr->SiS_VGAVDE; in SiS_CalcLCDACRT1Timing()
4191 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { in SiS_CalcLCDACRT1Timing()
4192 tempax = SiS_Pr->PanelYRes; in SiS_CalcLCDACRT1Timing()
4194 SiS_Pr->CVTotal = SiS_Pr->CVBlankEnd = tempbx + tempax; in SiS_CalcLCDACRT1Timing()
4196 tempax = SiS_Pr->SiS_VGAVDE; in SiS_CalcLCDACRT1Timing()
4197 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { in SiS_CalcLCDACRT1Timing()
4198 tempax += (SiS_Pr->PanelYRes - tempax) >> 1; in SiS_CalcLCDACRT1Timing()
4200 tempax += SiS_Pr->PanelVRS; in SiS_CalcLCDACRT1Timing()
4201 SiS_Pr->CVSyncStart = tempax; in SiS_CalcLCDACRT1Timing()
4202 tempax += SiS_Pr->PanelVRE; in SiS_CalcLCDACRT1Timing()
4203 SiS_Pr->CVSyncEnd = tempax; in SiS_CalcLCDACRT1Timing()
4205 SiS_CalcCRRegisters(SiS_Pr, 8); in SiS_CalcLCDACRT1Timing()
4206 SiS_Pr->CCRT1CRTC[16] &= ~0xE0; in SiS_CalcLCDACRT1Timing()
4208 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f); in SiS_CalcLCDACRT1Timing()
4211 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_CalcLCDACRT1Timing()
4214 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_CalcLCDACRT1Timing()
4217 SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_CalcLCDACRT1Timing()
4220 SiS_SetReg(SiS_Pr->SiS_P3c4,j,SiS_Pr->CCRT1CRTC[i]); in SiS_CalcLCDACRT1Timing()
4223 tempax = SiS_Pr->CCRT1CRTC[16] & 0xE0; in SiS_CalcLCDACRT1Timing()
4224 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0E,0x1F,tempax); in SiS_CalcLCDACRT1Timing()
4226 tempax = (SiS_Pr->CCRT1CRTC[16] & 0x01) << 5; in SiS_CalcLCDACRT1Timing()
4228 SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0x5F,tempax); in SiS_CalcLCDACRT1Timing()
4232 SiS_Pr->CHDisplay, SiS_Pr->CHSyncStart, SiS_Pr->CHSyncEnd, SiS_Pr->CHTotal, in SiS_CalcLCDACRT1Timing()
4233 SiS_Pr->CVDisplay, SiS_Pr->CVSyncStart, SiS_Pr->CVSyncEnd, SiS_Pr->CVTotal, in SiS_CalcLCDACRT1Timing()
4234 SiS_Pr->CHBlankStart, SiS_Pr->CHBlankEnd, SiS_Pr->CVBlankStart, SiS_Pr->CVBlankEnd); in SiS_CalcLCDACRT1Timing()
4237 SiS_Pr->CCRT1CRTC[0], SiS_Pr->CCRT1CRTC[1], in SiS_CalcLCDACRT1Timing()
4238 SiS_Pr->CCRT1CRTC[2], SiS_Pr->CCRT1CRTC[3], in SiS_CalcLCDACRT1Timing()
4239 SiS_Pr->CCRT1CRTC[4], SiS_Pr->CCRT1CRTC[5], in SiS_CalcLCDACRT1Timing()
4240 SiS_Pr->CCRT1CRTC[6], SiS_Pr->CCRT1CRTC[7]); in SiS_CalcLCDACRT1Timing()
4242 SiS_Pr->CCRT1CRTC[8], SiS_Pr->CCRT1CRTC[9], in SiS_CalcLCDACRT1Timing()
4243 SiS_Pr->CCRT1CRTC[10], SiS_Pr->CCRT1CRTC[11], in SiS_CalcLCDACRT1Timing()
4244 SiS_Pr->CCRT1CRTC[12], SiS_Pr->CCRT1CRTC[13], in SiS_CalcLCDACRT1Timing()
4245 SiS_Pr->CCRT1CRTC[14], SiS_Pr->CCRT1CRTC[15]); in SiS_CalcLCDACRT1Timing()
4246 xf86DrvMsg(0, X_INFO, " 0x%02x}},\n", SiS_Pr->CCRT1CRTC[16]); in SiS_CalcLCDACRT1Timing()
4270 pSiS->SiS_Pr->CModeFlag = 0; in SiS_CheckBuildCustomMode()
4272 pSiS->SiS_Pr->CDClock = mode->Clock; in SiS_CheckBuildCustomMode()
4274 pSiS->SiS_Pr->CHDisplay = mode->HDisplay; in SiS_CheckBuildCustomMode()
4275 pSiS->SiS_Pr->CHSyncStart = mode->HSyncStart; in SiS_CheckBuildCustomMode()
4276 pSiS->SiS_Pr->CHSyncEnd = mode->HSyncEnd; in SiS_CheckBuildCustomMode()
4277 pSiS->SiS_Pr->CHTotal = mode->HTotal; in SiS_CheckBuildCustomMode()
4279 pSiS->SiS_Pr->CVDisplay = mode->VDisplay; in SiS_CheckBuildCustomMode()
4280 pSiS->SiS_Pr->CVSyncStart = mode->VSyncStart; in SiS_CheckBuildCustomMode()
4281 pSiS->SiS_Pr->CVSyncEnd = mode->VSyncEnd; in SiS_CheckBuildCustomMode()
4282 pSiS->SiS_Pr->CVTotal = mode->VTotal; in SiS_CheckBuildCustomMode()
4284 pSiS->SiS_Pr->CFlags = mode->Flags; in SiS_CheckBuildCustomMode()
4286 if(pSiS->SiS_Pr->CFlags & V_INTERLACE) { in SiS_CheckBuildCustomMode()
4287 pSiS->SiS_Pr->CVDisplay >>= 1; in SiS_CheckBuildCustomMode()
4288 pSiS->SiS_Pr->CVSyncStart >>= 1; in SiS_CheckBuildCustomMode()
4289 pSiS->SiS_Pr->CVSyncEnd >>= 1; in SiS_CheckBuildCustomMode()
4290 pSiS->SiS_Pr->CVTotal >>= 1; in SiS_CheckBuildCustomMode()
4292 if(pSiS->SiS_Pr->CFlags & V_DBLSCAN) { in SiS_CheckBuildCustomMode()
4294 pSiS->SiS_Pr->CVDisplay <<= 1; in SiS_CheckBuildCustomMode()
4295 pSiS->SiS_Pr->CVSyncStart <<= 1; in SiS_CheckBuildCustomMode()
4296 pSiS->SiS_Pr->CVSyncEnd <<= 1; in SiS_CheckBuildCustomMode()
4297 pSiS->SiS_Pr->CVTotal <<= 1; in SiS_CheckBuildCustomMode()
4300 pSiS->SiS_Pr->CHBlankStart = pSiS->SiS_Pr->CHDisplay; in SiS_CheckBuildCustomMode()
4301 pSiS->SiS_Pr->CHBlankEnd = pSiS->SiS_Pr->CHTotal; in SiS_CheckBuildCustomMode()
4302 pSiS->SiS_Pr->CVBlankStart = pSiS->SiS_Pr->CVSyncStart - 1; in SiS_CheckBuildCustomMode()
4303 pSiS->SiS_Pr->CVBlankEnd = pSiS->SiS_Pr->CVTotal; in SiS_CheckBuildCustomMode()
4305 if(SiS_compute_vclk(pSiS->SiS_Pr->CDClock, &out_n, &out_dn, &out_div, &out_sbit, &out_scale)) { in SiS_CheckBuildCustomMode()
4306 pSiS->SiS_Pr->CSR2B = (out_div == 2) ? 0x80 : 0x00; in SiS_CheckBuildCustomMode()
4307 pSiS->SiS_Pr->CSR2B |= ((out_n - 1) & 0x7f); in SiS_CheckBuildCustomMode()
4308 pSiS->SiS_Pr->CSR2C = (out_dn - 1) & 0x1f; in SiS_CheckBuildCustomMode()
4309 pSiS->SiS_Pr->CSR2C |= (((out_scale - 1) & 3) << 5); in SiS_CheckBuildCustomMode()
4310 pSiS->SiS_Pr->CSR2C |= ((out_sbit & 0x01) << 7); in SiS_CheckBuildCustomMode()
4313 pSiS->SiS_Pr->CDClock, out_n, out_dn, out_div, out_sbit, out_scale); in SiS_CheckBuildCustomMode()
4316 SiSCalcClock(pScrn, pSiS->SiS_Pr->CDClock, 2, vclk); in SiS_CheckBuildCustomMode()
4317 pSiS->SiS_Pr->CSR2B = (vclk[VLDidx] == 2) ? 0x80 : 0x00; in SiS_CheckBuildCustomMode()
4318 pSiS->SiS_Pr->CSR2B |= (vclk[Midx] - 1) & 0x7f; in SiS_CheckBuildCustomMode()
4319 pSiS->SiS_Pr->CSR2C = (vclk[Nidx] - 1) & 0x1f; in SiS_CheckBuildCustomMode()
4322 pSiS->SiS_Pr->CSR2C |= ((vclk[Pidx] - 1) & 3) << 5; in SiS_CheckBuildCustomMode()
4325 pSiS->SiS_Pr->CSR2C |= (((vclk[Pidx] / 2) - 1) & 3) << 5; in SiS_CheckBuildCustomMode()
4326 pSiS->SiS_Pr->CSR2C |= 0x80; in SiS_CheckBuildCustomMode()
4330 pSiS->SiS_Pr->CDClock, vclk[Midx], vclk[Nidx], vclk[VLDidx], vclk[Pidx]); in SiS_CheckBuildCustomMode()
4334 pSiS->SiS_Pr->CSRClock = (pSiS->SiS_Pr->CDClock / 1000) + 1; in SiS_CheckBuildCustomMode()
4336 SiS_CalcCRRegisters(pSiS->SiS_Pr, depth); in SiS_CheckBuildCustomMode()
4339 case 8: pSiS->SiS_Pr->CModeFlag |= 0x223b; break; in SiS_CheckBuildCustomMode()
4340 case 16: pSiS->SiS_Pr->CModeFlag |= 0x227d; break; in SiS_CheckBuildCustomMode()
4341 case 32: pSiS->SiS_Pr->CModeFlag |= 0x22ff; break; in SiS_CheckBuildCustomMode()
4345 if(pSiS->SiS_Pr->CFlags & V_DBLSCAN) in SiS_CheckBuildCustomMode()
4346 pSiS->SiS_Pr->CModeFlag |= DoubleScanMode; in SiS_CheckBuildCustomMode()
4348 if((pSiS->SiS_Pr->CVDisplay >= 1024) || in SiS_CheckBuildCustomMode()
4349 (pSiS->SiS_Pr->CVTotal >= 1024) || in SiS_CheckBuildCustomMode()
4350 (pSiS->SiS_Pr->CHDisplay >= 1024)) in SiS_CheckBuildCustomMode()
4351 pSiS->SiS_Pr->CModeFlag |= LineCompareOff; in SiS_CheckBuildCustomMode()
4353 if(pSiS->SiS_Pr->CFlags & V_CLKDIV2) in SiS_CheckBuildCustomMode()
4354 pSiS->SiS_Pr->CModeFlag |= HalfDCLK; in SiS_CheckBuildCustomMode()
4356 pSiS->SiS_Pr->CInfoFlag = 0x0007; in SiS_CheckBuildCustomMode()
4358 if(pSiS->SiS_Pr->CFlags & V_NHSYNC) in SiS_CheckBuildCustomMode()
4359 pSiS->SiS_Pr->CInfoFlag |= 0x4000; in SiS_CheckBuildCustomMode()
4361 if(pSiS->SiS_Pr->CFlags & V_NVSYNC) in SiS_CheckBuildCustomMode()
4362 pSiS->SiS_Pr->CInfoFlag |= 0x8000; in SiS_CheckBuildCustomMode()
4364 if(pSiS->SiS_Pr->CFlags & V_INTERLACE) in SiS_CheckBuildCustomMode()
4365 pSiS->SiS_Pr->CInfoFlag |= InterlaceMode; in SiS_CheckBuildCustomMode()
4367 pSiS->SiS_Pr->UseCustomMode = TRUE; in SiS_CheckBuildCustomMode()
4370 pSiS->SiS_Pr->CHDisplay,pSiS->SiS_Pr->CVDisplay); in SiS_CheckBuildCustomMode()
4372 pSiS->SiS_Pr->CModeFlag, pSiS->SiS_Pr->CInfoFlag); in SiS_CheckBuildCustomMode()
4374 pSiS->SiS_Pr->CCRT1CRTC[0], pSiS->SiS_Pr->CCRT1CRTC[1], in SiS_CheckBuildCustomMode()
4375 pSiS->SiS_Pr->CCRT1CRTC[2], pSiS->SiS_Pr->CCRT1CRTC[3], in SiS_CheckBuildCustomMode()
4376 pSiS->SiS_Pr->CCRT1CRTC[4], pSiS->SiS_Pr->CCRT1CRTC[5], in SiS_CheckBuildCustomMode()
4377 pSiS->SiS_Pr->CCRT1CRTC[6], pSiS->SiS_Pr->CCRT1CRTC[7]); in SiS_CheckBuildCustomMode()
4379 pSiS->SiS_Pr->CCRT1CRTC[8], pSiS->SiS_Pr->CCRT1CRTC[9], in SiS_CheckBuildCustomMode()
4380 pSiS->SiS_Pr->CCRT1CRTC[10], pSiS->SiS_Pr->CCRT1CRTC[11], in SiS_CheckBuildCustomMode()
4381 pSiS->SiS_Pr->CCRT1CRTC[12], pSiS->SiS_Pr->CCRT1CRTC[13], in SiS_CheckBuildCustomMode()
4382 pSiS->SiS_Pr->CCRT1CRTC[14], pSiS->SiS_Pr->CCRT1CRTC[15]); in SiS_CheckBuildCustomMode()
4383 xf86DrvMsg(0, X_INFO, " 0x%02x}},\n", pSiS->SiS_Pr->CCRT1CRTC[16]); in SiS_CheckBuildCustomMode()
4385 pSiS->SiS_Pr->CSR2B, pSiS->SiS_Pr->CSR2C, pSiS->SiS_Pr->CSRClock); in SiS_CheckBuildCustomMode()
4413 InitTo300Pointer(pSiS->SiS_Pr, &pSiS->sishw_ext); in SiSBuildBuiltInModeList()
4419 InitTo310Pointer(pSiS->SiS_Pr, &pSiS->sishw_ext); in SiSBuildBuiltInModeList()
4426 while(pSiS->SiS_Pr->SiS_RefIndex[i].Ext_InfoFlag != 0xFFFF) { in SiSBuildBuiltInModeList()
4428 index = pSiS->SiS_Pr->SiS_RefIndex[i].Ext_CRT1CRTC; in SiSBuildBuiltInModeList()
4432 (pSiS->SiS_Pr->SiS_RefIndex[i].ModeID == 0x5a)) { in SiSBuildBuiltInModeList()
4437 (pSiS->SiS_Pr->SiS_RefIndex[i].XRes == 320) && in SiSBuildBuiltInModeList()
4438 (pSiS->SiS_Pr->SiS_RefIndex[i].YRes == 240) && in SiSBuildBuiltInModeList()
4439 (pSiS->SiS_Pr->SiS_RefIndex[i].ModeID != 0x5a)) { in SiSBuildBuiltInModeList()
4458 sprintf(current->name, "%dx%d", pSiS->SiS_Pr->SiS_RefIndex[i].XRes, in SiSBuildBuiltInModeList()
4459 pSiS->SiS_Pr->SiS_RefIndex[i].YRes); in SiSBuildBuiltInModeList()
4465 vclkindex = pSiS->SiS_Pr->SiS_RefIndex[i].Ext_CRTVCLK; in SiSBuildBuiltInModeList()
4468 sr2b = pSiS->SiS_Pr->SiS_VCLKData[vclkindex].SR2B; in SiSBuildBuiltInModeList()
4469 sr2c = pSiS->SiS_Pr->SiS_VCLKData[vclkindex].SR2C; in SiSBuildBuiltInModeList()
4485 sr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[14]; in SiSBuildBuiltInModeList()
4488 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[0]; in SiSBuildBuiltInModeList()
4496 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[1]; in SiSBuildBuiltInModeList()
4504 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[4]; in SiSBuildBuiltInModeList()
4512 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[2]; in SiSBuildBuiltInModeList()
4519 sr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[15]; in SiSBuildBuiltInModeList()
4522 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[3]; in SiSBuildBuiltInModeList()
4525 cr_data2 = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[5]; in SiSBuildBuiltInModeList()
4544 if((pSiS->SiS_Pr->SiS_RefIndex[i].XRes == 320) && in SiSBuildBuiltInModeList()
4545 ((pSiS->SiS_Pr->SiS_RefIndex[i].YRes == 200) || in SiSBuildBuiltInModeList()
4546 (pSiS->SiS_Pr->SiS_RefIndex[i].YRes == 240))) { in SiSBuildBuiltInModeList()
4574 sr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[13]; in SiSBuildBuiltInModeList()
4577 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[6]; in SiSBuildBuiltInModeList()
4580 cr_data2 = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[7]; in SiSBuildBuiltInModeList()
4590 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[10]; in SiSBuildBuiltInModeList()
4600 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[8]; in SiSBuildBuiltInModeList()
4610 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[11]; in SiSBuildBuiltInModeList()
4613 cr_data3 = (pSiS->SiS_Pr->SiS_CRT1Table[index].CR[16] & 0x01) << 5; in SiSBuildBuiltInModeList()
4622 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[12]; in SiSBuildBuiltInModeList()
4631 cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[9]; in SiSBuildBuiltInModeList()
4660 if(pSiS->SiS_Pr->SiS_RefIndex[i].Ext_InfoFlag & 0x4000) in SiSBuildBuiltInModeList()
4665 if(pSiS->SiS_Pr->SiS_RefIndex[i].Ext_InfoFlag & 0x8000) in SiSBuildBuiltInModeList()
4670 if(pSiS->SiS_Pr->SiS_RefIndex[i].Ext_InfoFlag & 0x0080) in SiSBuildBuiltInModeList()
4674 while(pSiS->SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID != 0xff) { in SiSBuildBuiltInModeList()
4675 if(pSiS->SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID == in SiSBuildBuiltInModeList()
4676 pSiS->SiS_Pr->SiS_RefIndex[i].ModeID) { in SiSBuildBuiltInModeList()
4677 if(pSiS->SiS_Pr->SiS_EModeIDTable[j].Ext_ModeFlag & DoubleScanMode) { in SiSBuildBuiltInModeList()
4738 if(pSiS->SiS_Pr->CP_Vendor) { in SiSBuildBuiltInModeList()
4740 pSiS->SiS_Pr->CP_Vendor, pSiS->SiS_Pr->CP_Product); in SiSBuildBuiltInModeList()
4744 while((!done) && (SiS_PlasmaTable[i].vendor) && (pSiS->SiS_Pr->CP_Vendor)) { in SiSBuildBuiltInModeList()
4746 if(SiS_PlasmaTable[i].vendor == pSiS->SiS_Pr->CP_Vendor) { in SiSBuildBuiltInModeList()
4750 if(SiS_PlasmaTable[i].product[j] == pSiS->SiS_Pr->CP_Product) { in SiSBuildBuiltInModeList()
4828 pSiS->LCDwidth = pSiS->SiS_Pr->CP_MaxX = current->HDisplay; in SiSBuildBuiltInModeList()
4830 pSiS->LCDheight = pSiS->SiS_Pr->CP_MaxY = current->VDisplay; in SiSBuildBuiltInModeList()
4843 if(pSiS->SiS_Pr->CP_HaveCustomData) { in SiSBuildBuiltInModeList()
4847 if(pSiS->SiS_Pr->CP_DataValid[i]) { in SiSBuildBuiltInModeList()
4864 sprintf(current->name, "%dx%d", pSiS->SiS_Pr->CP_HDisplay[i], in SiSBuildBuiltInModeList()
4865 pSiS->SiS_Pr->CP_VDisplay[i]); in SiSBuildBuiltInModeList()
4871 current->Clock = pSiS->SiS_Pr->CP_Clock[i]; in SiSBuildBuiltInModeList()
4874 current->HDisplay = pSiS->SiS_Pr->CP_HDisplay[i]; in SiSBuildBuiltInModeList()
4875 current->HSyncStart = pSiS->SiS_Pr->CP_HSyncStart[i]; in SiSBuildBuiltInModeList()
4876 current->HSyncEnd = pSiS->SiS_Pr->CP_HSyncEnd[i]; in SiSBuildBuiltInModeList()
4877 current->HTotal = pSiS->SiS_Pr->CP_HTotal[i]; in SiSBuildBuiltInModeList()
4879 current->VDisplay = pSiS->SiS_Pr->CP_VDisplay[i]; in SiSBuildBuiltInModeList()
4880 current->VSyncStart = pSiS->SiS_Pr->CP_VSyncStart[i]; in SiSBuildBuiltInModeList()
4881 current->VSyncEnd = pSiS->SiS_Pr->CP_VSyncEnd[i]; in SiSBuildBuiltInModeList()
4882 current->VTotal = pSiS->SiS_Pr->CP_VTotal[i]; in SiSBuildBuiltInModeList()
4885 current->CrtcHBlankStart = pSiS->SiS_Pr->CP_HBlankStart[i]; in SiSBuildBuiltInModeList()
4888 current->CrtcHBlankEnd = pSiS->SiS_Pr->CP_HBlankEnd[i]; in SiSBuildBuiltInModeList()
4892 current->CrtcVBlankStart = pSiS->SiS_Pr->CP_VBlankStart[i]; in SiSBuildBuiltInModeList()
4895 current->CrtcVBlankEnd = pSiS->SiS_Pr->CP_VBlankEnd[i]; in SiSBuildBuiltInModeList()
4898 if(pSiS->SiS_Pr->CP_SyncValid[i]) { in SiSBuildBuiltInModeList()
4899 if(pSiS->SiS_Pr->CP_HSync_P[i]) in SiSBuildBuiltInModeList()
4904 if(pSiS->SiS_Pr->CP_VSync_P[i]) in SiSBuildBuiltInModeList()
4931 InitTo300Pointer(pSiS->SiS_Pr, &pSiS->sishw_ext); in SiSTranslateToVESA()
4937 InitTo310Pointer(pSiS->SiS_Pr, &pSiS->sishw_ext); in SiSTranslateToVESA()
4946 while(pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_ModeID != 0xff) { in SiSTranslateToVESA()
4947 if(pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_ModeID == modenumber) { in SiSTranslateToVESA()
4948 return (int)pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_VESAID; in SiSTranslateToVESA()
4958 sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in sisfb_mode_rate_to_dclock() argument
4968 InitTo300Pointer(SiS_Pr, HwInfo); in sisfb_mode_rate_to_dclock()
4974 InitTo310Pointer(SiS_Pr, HwInfo); in sisfb_mode_rate_to_dclock()
4980 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) {; in sisfb_mode_rate_to_dclock()
4985 RefreshRateTableIndex = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex; in sisfb_mode_rate_to_dclock()
4987 ClockIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK; in sisfb_mode_rate_to_dclock()
4991 Clock = SiS_Pr->SiS_VCLKData[ClockIndex].CLOCK * 1000; in sisfb_mode_rate_to_dclock()
4997 sisfb_gettotalfrommode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in sisfb_gettotalfrommode() argument
5007 InitTo300Pointer(SiS_Pr, HwInfo); in sisfb_gettotalfrommode()
5013 InitTo310Pointer(SiS_Pr, HwInfo); in sisfb_gettotalfrommode()
5019 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; in sisfb_gettotalfrommode()
5021 RefreshRateTableIndex = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex; in sisfb_gettotalfrommode()
5023 CRT1Index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC; in sisfb_gettotalfrommode()
5025 sr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[14]; in sisfb_gettotalfrommode()
5026 cr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[0]; in sisfb_gettotalfrommode()
5029 sr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[13]; in sisfb_gettotalfrommode()
5030 cr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[6]; in sisfb_gettotalfrommode()
5031 cr_data2 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[7]; in sisfb_gettotalfrommode()
5037 if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & InterlaceMode) in sisfb_gettotalfrommode()
5044 sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, in sisfb_mode_rate_to_ddata() argument
5058 InitTo300Pointer(SiS_Pr, HwInfo); in sisfb_mode_rate_to_ddata()
5064 InitTo310Pointer(SiS_Pr, HwInfo); in sisfb_mode_rate_to_ddata()
5070 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return 0; in sisfb_mode_rate_to_ddata()
5072 RefreshRateTableIndex = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex; in sisfb_mode_rate_to_ddata()
5074 index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC; in sisfb_mode_rate_to_ddata()
5076 sr_data = SiS_Pr->SiS_CRT1Table[index].CR[14]; in sisfb_mode_rate_to_ddata()
5078 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[0]; in sisfb_mode_rate_to_ddata()
5085 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[1]; in sisfb_mode_rate_to_ddata()
5092 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[4]; in sisfb_mode_rate_to_ddata()
5099 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[2]; in sisfb_mode_rate_to_ddata()
5105 sr_data = SiS_Pr->SiS_CRT1Table[index].CR[15]; in sisfb_mode_rate_to_ddata()
5107 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[3]; in sisfb_mode_rate_to_ddata()
5109 cr_data2 = SiS_Pr->SiS_CRT1Table[index].CR[5]; in sisfb_mode_rate_to_ddata()
5127 if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes == 320) && in sisfb_mode_rate_to_ddata()
5128 ((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes == 200) || in sisfb_mode_rate_to_ddata()
5129 (SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes == 240))) { in sisfb_mode_rate_to_ddata()
5146 sr_data = SiS_Pr->SiS_CRT1Table[index].CR[13]; in sisfb_mode_rate_to_ddata()
5148 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[6]; in sisfb_mode_rate_to_ddata()
5150 cr_data2 = SiS_Pr->SiS_CRT1Table[index].CR[7]; in sisfb_mode_rate_to_ddata()
5159 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[10]; in sisfb_mode_rate_to_ddata()
5168 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[8]; in sisfb_mode_rate_to_ddata()
5177 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[11]; in sisfb_mode_rate_to_ddata()
5179 cr_data3 = (SiS_Pr->SiS_CRT1Table[index].CR[16] & 0x01) << 5; in sisfb_mode_rate_to_ddata()
5187 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[12]; in sisfb_mode_rate_to_ddata()
5195 cr_data = SiS_Pr->SiS_CRT1Table[index].CR[9]; in sisfb_mode_rate_to_ddata()
5208 if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000) in sisfb_mode_rate_to_ddata()
5213 if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x4000) in sisfb_mode_rate_to_ddata()
5219 if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080) in sisfb_mode_rate_to_ddata()
5223 while(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID != 0xff) { in sisfb_mode_rate_to_ddata()
5224 if(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID == in sisfb_mode_rate_to_ddata()
5225 SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].ModeID) { in sisfb_mode_rate_to_ddata()
5226 if(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeFlag & DoubleScanMode) { in sisfb_mode_rate_to_ddata()