1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h,v 1.108 2004/01/27 11:58:27 twini Exp $ */
3 * Main global data and definitions
5 * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1) Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2) Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3) All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement: "This product includes
17 * software developed by Thomas Winischhofer, Vienna, Austria."
18 * 4) The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * Authors: Thomas Winischhofer <thomas@winischhofer.net>
33 * others (old code base)
40 /* Always unlock the registers (should be set!) */
43 #define SISDRIVERVERSIONYEAR 4
44 #define SISDRIVERVERSIONMONTH 1
45 #define SISDRIVERVERSIONDAY 27
46 #define SISDRIVERREVISION 1
48 #define SISDRIVERIVERSION (SISDRIVERVERSIONYEAR << 16) | (SISDRIVERVERSIONMONTH << 8) \
49 | SISDRIVERVERSIONDAY | (SISDRIVERREVISION << 24)
52 #define TWDEBUG /* for debugging */
62 #include "xf86Cursor.h"
63 #include "xf86_ansic.h"
77 #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,99,14,0)
79 #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,4,99,99,0) /* Adapt this when the time has come */
85 #define _XF86DRI_SERVER_
88 #include "GL/glxint.h"
93 #define SISDUALHEAD /* Include Dual Head code */
97 #define SISMERGED /* Include Merged-FB mode */
102 #define SISXINERAMA /* Include SiS Pseudo-Xinerama for MergedFB mode */
103 #define SIS_XINERAMA_MAJOR_VERSION 1
104 #define SIS_XINERAMA_MINOR_VERSION 1
109 #define SISGAMMA /* Include code for gamma correction */
112 #if 1 /* Include code for color hardware cursors */
113 #define SIS_ARGB_CURSOR
116 #if 1 /* Include YPbPr support on SiS bridges (315 series and 661/741/760) */
122 #define NEED_REPLIES /* ? */
123 #define EXTENSION_PROC_ARGS void *
124 #include "extnsionst.h" /* required */
125 #include "panoramiXproto.h" /* required */
130 #define SISVRAMQ /* Use VRAM queue mode on 315 series */
133 #undef SIS315DRI /* define this if dri is adapted for 315/330 series */
135 /* For SiS315/550/650/740/330/660 - these should be moved elsewhere! */
136 #ifndef PCI_CHIP_SIS315H
137 #define PCI_CHIP_SIS315H 0x0310
139 #ifndef PCI_CHIP_SIS315
140 #define PCI_CHIP_SIS315 0x0315
142 #ifndef PCI_CHIP_SIS315PRO
143 #define PCI_CHIP_SIS315PRO 0x0325
145 #ifndef PCI_CHIP_SIS550
146 #define PCI_CHIP_SIS550 0x5315 /* 550_VGA */
148 #ifndef PCI_CHIP_SIS650
149 #define PCI_CHIP_SIS650 0x6325 /* 650_VGA and 740_VGA */
151 #ifndef PCI_CHIP_SIS330
152 #define PCI_CHIP_SIS330 0x0330
154 #ifndef PCI_CHIP_SIS660
155 #define PCI_CHIP_SIS660 0x6330 /* 661_VGA, 741_VGA, 760_VGA */
158 #define SIS_NAME "SIS"
159 #define SIS_DRIVER_NAME "sis"
160 #define SIS_MAJOR_VERSION 0
161 #define SIS_MINOR_VERSION 7
162 #define SIS_PATCHLEVEL 0
163 #define SIS_CURRENT_VERSION ((SIS_MAJOR_VERSION << 16) | \
164 (SIS_MINOR_VERSION << 8) | SIS_PATCHLEVEL )
166 /* pSiS->Flags (old series only) */
167 #define SYNCDRAM 0x00000001
168 #define RAMFLAG 0x00000002
169 #define ESS137xPRESENT 0x00000004
170 #define SECRETFLAG 0x00000008
171 #define A6326REVAB 0x00000010
172 #define MMIOMODE 0x00010000
173 #define LFBQMODE 0x00020000
174 #define AGPQMODE 0x00040000
175 #define UMA 0x80000000
177 #define BIOS_BASE 0xC0000
178 #define BIOS_SIZE 0x10000
180 #define SR_BUFFER_SIZE 5
181 #define CR_BUFFER_SIZE 5
183 #define SIS_VBFlagsVersion 1
185 /* VBFlags - if anything is changed here, increase VBFlagsVersion! */
186 #define CRT2_DEFAULT 0x00000001
187 #define CRT2_LCD 0x00000002 /* TW: Never change the order of the CRT2_XXX entries */
188 #define CRT2_TV 0x00000004 /* (see SISCycleCRT2Type()) */
189 #define CRT2_VGA 0x00000008
190 #define TV_NTSC 0x00000010
191 #define TV_PAL 0x00000020
192 #define TV_HIVISION 0x00000040
193 #define TV_YPBPR 0x00000080
194 #define TV_AVIDEO 0x00000100
195 #define TV_SVIDEO 0x00000200
196 #define TV_SCART 0x00000400
197 #define VB_CONEXANT 0x00000800
198 #define TV_PALM 0x00001000
199 #define TV_PALN 0x00002000
200 #define TV_NTSCJ 0x00001000
201 #define VB_302ELV 0x00004000
202 #define TV_CHSCART 0x00008000
203 #define TV_CHYPBPR525I 0x00010000
204 #define CRT1_VGA 0x00000000
205 #define CRT1_LCDA 0x00020000
206 #define VGA2_CONNECTED 0x00040000
207 #define DISPTYPE_CRT1 0x00080000 /* CRT1 connected and used */
208 #define VB_301 0x00100000 /* Video bridge type */
209 #define VB_301B 0x00200000
210 #define VB_302B 0x00400000
211 #define VB_30xBDH 0x00800000 /* 30xB DH version (w/o LCD support) */
212 #define VB_LVDS 0x01000000
213 #define VB_CHRONTEL 0x02000000
214 #define VB_301LV 0x04000000
215 #define VB_302LV 0x08000000
216 #define VB_301C 0x10000000
217 #define SINGLE_MODE 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */
218 #define MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */
219 #define DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */
222 #define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA)
223 #define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ)
224 #define TV_INTERFACE (TV_AVIDEO|TV_SVIDEO|TV_SCART|TV_HIVISION|TV_YPBPR)
226 /* Only if TV_YPBPR is set: */
227 #define TV_YPBPR525I TV_NTSC
228 #define TV_YPBPR525P TV_PAL
229 #define TV_YPBPR750P TV_PALM
230 #define TV_YPBPR1080I TV_PALN
231 #define TV_YPBPRALL (TV_YPBPR525I | TV_YPBPR525P | TV_YPBPR750P | TV_YPBPR1080I)
233 #define TV_YPBPR43LB TV_CHSCART
234 #define TV_YPBPR43 TV_CHYPBPR525I
235 #define TV_YPBPR169 (TV_CHSCART | TV_CHYPBPR525I)
236 #define TV_YPBPRAR (TV_CHSCART | TV_CHYPBPR525I)
238 #define VB_SISBRIDGE (VB_301|VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV|VB_302ELV)
239 #define VB_SISTVBRIDGE (VB_301|VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV)
240 #define VB_VIDEOBRIDGE (VB_SISBRIDGE | VB_LVDS | VB_CHRONTEL | VB_CONEXANT)
242 #define DISPTYPE_DISP2 CRT2_ENABLE
243 #define DISPTYPE_DISP1 DISPTYPE_CRT1
244 #define VB_DISPMODE_SINGLE SINGLE_MODE /* alias */
245 #define VB_DISPMODE_MIRROR MIRROR_MODE /* alias */
246 #define VB_DISPMODE_DUAL DUALVIEW_MODE /* alias */
247 #define DISPLAY_MODE (SINGLE_MODE | MIRROR_MODE | DUALVIEW_MODE)
249 /* pSiS->VBLCDFlags */
250 #define VB_LCD_320x480 0x00000001 /* DSTN/FSTN for 550 */
251 #define VB_LCD_640x480 0x00000002
252 #define VB_LCD_800x600 0x00000004
253 #define VB_LCD_1024x768 0x00000008
254 #define VB_LCD_1280x1024 0x00000010
255 #define VB_LCD_1280x960 0x00000020
256 #define VB_LCD_1600x1200 0x00000040
257 #define VB_LCD_2048x1536 0x00000080
258 #define VB_LCD_1400x1050 0x00000100
259 #define VB_LCD_1152x864 0x00000200
260 #define VB_LCD_1152x768 0x00000400
261 #define VB_LCD_1280x768 0x00000800
262 #define VB_LCD_1024x600 0x00001000
263 #define VB_LCD_640x480_2 0x00002000 /* DSTN/FSTN */
264 #define VB_LCD_640x480_3 0x00004000 /* DSTN/FSTN */
265 #define VB_LCD_848x480 0x00008000 /* LVDS only, otherwise handled as custom */
266 #define VB_LCD_1280x800 0x00010000
267 #define VB_LCD_1680x1050 0x00020000
268 #define VB_LCD_BARCO1366 0x20000000
269 #define VB_LCD_CUSTOM 0x40000000
270 #define VB_LCD_EXPANDING 0x80000000
272 /* PresetMode argument */
273 #define SIS_MODE_SIMU 0
274 #define SIS_MODE_CRT1 1
275 #define SIS_MODE_CRT2 2
277 /* pSiS->MiscFlags */
278 #define MISC_CRT1OVERLAY 0x00000001 /* Current display mode supports overlay */
279 #define MISC_PANELLINKSCALER 0x00000002 /* Panel link is currently scaling */
280 #define MISC_CRT1OVERLAYGAMMA 0x00000004 /* Current display mode supports overlay gamma corr on CRT1 */
281 #define MISC_TVNTSC1024 0x00000008 /* Current display mode is TV NTSC/PALM/YPBPR525I 1024x768 */
284 #define SIS6326_HASTV 0x00000001
285 #define SIS6326_TVSVIDEO 0x00000002
286 #define SIS6326_TVCVBS 0x00000004
287 #define SIS6326_TVPAL 0x00000008
288 #define SIS6326_TVDETECTED 0x00000010
289 #define SIS6326_TVON 0x80000000
291 #define HW_DEVICE_EXTENSION SIS_HW_INFO
299 #define BITMASK(h,l) (((unsigned)(1U << ((h)-(l)+1))-1)<<(l))
300 #define GENMASK(mask) BITMASK(1?mask,0?mask)
302 typedef unsigned long ULong
;
303 typedef unsigned short UShort
;
304 typedef unsigned char UChar
;
306 /* VGA engine types */
307 #define UNKNOWN_VGA 0
308 #define SIS_530_VGA 1
309 #define SIS_OLD_VGA 2
310 #define SIS_300_VGA 3
311 #define SIS_315_VGA 4 /* Includes 330/660/661/741/760 and M versions thereof */
315 #define OC_SIS86201 1
316 #define OC_SIS86202 2
317 #define OC_SIS6205A 3
318 #define OC_SIS6205B 4
319 #define OC_SIS82204 5
320 #define OC_SIS6205C 6
324 #define OC_SIS530A 11
325 #define OC_SIS530B 12
329 #define CHRONTEL_700x 0
330 #define CHRONTEL_701x 1
333 /* Use only lower 16 bit for chip id! (sisctrl) */
334 #define SiSCF_LARGEOVERLAY 0x00000001
335 #define SiSCF_Is651 0x00000002
336 #define SiSCF_IsM650 0x00000004
337 #define SiSCF_IsM652 0x00000008
338 #define SiSCF_IsM653 0x00000010
339 #define SiSCF_Is652 0x00000020
340 #define SiSCF_Is65x (SiSCF_Is651|SiSCF_IsM650|SiSCF_IsM652|SiSCF_IsM653|SiSCF_Is652)
341 #define SiSCF_IsM661 0x00000100 /* M661FX */
342 #define SiSCF_IsM741 0x00000200
343 #define SiSCF_IsM760 0x00000400
344 #define SiSCF_IsM661M 0x00000800 /* M661MX */
345 #define SiSCF_IsM66x (SiSCF_IsM661 | SiSCF_IsM741 | SiSCF_IsM760 | SiSCF_IsM661M)
346 #define SiSCF_315Core 0x00010000 /* 3D: Real 315 */
347 #define SiSCF_Real256ECore 0x00020000 /* 3D: Similar to 315 core, no T&L? (65x, 661, 740, 741) */
348 #define SiSCF_XabreCore 0x00040000 /* 3D: Real Xabre */
349 #define SiSCF_Ultra256Core 0x00080000 /* 3D: Similar to Xabre, no T&L?, no P:Shader? (660, 760) */
350 #define SiSCF_UseLCDA 0x01000000
351 #define SiSCF_760UMA 0x10000000 /* 760: UMA active */
352 #define SiSCF_CRT2HWCKaputt 0x20000000 /* CRT2 Mono HWCursor engine buggy (SiS 330) */
353 #define SiSCF_Glamour3 0x40000000
354 #define SiSCF_Integrated 0x80000000
356 /* SiS Direct Xv-API */
357 #define SiS_SD_IS300SERIES 0x00000001
358 #define SiS_SD_IS315SERIES 0x00000002
359 #define SiS_SD_IS330SERIES 0x00000004
360 #define SiS_SD_SUPPORTPALMN 0x00000008 /* tv chip supports pal-m, pal-n */
361 #define SiS_SD_SUPPORT2OVL 0x00000010 /* set = 2 overlays, clear = support SWITCHCRT xv prop */
362 #define SiS_SD_SUPPORTTVPOS 0x00000020 /* supports changing tv position */
363 #define SiS_SD_ISDUALHEAD 0x00000040 /* Driver is in dual head mode */
364 #define SiS_SD_ISMERGEDFB 0x00000080 /* Driver is in merged fb mode */
365 #define SiS_SD_ISDHSECONDHEAD 0x00000100 /* Dual head: This is CRT1 (=second head) */
366 #define SiS_SD_ISDHXINERAMA 0x00000200 /* Dual head: We are running Xinerama */
367 #define SiS_SD_VBHASSCART 0x00000400 /* videobridge has SCART instead of VGA2 */
368 #define SiS_SD_ISDEPTH8 0x00000800 /* Depth is 8, no independent gamma correction */
369 #define SiS_SD_SUPPORTSOVER 0x00001000 /* Support for Chrontel Super Overscan */
370 #define SiS_SD_ENABLED 0x00002000 /* sisctrl is enabled (by option) */
371 #define SiS_SD_PSEUDOXINERAMA 0x00004000 /* pseudo xinerama is active */
372 #define SiS_SD_SUPPORTLCDA 0x00008000 /* Support LCD Channel A */
373 #define SiS_SD_SUPPORTNTSCJ 0x00010000 /* tv chip supports ntsc-j */
374 #define SiS_SD_ADDLSUPFLAG 0x00020000 /* 1 = the following flags are valid */
375 #define SiS_SD_SUPPORTVGA2 0x00040000 /* CRT2=VGA supported */
376 #define SiS_SD_SUPPORTSCART 0x00080000 /* CRT2=SCART supported */
377 #define SiS_SD_SUPPORTOVERSCAN 0x00100000 /* Overscan flag supported */
378 #define SiS_SD_SUPPORTXVGAMMA1 0x00200000 /* Xv Gamma correction for CRT1 supported */
379 #define SiS_SD_SUPPORTTV 0x00400000 /* CRT2=TV supported */
380 #define SiS_SD_SUPPORTYPBPR 0x00800000 /* CRT2=YPbPr (525i, 525p, 750p, 1080i) is supported */
381 #define SiS_SD_SUPPORTHIVISION 0x01000000 /* CRT2=HiVision is supported */
382 #define SiS_SD_SUPPORTYPBPRAR 0x02000000 /* YPbPr aspect ratio is supported */
384 #define SIS_DIRECTKEY 0x03145792
386 /* SiSCtrl: Check mode for CRT2 */
387 #define SiS_CF2_LCD 0x01
388 #define SiS_CF2_TV 0x02
389 #define SiS_CF2_VGA2 0x04
390 #define SiS_CF2_TVPAL 0x08
391 #define SiS_CF2_TVNTSC 0x10 /* + NTSC-J */
392 #define SiS_CF2_TVPALM 0x20
393 #define SiS_CF2_TVPALN 0x40
394 #define SiS_CF2_CRT1LCDA 0x80
395 #define SiS_CF2_TYPEMASK (SiS_CF2_LCD | SiS_CF2_TV | SiS_CF2_VGA2 | SiS_CF2_CRT1LCDA)
396 #define SiS_CF2_TVSPECIAL (SiS_CF2_LCD | SiS_CF2_TV)
397 #define SiS_CF2_TVSPECMASK (SiS_CF2_TVPAL | SiS_CF2_TVNTSC | SiS_CF2_TVPALM | SiS_CF2_TVPALN)
398 #define SiS_CF2_TVHIVISION SiS_CF2_TVPAL
399 #define SiS_CF2_TVYPBPR525I SiS_CF2_TVNTSC
400 #define SiS_CF2_TVYPBPR525P (SiS_CF2_TVPAL | SiS_CF2_TVNTSC)
401 #define SiS_CF2_TVYPBPR750P SiS_CF2_TVPALM
402 #define SiS_CF2_TVYPBPR1080I (SiS_CF2_TVPALM | SiS_CF2_TVPAL)
404 /* AGP stuff for DRI */
405 #define AGP_PAGE_SIZE 4096
406 #define AGP_PAGES 2048 /* Default: 2048 pages @ 4096 = 8MB */
408 #define AGP_CMDBUF_PAGES 256
409 #define AGP_CMDBUF_SIZE (AGP_PAGE_SIZE * AGP_CMDBUF_PAGES)
411 #define AGP_VTXBUF_PAGES 512
412 #define AGP_VTXBUF_SIZE (AGP_PAGE_SIZE * AGP_VTXBUF_PAGES)
414 /* For backup of register contents */
416 unsigned char sisRegs3C4
[0x50];
417 unsigned char sisRegs3D4
[0x90];
418 unsigned char sisRegs3C2
;
419 unsigned char sisCapt
[0x60];
420 unsigned char sisVid
[0x50];
421 unsigned char VBPart1
[0x50];
422 unsigned char VBPart2
[0x100];
423 unsigned char VBPart3
[0x50];
424 unsigned char VBPart4
[0x50];
425 unsigned short ch70xx
[64];
426 unsigned long sisMMIO85C0
;
427 unsigned char sis6326tv
[0x46];
428 unsigned long sisRegsPCI50
, sisRegsPCIA0
;
429 } SISRegRec
, *SISRegPtr
;
431 typedef struct _sisModeInfoPtr
{
436 struct _sisModeInfoPtr
*next
;
437 } sisModeInfoRec
, *sisModeInfoPtr
;
439 /* SISFBLayout is mainly there because of DGA. It holds the
440 * current layout parameters needed for acceleration and other
441 * stuff. When switching mode using DGA, these are set up
442 * accordingly and not necessarily match pScrn's. Therefore,
443 * driver modules should read these values instead of pScrn's.
446 int bitsPerPixel
; /* = pScrn->bitsPerPixel */
447 int depth
; /* = pScrn->depth */
448 int displayWidth
; /* = pScrn->displayWidth */
449 DisplayModePtr mode
; /* = pScrn->currentMode */
452 /* Dual head private entity structure */
457 unsigned char * BIOS
;
458 SiS_Private
* SiS_Pr
;
459 unsigned long agpHandle
;
460 unsigned long agpAddr
;
461 unsigned char *agpBase
;
462 unsigned int agpSize
;
463 unsigned int agpWantedSize
;
464 unsigned int agpWantedPages
;
465 unsigned long agpCmdBufAddr
; /* 300 series */
466 unsigned char *agpCmdBufBase
;
467 unsigned int agpCmdBufSize
;
468 unsigned int agpCmdBufFree
;
469 unsigned long agpVtxBufAddr
; /* 315 series */
470 unsigned char *agpVtxBufBase
;
471 unsigned int agpVtxBufSize
;
472 unsigned int agpVtxBufFree
;
478 int CRT1ModeNo
; /* Current display mode for CRT1 */
479 DisplayModePtr CRT1DMode
; /* Current display mode for CRT1 */
480 int CRT2ModeNo
; /* Current display mode for CRT2 */
481 DisplayModePtr CRT2DMode
; /* Current display mode for CRT2 */
482 Bool CRT2ModeSet
; /* CRT2 mode has been set */
484 unsigned char CRT2CR30
, CRT2CR31
, CRT2CR35
, CRT2CR38
;
486 int lastInstance
; /* number of entities */
487 Bool DisableDual
; /* Emergency flag */
488 Bool ErrorAfterFirst
; /* Emergency flag: Error after first init -> Abort second */
489 Bool HWCursor
; /* Backup master settings for use on slave */
502 int maxUsedClock
; /* Max used pixelclock on master head */
503 unsigned long masterFbAddress
; /* Framebuffer addresses and sizes */
504 unsigned long masterFbSize
;
505 unsigned long slaveFbAddress
;
506 unsigned long slaveFbSize
;
507 unsigned char * FbBase
; /* VRAM linear address */
508 unsigned char * IOBase
; /* MMIO linear address */
509 unsigned short MapCountIOBase
; /* map/unmap queue counter */
510 unsigned short MapCountFbBase
; /* map/unmap queue counter */
511 Bool forceUnmapIOBase
; /* ignore counter and unmap */
512 Bool forceUnmapFbBase
; /* ignore counter and unmap */
514 unsigned char * IOBaseDense
; /* MMIO for Alpha platform */
515 unsigned short MapCountIOBaseDense
;
516 Bool forceUnmapIOBaseDense
; /* ignore counter and unmap */
518 int chtvlumabandwidthcvbs
; /* TV settings for Chrontel TV encoder */
519 int chtvlumabandwidthsvideo
;
520 int chtvlumaflickerfilter
;
521 int chtvchromabandwidth
;
522 int chtvchromaflickerfilter
;
526 int sistvedgeenhance
; /* TV settings for SiS bridge */
527 int sistvantiflicker
;
534 int tvxscale
, tvyscale
;
536 unsigned long ForceYPbPrType
, ForceYPbPrAR
;
538 int NonDefaultPAL
, NonDefaultNTSC
;
539 unsigned short tvx
, tvy
;
540 unsigned char p2_01
, p2_02
, p2_1f
, p2_20
;
541 unsigned char p2_44
, p2_45
, p2_46
;
542 unsigned long sistvccbase
;
543 unsigned char p2_35
, p2_36
, p2_37
, p2_38
, p2_48
, p2_49
, p2_4a
;
544 unsigned char p2_0a
, p2_2f
, p2_30
, p2_47
;
545 unsigned char scalingp1
[9], scalingp4
[9], scalingp2
[64];
546 unsigned short cursorBufferNum
;
547 BOOLEAN restorebyset
;
548 BOOLEAN CRT1gamma
, CRT1gammaGiven
, CRT2gamma
, XvGamma
, XvGammaGiven
;
549 int XvGammaRed
, XvGammaGreen
, XvGammaBlue
;
550 int GammaBriR
, GammaBriG
, GammaBriB
; /* strictly for Xinerama */
551 int GammaPBriR
, GammaPBriG
, GammaPBriB
; /* strictly for Xinerama */
555 BOOLEAN enablesisctrl
;
556 unsigned long cmdQ_SharedWritePort_2D
;
557 unsigned char *RenderAccelArray
;
558 unsigned char * FbBase1
;
559 unsigned long OnScreenSize1
;
560 unsigned char OldMode
;
561 int HWCursorMBufNum
, HWCursorCBufNum
;
565 } SISEntRec
, *SISEntPtr
;
568 #define SISPTR(p) ((SISPtr)((p)->driverPrivate))
569 #define XAAPTR(p) ((XAAInfoRecPtr)(SISPTR(p)->AccelInfoPtr))
571 /* Relative merge position */
581 ScrnInfoPtr pScrn
; /* -------------- DON'T INSERT ANYTHING HERE --------------- */
582 pciVideoPtr PciInfo
; /* -------- OTHERWISE sis_dri.so MUST BE RECOMPILED -------- */
587 int VGAEngine
; /* see above */
588 int hasTwoOverlays
; /* Chipset supports two video overlays? */
589 HW_DEVICE_EXTENSION sishw_ext
; /* For new mode switching code */
590 SiS_Private
* SiS_Pr
; /* For new mode switching code */
591 int DSTN
; /* For 550 FSTN/DSTN; set by option, no detection */
592 unsigned long FbAddress
; /* VRAM physical address (in DHM: for each Fb!) */
593 unsigned long realFbAddress
; /* For DHM/PCI mem mapping: store global FBAddress */
594 unsigned char * FbBase
; /* VRAM virtual linear address */
595 CARD32 IOAddress
; /* MMIO physical address */
596 unsigned char * IOBase
; /* MMIO linear address */
597 IOADDRESS IODBase
; /* Base of PIO memory area */
599 unsigned char * IOBaseDense
; /* MMIO for Alpha platform */
601 SISIOADDRESS RelIO
; /* Relocated IO Ports baseaddress */
602 unsigned char * BIOS
;
607 int Flags
; /* HW config flags */
608 long FbMapSize
; /* Used for Mem Mapping - DON'T CHANGE THIS */
609 long availMem
; /* Really available Fb mem (minus TQ, HWCursor) */
610 unsigned long maxxfbmem
; /* limit fb memory X is to use to this (KB) */
611 unsigned long sisfbMem
; /* heapstart of sisfb (if running) */
613 unsigned long dhmOffset
; /* Offset to memory for each head (0 or ..) */
618 int DGAViewportStatus
;
619 unsigned char OldMode
; /* Back old modeNo (if available) */
622 Bool XvOnCRT2
; /* see sis_opt.c */
634 Bool FastVram
; /* now unused */
637 unsigned char oldCR17
, oldCR63
, oldSR1F
;
638 unsigned char oldCR32
, oldCR36
, oldCR37
;
639 unsigned char myCR32
, myCR36
, myCR37
, myCR63
;
640 unsigned char newCR32
;
641 unsigned long VBFlags
; /* Video bridge configuration */
642 unsigned long VBFlags_backup
; /* Backup for SlaveMode-modes */
643 unsigned long VBLCDFlags
; /* Moved LCD panel size bits here */
644 int ChrontelType
; /* CHRONTEL_700x or CHRONTEL_701x */
645 int PDC
; /* PanelDelayCompensation */
646 short scrnOffset
; /* Screen pitch (data) */
647 short scrnPitch
; /* Screen pitch (display; regarding interlace) */
649 int xcurrent
; /* for temp use in accel */
650 int ycurrent
; /* for temp use in accel */
651 long SiS310_AccelDepth
; /* used in accel for 315 series */
652 int Xdirection
; /* for temp use in accel */
653 int Ydirection
; /* for temp use in accel */
654 int sisPatternReg
[4];
660 CARD16 CursorSize
; /* Size of HWCursor area (bytes) */
661 CARD32 cursorOffset
; /* see sis_driver.c and sis_cursor.c */
664 unsigned char * XAAScanlineColorExpandBuffers
[2];
668 Bool ColorExpandBusy
;
672 xf86CursorInfoPtr CursorInfoPtr
;
673 XAAInfoRecPtr AccelInfoPtr
;
674 CloseScreenProcPtr CloseScreen
;
675 Bool (*ModeInit
)(ScrnInfoPtr pScrn
, DisplayModePtr mode
);
676 void (*SiSSave
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
677 void (*SiSSave2
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
678 void (*SiSSave3
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
679 void (*SiSSaveLVDSChrontel
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
680 void (*SiSRestore
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
681 void (*SiSRestore2
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
682 void (*SiSRestore3
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
683 void (*SiSRestoreLVDSChrontel
)(ScrnInfoPtr pScrn
, SISRegPtr sisreg
);
684 void (*LoadCRT2Palette
)(ScrnInfoPtr pScrn
, int numColors
,
685 int *indicies
, LOCO
*colors
, VisualPtr pVisual
);
687 int cmdQueueLen
; /* Current cmdQueueLength (for 2D and 3D) */
688 unsigned long cmdQueueLenMax
;
689 unsigned long cmdQueueLenMin
;
690 unsigned long *cmdQueueBase
;
691 int *cmdQueueLenPtr
; /* Ptr to variable holding the current queue length */
692 int *cmdQueueLenPtrBackup
; /* Backup for DRI init/restore */
693 unsigned int cmdQueueOffset
;
694 unsigned int cmdQueueSize
;
695 unsigned long cmdQueueSizeMask
;
696 unsigned long cmdQ_SharedWritePort_2D
;
697 unsigned long *cmdQ_SharedWritePort
;
698 unsigned long *cmdQ_SharedWritePortBackup
;
699 unsigned int cmdQueueSize_div2
;
700 unsigned int cmdQueueSize_div4
;
701 unsigned int cmdQueueSize_4_3
;
702 unsigned long agpHandle
;
703 unsigned long agpAddr
;
704 unsigned char *agpBase
;
705 unsigned int agpSize
;
706 unsigned int agpWantedSize
;
707 unsigned int agpWantedPages
;
708 unsigned long agpCmdBufAddr
; /* 300 series */
709 unsigned char *agpCmdBufBase
;
710 unsigned int agpCmdBufSize
;
711 unsigned int agpCmdBufFree
;
712 unsigned long agpVtxBufAddr
; /* 315 series */
713 unsigned char *agpVtxBufBase
;
714 unsigned int agpVtxBufSize
;
715 unsigned int agpVtxBufFree
;
723 unsigned long DRIheapstart
, DRIheapend
;
725 void (*RenderCallback
)(ScrnInfoPtr
);
727 unsigned char *RenderAccelArray
;
730 int ColorExpandRingHead
;
731 int ColorExpandRingTail
;
732 int PerColorExpandBufferSize
;
733 int ColorExpandBufferNumber
;
734 int ColorExpandBufferCountMask
;
735 unsigned char *ColorExpandBufferAddr
[32];
736 int ColorExpandBufferScreenOffset
[32];
737 long ColorExpandBase
;
738 int ImageWriteBufferSize
;
739 unsigned char *ImageWriteBufferAddr
;
742 void (*PointerMoved
)(int index
, int x
, int y
);
744 /* ShadowFB support */
746 unsigned char *ShadowPtr
;
752 Bool directRenderingEnabled
;
755 int numVisualConfigs
;
756 __GLXvisualConfig
* pVisualConfigs
;
757 SISConfigPrivPtr pVisualConfigsPriv
;
758 SISRegRec DRContextRegs
;
761 XF86VideoAdaptorPtr adaptor
;
762 ScreenBlockHandlerProcPtr BlockHandler
;
763 void (*VideoTimerCallback
)(ScrnInfoPtr
, Time
);
764 void (*ResetXv
)(ScrnInfoPtr
);
765 void (*ResetXvGamma
)(ScrnInfoPtr
);
767 OptionInfoPtr Options
;
770 Bool BlankCRT1
, BlankCRT2
;
773 unsigned char BIOSModeSave
;
774 int CRT1off
; /* 1=CRT1 off, 0=CRT1 on */
775 CARD16 LCDheight
; /* Vertical resolution of LCD panel */
776 CARD16 LCDwidth
; /* Horizontal resolution of LCD panel */
777 vbeInfoPtr pVbe
; /* For VESA mode switching */
780 VbeInfoBlock
*vbeInfo
;
782 sisModeInfoPtr SISVESAModeList
;
784 CARD16 maxBytesPerScanline
;
785 CARD32
*pal
, *savedPal
;
786 int mapPhys
, mapOff
, mapSize
;
787 int statePage
, stateSize
, stateMode
;
789 CARD8
*state
, *pstate
;
790 void *base
, *VGAbase
;
792 BOOL DualHeadMode
; /* TRUE if we use dual head mode */
793 BOOL SecondHead
; /* TRUE is this is the second head */
794 SISEntPtr entityPrivate
; /* Ptr to private entity (see above) */
795 BOOL SiSXinerama
; /* Do we use Xinerama mode? */
797 SISFBLayout CurrentLayout
; /* Current framebuffer layout */
798 USHORT SiS_DDC2_Index
;
799 USHORT SiS_DDC2_Data
;
801 BOOL Primary
; /* Display adapter is primary */
802 xf86Int10InfoPtr pInt
; /* Our int10 */
803 int oldChipset
; /* Type of old chipset */
804 int RealVideoRam
; /* 6326 can only address 4MB, but TQ can be above */
805 CARD32 CmdQueLenMask
; /* Mask of queue length in MMIO register */
806 CARD32 CmdQueLenFix
; /* Fix value to subtract from QueLen (530/620) */
807 CARD32 CmdQueMaxLen
; /* (6326/5597/5598) Amount of cmds the queue can hold */
808 CARD32 TurboQueueLen
; /* For future use */
809 CARD32 detectedCRT2Devices
; /* detected CRT2 devices before mask-out */
810 Bool NoHostBus
; /* Enable/disable 5597/5598 host bus */
811 Bool noInternalModes
; /* Use our own default modes? */
812 int OptUseOEM
; /* Use internal OEM data? */
813 int chtvlumabandwidthcvbs
; /* TV settings for Chrontel TV encoder */
814 int chtvlumabandwidthsvideo
;
815 int chtvlumaflickerfilter
;
816 int chtvchromabandwidth
;
817 int chtvchromaflickerfilter
;
821 int sistvedgeenhance
; /* TV settings for SiS bridges */
822 int sistvantiflicker
;
828 int OptTVSOver
; /* Chrontel 7005: Superoverscan */
830 int tvxscale
, tvyscale
;
831 int SiS6326Flags
; /* SiS6326 TV settings */
832 int sis6326enableyfilter
;
833 int sis6326yfilterstrong
;
835 int sis6326fscadjust
;
837 BOOL donttrustpdc
; /* Don't trust the detected PDC */
838 unsigned char sisfbpdc
;
839 unsigned char sisfblcda
;
841 unsigned long sisfbspecialtiming
;
842 BOOL sisfb_haveemi
, sisfb_haveemilcd
;
843 unsigned char sisfb_emi30
,sisfb_emi31
,sisfb_emi32
,sisfb_emi33
;
845 int NoYV12
; /* Disable Xv YV12 support (old series) */
846 unsigned char postVBCR32
;
847 int newFastVram
; /* Replaces FastVram */
849 int NonDefaultPAL
, NonDefaultNTSC
;
850 unsigned long ForceYPbPrType
, ForceYPbPrAR
;
851 unsigned long lockcalls
; /* Count unlock calls for debug */
852 unsigned short tvx
, tvy
; /* Backup TV position registers */
853 unsigned char p2_01
, p2_02
, p2_1f
, p2_20
; /* Backup TV position registers */
854 unsigned short tvx1
, tvx2
, tvx3
, tvy1
; /* Backup TV position registers */
855 unsigned char p2_44
, p2_45
, p2_46
;
856 unsigned long sistvccbase
;
857 unsigned char p2_35
, p2_36
, p2_37
, p2_38
, p2_48
, p2_49
, p2_4a
;
858 unsigned char p2_0a
, p2_2f
, p2_30
, p2_47
;
859 unsigned char scalingp1
[9], scalingp4
[9], scalingp2
[64];
860 BOOLEAN ForceCursorOff
;
861 BOOLEAN HaveCustomModes
;
863 DisplayModePtr backupmodelist
;
865 Atom xvBrightness
, xvContrast
, xvColorKey
, xvHue
, xvSaturation
;
866 Atom xvAutopaintColorKey
, xvSetDefaults
, xvSwitchCRT
;
867 Atom xvDisableGfx
, xvDisableGfxLR
, xvTVXPosition
, xvTVYPosition
;
868 Atom xvDisableColorkey
, xvUseChromakey
, xvChromaMin
, xvChromaMax
;
869 Atom xvInsideChromakey
, xvYUVChromakey
;
870 Atom xvGammaRed
, xvGammaGreen
, xvGammaBlue
;
871 Atom xv_QVF
, xv_QVV
, xv_USD
, xv_SVF
, xv_QDD
, xv_TAF
, xv_TSA
, xv_TEE
, xv_GSF
;
872 Atom xv_TTE
, xv_TCO
, xv_TCC
, xv_TCF
, xv_TLF
, xv_CMD
, xv_CMDR
, xv_CT1
, xv_SGA
;
873 Atom xv_GDV
, xv_GHI
, xv_OVR
, xv_GBI
, xv_TXS
, xv_TYS
, xv_CFI
, xv_COC
, xv_COF
;
874 Atom xv_YFI
, xv_GSS
, xv_BRR
, xv_BRG
, xv_BRB
, xv_PBR
, xv_PBG
, xv_PBB
, xv_SHC
;
875 Atom xv_BRR2
, xv_BRG2
, xv_BRB2
, xv_PBR2
, xv_PBG2
, xv_PBB2
;
879 int xv_sisdirectunlocked
;
880 unsigned long xv_sd_result
;
885 unsigned long ChipFlags
;
886 unsigned long SiS_SD_Flags
;
887 BOOLEAN UseHWARGBCursor
;
888 int OptUseColorCursor
;
889 int OptUseColorCursorBlend
;
890 CARD32 OptColorCursorBlendThreshold
;
891 unsigned short cursorBufferNum
;
893 BOOLEAN restorebyset
;
894 BOOLEAN nocrt2ddcdetection
;
895 BOOLEAN forcecrt2redetection
;
896 BOOLEAN CRT1gamma
, CRT1gammaGiven
, CRT2gamma
, XvGamma
, XvGammaGiven
;
897 int XvDefCon
, XvDefBri
, XvDefHue
, XvDefSat
;
898 BOOLEAN XvDefDisableGfx
, XvDefDisableGfxLR
;
900 BOOLEAN XvUseChromaKey
, XvDisableColorKey
;
901 BOOLEAN XvInsideChromaKey
, XvYUVChromaKey
;
902 int XvChromaMin
, XvChromaMax
;
903 int XvGammaRed
, XvGammaGreen
, XvGammaBlue
;
904 int XvGammaRedDef
, XvGammaGreenDef
, XvGammaBlueDef
;
905 CARD8 XvGammaRampRed
[256], XvGammaRampGreen
[256], XvGammaRampBlue
[256];
906 BOOLEAN disablecolorkeycurrent
;
910 FBLinearPtr AccelLinearScratch
;
911 void (*AccelRenderCallback
)(ScrnInfoPtr
);
913 unsigned long bClrColor
, dwColor
;
915 BOOLEAN enablesisctrl
;
916 short Video_MaxWidth
, Video_MaxHeight
;
918 BOOLEAN AddedPlasmaModes
;
920 CARD32 CurFGCol
, CurBGCol
;
921 unsigned char * CurMonoSrc
;
922 CARD32
* CurARGBDest
;
923 int GammaBriR
, GammaBriG
, GammaBriB
;
924 int GammaPBriR
, GammaPBriG
, GammaPBriB
;
925 Bool HideHWCursor
; /* Custom application */
926 Bool HWCursorIsVisible
;
927 unsigned long HWCursorBackup
[16];
928 int HWCursorMBufNum
, HWCursorCBufNum
;
930 Bool MergedFB
, MergedFBAuto
;
931 SiSScrn2Rel CRT2Position
;
935 ScrnInfoPtr CRT2pScrn
;
936 DisplayModePtr CRT1Modes
;
937 DisplayModePtr CRT1CurrentMode
;
944 BOOLEAN HaveCustomModes2
;
945 int maxCRT1_X1
, maxCRT1_X2
, maxCRT1_Y1
, maxCRT1_Y2
;
946 int maxCRT2_X1
, maxCRT2_X2
, maxCRT2_Y1
, maxCRT2_Y2
;
947 int maxClone_X1
, maxClone_X2
, maxClone_Y1
, maxClone_Y2
;
948 int MergedFBXDPI
, MergedFBYDPI
;
952 ExtensionEntry
*XineramaExtEntry
;
953 int SiSXineramaVX
, SiSXineramaVY
;
954 Bool AtLeastOneNonClone
;
959 typedef struct _ModeInfoData
{
961 VbeModeInfoBlock
*data
;
962 VbeCRTCInfoBlock
*block
;
965 #define SDMPTR(x) ((SiSMergedDisplayModePtr)(x->currentMode->Private))
966 #define CDMPTR ((SiSMergedDisplayModePtr)(pSiS->CurrentLayout.mode->Private))
968 #define BOUND(test,low,hi) { \
969 if(test < low) test = low; \
970 if(test > hi) test = hi; }
972 #define REBOUND(low,hi,test) { \
980 typedef struct _MergedDisplayModeRec
{
983 SiSScrn2Rel CRT2Position
;
984 } SiSMergedDisplayModeRec
, *SiSMergedDisplayModePtr
;
987 typedef struct _region
{
991 typedef struct _myhddctiming
{
997 typedef struct _myvddctiming
{
1003 typedef struct _myddcstdmodes
{
1010 typedef struct _pdctable
{
1018 typedef struct _chswtable
{
1025 typedef struct _customttable
{
1026 unsigned short chipID
;
1029 unsigned long bioschksum
;
1030 unsigned short biosFootprintAddr
[5];
1031 unsigned char biosFootprintData
[5];
1032 unsigned short pcisubsysvendor
;
1033 unsigned short pcisubsyscard
;
1036 unsigned long SpecialID
;
1042 typedef struct _SiSXineramaData
{
1052 /* SiS Direct access for config utility */
1054 #define SDC_ID 0x53495321
1056 #define SDC_VERSION 1
1058 #define SDC_NUM_PARM 20
1059 typedef struct _sisdirectcommand
{
1060 unsigned long sdc_id
;
1061 unsigned long sdc_chksum
;
1062 unsigned long sdc_header
;
1063 unsigned long sdc_command
;
1064 unsigned long sdc_parm
[SDC_NUM_PARM
];
1067 #define SDC_RESULT_OK 0x66670000
1068 #define SDC_RESULT_UNDEFCMD 0x66670001
1070 #define SDC_CMD_GETVERSION 0x98980001
1071 #define SDC_CMD_CHECKMODEFORCRT2 0x98980002
1075 extern void sisSaveUnlockExtRegisterLock(SISPtr pSiS
, unsigned char *reg1
, unsigned char *reg2
);
1076 extern void sisRestoreExtRegisterLock(SISPtr pSiS
, unsigned char reg1
, unsigned char reg2
);
1077 extern void SiSOptions(ScrnInfoPtr pScrn
);
1078 extern const OptionInfoRec
* SISAvailableOptions(int chipid
, int busid
);
1079 extern void SiSSetup(ScrnInfoPtr pScrn
);
1080 extern void SISVGAPreInit(ScrnInfoPtr pScrn
);
1081 extern Bool
SiSAccelInit(ScreenPtr pScreen
);
1082 extern Bool
SiS300AccelInit(ScreenPtr pScreen
);
1083 extern Bool
SiS315AccelInit(ScreenPtr pScreen
);
1084 extern Bool
SiS530AccelInit(ScreenPtr pScreen
);
1085 extern Bool
SiSHWCursorInit(ScreenPtr pScreen
);
1086 extern Bool
SISDGAInit(ScreenPtr pScreen
);
1087 extern void SISInitVideo(ScreenPtr pScreen
);
1088 extern void SIS6326InitVideo(ScreenPtr pScreen
);
1090 extern void SiS_SetCHTVlumabandwidthcvbs(ScrnInfoPtr pScrn
, int val
);
1091 extern void SiS_SetCHTVlumabandwidthsvideo(ScrnInfoPtr pScrn
, int val
);
1092 extern void SiS_SetCHTVlumaflickerfilter(ScrnInfoPtr pScrn
, int val
);
1093 extern void SiS_SetCHTVchromabandwidth(ScrnInfoPtr pScrn
, int val
);
1094 extern void SiS_SetCHTVchromaflickerfilter(ScrnInfoPtr pScrn
, int val
);
1095 extern void SiS_SetCHTVcvbscolor(ScrnInfoPtr pScrn
, int val
);
1096 extern void SiS_SetCHTVtextenhance(ScrnInfoPtr pScrn
, int val
);
1097 extern void SiS_SetCHTVcontrast(ScrnInfoPtr pScrn
, int val
);
1098 extern void SiS_SetSISTVedgeenhance(ScrnInfoPtr pScrn
, int val
);
1099 extern void SiS_SetSISTVantiflicker(ScrnInfoPtr pScrn
, int val
);
1100 extern void SiS_SetSISTVsaturation(ScrnInfoPtr pScrn
, int val
);
1101 extern void SiS_SetSISTVcfilter(ScrnInfoPtr pScrn
, int val
);
1102 extern void SiS_SetSISTVyfilter(ScrnInfoPtr pScrn
, int val
);
1103 extern void SiS_SetSISTVcolcalib(ScrnInfoPtr pScrn
, int val
, Bool coarse
);
1104 extern void SiS_SetSIS6326TVantiflicker(ScrnInfoPtr pScrn
, int val
);
1105 extern void SiS_SetSIS6326TVenableyfilter(ScrnInfoPtr pScrn
, int val
);
1106 extern void SiS_SetSIS6326TVyfilterstrong(ScrnInfoPtr pScrn
, int val
);
1107 extern void SiS_SetTVxposoffset(ScrnInfoPtr pScrn
, int val
);
1108 extern void SiS_SetTVyposoffset(ScrnInfoPtr pScrn
, int val
);
1109 extern void SiS_SetTVxscale(ScrnInfoPtr pScrn
, int val
);
1110 extern void SiS_SetTVyscale(ScrnInfoPtr pScrn
, int val
);
1111 extern Bool
SISSwitchCRT2Type(ScrnInfoPtr pScrn
, unsigned long newvbflags
);
1112 extern int SISCheckModeIndexForCRT2Type(ScrnInfoPtr pScrn
, unsigned short cond
,
1113 unsigned short index
, Bool quiet
);
1114 extern Bool
SISSwitchCRT1Status(ScrnInfoPtr pScrn
, int onoff
);
1115 extern int SiS_GetCHTVlumabandwidthcvbs(ScrnInfoPtr pScrn
);
1116 extern int SiS_GetCHTVlumabandwidthsvideo(ScrnInfoPtr pScrn
);
1117 extern int SiS_GetCHTVlumaflickerfilter(ScrnInfoPtr pScrn
);
1118 extern int SiS_GetCHTVchromabandwidth(ScrnInfoPtr pScrn
);
1119 extern int SiS_GetCHTVchromaflickerfilter(ScrnInfoPtr pScrn
);
1120 extern int SiS_GetCHTVcvbscolor(ScrnInfoPtr pScrn
);
1121 extern int SiS_GetCHTVtextenhance(ScrnInfoPtr pScrn
);
1122 extern int SiS_GetCHTVcontrast(ScrnInfoPtr pScrn
);
1123 extern int SiS_GetSISTVedgeenhance(ScrnInfoPtr pScrn
);
1124 extern int SiS_GetSISTVantiflicker(ScrnInfoPtr pScrn
);
1125 extern int SiS_GetSISTVsaturation(ScrnInfoPtr pScrn
);
1126 extern int SiS_GetSISTVcfilter(ScrnInfoPtr pScrn
);
1127 extern int SiS_GetSISTVyfilter(ScrnInfoPtr pScrn
);
1128 extern int SiS_GetSISTVcolcalib(ScrnInfoPtr pScrn
, Bool coarse
);
1129 extern int SiS_GetSIS6326TVantiflicker(ScrnInfoPtr pScrn
);
1130 extern int SiS_GetSIS6326TVenableyfilter(ScrnInfoPtr pScrn
);
1131 extern int SiS_GetSIS6326TVyfilterstrong(ScrnInfoPtr pScrn
);
1132 extern int SiS_GetTVxposoffset(ScrnInfoPtr pScrn
);
1133 extern int SiS_GetTVyposoffset(ScrnInfoPtr pScrn
);
1134 extern int SiS_GetTVxscale(ScrnInfoPtr pScrn
);
1135 extern int SiS_GetTVyscale(ScrnInfoPtr pScrn
);