172b676d7Smrg/*
272b676d7Smrg * General structure definitions for universal mode switching modules
372b676d7Smrg *
472b676d7Smrg * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
572b676d7Smrg *
672b676d7Smrg * If distributed as part of the Linux kernel, the following license terms
772b676d7Smrg * apply:
872b676d7Smrg *
972b676d7Smrg * * This program is free software; you can redistribute it and/or modify
1072b676d7Smrg * * it under the terms of the GNU General Public License as published by
1172b676d7Smrg * * the Free Software Foundation; either version 2 of the named License,
1272b676d7Smrg * * or any later version.
1372b676d7Smrg * *
1472b676d7Smrg * * This program is distributed in the hope that it will be useful,
1572b676d7Smrg * * but WITHOUT ANY WARRANTY; without even the implied warranty of
1672b676d7Smrg * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1772b676d7Smrg * * GNU General Public License for more details.
1872b676d7Smrg * *
1972b676d7Smrg * * You should have received a copy of the GNU General Public License
2072b676d7Smrg * * along with this program; if not, write to the Free Software
2172b676d7Smrg * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
2272b676d7Smrg *
2372b676d7Smrg * Otherwise, the following license terms apply:
2472b676d7Smrg *
2572b676d7Smrg * * Redistribution and use in source and binary forms, with or without
2672b676d7Smrg * * modification, are permitted provided that the following conditions
2772b676d7Smrg * * are met:
2872b676d7Smrg * * 1) Redistributions of source code must retain the above copyright
2972b676d7Smrg * *    notice, this list of conditions and the following disclaimer.
3072b676d7Smrg * * 2) Redistributions in binary form must reproduce the above copyright
3172b676d7Smrg * *    notice, this list of conditions and the following disclaimer in the
3272b676d7Smrg * *    documentation and/or other materials provided with the distribution.
3372b676d7Smrg * * 3) The name of the author may not be used to endorse or promote products
3472b676d7Smrg * *    derived from this software without specific prior written permission.
3572b676d7Smrg * *
3672b676d7Smrg * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
3772b676d7Smrg * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
3872b676d7Smrg * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
3972b676d7Smrg * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
4072b676d7Smrg * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4172b676d7Smrg * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4272b676d7Smrg * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4372b676d7Smrg * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4472b676d7Smrg * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4572b676d7Smrg * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4672b676d7Smrg *
4772b676d7Smrg * Author: 	Thomas Winischhofer <thomas@winischhofer.net>
4872b676d7Smrg *
4972b676d7Smrg */
5072b676d7Smrg
5172b676d7Smrg#ifndef _VSTRUCT_H_
5272b676d7Smrg#define _VSTRUCT_H_
5372b676d7Smrg
5472b676d7Smrgstruct SiS_PanelDelayTbl {
5572b676d7Smrg 	unsigned char timer[2];
5672b676d7Smrg};
5772b676d7Smrg
5872b676d7Smrgstruct SiS_LCDData {
5972b676d7Smrg	unsigned short RVBHCMAX;
6072b676d7Smrg	unsigned short RVBHCFACT;
6172b676d7Smrg	unsigned short VGAHT;
6272b676d7Smrg	unsigned short VGAVT;
6372b676d7Smrg	unsigned short LCDHT;
6472b676d7Smrg	unsigned short LCDVT;
6572b676d7Smrg};
6672b676d7Smrg
6772b676d7Smrgstruct SiS_TVData {
6872b676d7Smrg	unsigned short RVBHCMAX;
6972b676d7Smrg	unsigned short RVBHCFACT;
7072b676d7Smrg	unsigned short VGAHT;
7172b676d7Smrg	unsigned short VGAVT;
7272b676d7Smrg	unsigned short TVHDE;
7372b676d7Smrg	unsigned short TVVDE;
7472b676d7Smrg	unsigned short RVBHRS;
7572b676d7Smrg	unsigned char  FlickerMode;
7672b676d7Smrg	unsigned short HALFRVBHRS;
7772b676d7Smrg	unsigned short RVBHRS2;
7872b676d7Smrg	unsigned char  RY1COE;
7972b676d7Smrg	unsigned char  RY2COE;
8072b676d7Smrg	unsigned char  RY3COE;
8172b676d7Smrg	unsigned char  RY4COE;
8272b676d7Smrg};
8372b676d7Smrg
8472b676d7Smrgstruct SiS_Tap4scalerP2 {
8572b676d7Smrg	unsigned short de;
8672b676d7Smrg	unsigned char  reg[64];
8772b676d7Smrg};
8872b676d7Smrg
8972b676d7Smrgstruct SiS_LVDSData {
9072b676d7Smrg	unsigned short VGAHT;
9172b676d7Smrg	unsigned short VGAVT;
9272b676d7Smrg	unsigned short LCDHT;
9372b676d7Smrg	unsigned short LCDVT;
9472b676d7Smrg};
9572b676d7Smrg
9672b676d7Smrgstruct SiS_LVDSDes {
9772b676d7Smrg	unsigned short LCDHDES;
9872b676d7Smrg	unsigned short LCDVDES;
9972b676d7Smrg};
10072b676d7Smrg
10172b676d7Smrgstruct SiS_LVDSCRT1Data {
10272b676d7Smrg	unsigned char  CR[15];
10372b676d7Smrg};
10472b676d7Smrg
10572b676d7Smrgstruct SiS_CHTVRegData {
10672b676d7Smrg	unsigned char  Reg[16];
10772b676d7Smrg};
10872b676d7Smrg
10972b676d7Smrgstruct SiS_St {
11072b676d7Smrg	unsigned char  St_ModeID;
11172b676d7Smrg	unsigned short St_ModeFlag;
11272b676d7Smrg	unsigned char  St_StTableIndex;
11372b676d7Smrg	unsigned char  St_CRT2CRTC;
11472b676d7Smrg	unsigned char  St_ResInfo;
11572b676d7Smrg	unsigned char  VB_StTVFlickerIndex;
11672b676d7Smrg	unsigned char  VB_StTVEdgeIndex;
11772b676d7Smrg	unsigned char  VB_StTVYFilterIndex;
11872b676d7Smrg	unsigned char  St_PDC;
11972b676d7Smrg};
12072b676d7Smrg
12172b676d7Smrgstruct SiS_VBMode {
12272b676d7Smrg	unsigned char  ModeID;
12372b676d7Smrg	unsigned char  VB_TVDelayIndex;
12472b676d7Smrg	unsigned char  VB_TVFlickerIndex;
12572b676d7Smrg	unsigned char  VB_TVPhaseIndex;
12672b676d7Smrg	unsigned char  VB_TVYFilterIndex;
12772b676d7Smrg	unsigned char  VB_LCDDelayIndex;
12872b676d7Smrg	unsigned char  _VB_LCDHIndex;
12972b676d7Smrg	unsigned char  _VB_LCDVIndex;
13072b676d7Smrg};
13172b676d7Smrg
13272b676d7Smrgstruct SiS_StandTable_S {
13372b676d7Smrg	unsigned char  CRT_COLS;
13472b676d7Smrg	unsigned char  ROWS;
13572b676d7Smrg	unsigned char  CHAR_HEIGHT;
13672b676d7Smrg	unsigned short CRT_LEN;
13772b676d7Smrg	unsigned char  SR[4];
13872b676d7Smrg	unsigned char  MISC;
13972b676d7Smrg	unsigned char  CRTC[0x19];
14072b676d7Smrg	unsigned char  ATTR[0x14];
14172b676d7Smrg	unsigned char  GRC[9];
14272b676d7Smrg};
14372b676d7Smrg
14472b676d7Smrgstruct SiS_Ext {
14572b676d7Smrg	unsigned char  Ext_ModeID;
14672b676d7Smrg	unsigned short Ext_ModeFlag;
14772b676d7Smrg	unsigned short Ext_VESAID;
14872b676d7Smrg	unsigned char  Ext_RESINFO;
14972b676d7Smrg	unsigned char  VB_ExtTVFlickerIndex;
15072b676d7Smrg	unsigned char  VB_ExtTVEdgeIndex;
15172b676d7Smrg	unsigned char  VB_ExtTVYFilterIndex;
15272b676d7Smrg	unsigned char  VB_ExtTVYFilterIndexROM661;
15372b676d7Smrg	unsigned char  REFindex;
15472b676d7Smrg	char           ROMMODEIDX661;
15572b676d7Smrg};
15672b676d7Smrg
15772b676d7Smrgstruct SiS_Ext2 {
15872b676d7Smrg	unsigned short Ext_InfoFlag;
15972b676d7Smrg	unsigned char  Ext_CRT1CRTC;
16072b676d7Smrg	unsigned char  Ext_CRTVCLK;
16172b676d7Smrg	unsigned char  Ext_CRT2CRTC;
16272b676d7Smrg	unsigned char  Ext_CRT2CRTC_NS;
16372b676d7Smrg	unsigned char  ModeID;
16472b676d7Smrg	unsigned short XRes;
16572b676d7Smrg	unsigned short YRes;
16672b676d7Smrg	unsigned char  Ext_PDC;
16772b676d7Smrg	unsigned char  Ext_FakeCRT2CRTC;
16872b676d7Smrg	unsigned char  Ext_FakeCRT2Clk;
16972b676d7Smrg	unsigned char  Ext_CRT1CRTC_NORM;
17072b676d7Smrg	unsigned char  Ext_CRTVCLK_NORM;
17172b676d7Smrg	unsigned char  Ext_CRT1CRTC_WIDE;
17272b676d7Smrg	unsigned char  Ext_CRTVCLK_WIDE;
17372b676d7Smrg};
17472b676d7Smrg
17572b676d7Smrgstruct SiS_Part2PortTbl {
17672b676d7Smrg 	unsigned char  CR[12];
17772b676d7Smrg};
17872b676d7Smrg
17972b676d7Smrgstruct SiS_CRT1Table {
18072b676d7Smrg	unsigned char  CR[17];
18172b676d7Smrg};
18272b676d7Smrg
18372b676d7Smrgstruct SiS_MCLKData {
18472b676d7Smrg	unsigned char  SR28,SR29,SR2A;
18572b676d7Smrg	unsigned short CLOCK;
18672b676d7Smrg};
18772b676d7Smrg
18872b676d7Smrgstruct SiS_VCLKData {
18972b676d7Smrg	unsigned char  SR2B,SR2C;
19072b676d7Smrg	unsigned short CLOCK;
19172b676d7Smrg};
19272b676d7Smrg
19372b676d7Smrgstruct SiS_VBVCLKData {
19472b676d7Smrg	unsigned char  Part4_A,Part4_B;
19572b676d7Smrg	unsigned short CLOCK;
19672b676d7Smrg};
19772b676d7Smrg
19872b676d7Smrgstruct SiS_StResInfo_S {
19972b676d7Smrg	unsigned short HTotal;
20072b676d7Smrg	unsigned short VTotal;
20172b676d7Smrg};
20272b676d7Smrg
20372b676d7Smrgstruct SiS_ModeResInfo_S {
20472b676d7Smrg	unsigned short HTotal;
20572b676d7Smrg	unsigned short VTotal;
20672b676d7Smrg	unsigned char  XChar;
20772b676d7Smrg	unsigned char  YChar;
20872b676d7Smrg};
20972b676d7Smrg
21072b676d7Smrg/* Defines for SiS_CustomT */
21172b676d7Smrg/* Never change these for sisfb compatibility */
21272b676d7Smrg#define CUT_NONE		 0
21372b676d7Smrg#define CUT_FORCENONE		 1
21472b676d7Smrg#define CUT_BARCO1366		 2
21572b676d7Smrg#define CUT_BARCO1024		 3
21672b676d7Smrg#define CUT_COMPAQ1280		 4
21772b676d7Smrg#define CUT_COMPAQ12802		 5
21872b676d7Smrg#define CUT_PANEL848		 6
21972b676d7Smrg#define CUT_CLEVO1024		 7
22072b676d7Smrg#define CUT_CLEVO10242		 8
22172b676d7Smrg#define CUT_CLEVO1400		 9
22272b676d7Smrg#define CUT_CLEVO14002		10
22372b676d7Smrg#define CUT_UNIWILL1024		11
22472b676d7Smrg#define CUT_ASUSL3000D		12
22572b676d7Smrg#define CUT_UNIWILL10242	13
22672b676d7Smrg#define CUT_ACER1280		14
22772b676d7Smrg#define CUT_COMPAL1400_1	15
22872b676d7Smrg#define CUT_COMPAL1400_2	16
22972b676d7Smrg#define CUT_ASUSA2H_1		17
23072b676d7Smrg#define CUT_ASUSA2H_2		18
23172b676d7Smrg#define CUT_UNKNOWNLCD		19
23272b676d7Smrg#define CUT_AOP8060		20
23372b676d7Smrg#define CUT_PANEL856		21
23472b676d7Smrg
23572b676d7Smrgstruct SiS_Private
23672b676d7Smrg{
23772b676d7Smrg	unsigned char			ChipType;
23872b676d7Smrg	unsigned char			ChipRevision;
23972b676d7Smrg#ifdef SIS_XORG_XF86
24021525869Smrg#ifndef XSERVER_LIBPCIACCESS
24172b676d7Smrg	PCITAG				PciTag;
24272b676d7Smrg#endif
24321525869Smrg#endif
24472b676d7Smrg#ifdef SIS_LINUX_KERNEL
24572b676d7Smrg	void				*ivideo;
24672b676d7Smrg#endif
24772b676d7Smrg	unsigned char 			*VirtualRomBase;
24872b676d7Smrg	BOOLEAN				UseROM;
24972b676d7Smrg#ifdef SIS_LINUX_KERNEL
25072b676d7Smrg	unsigned char SISIOMEMTYPE	*VideoMemoryAddress;
25172b676d7Smrg	unsigned int			VideoMemorySize;
25272b676d7Smrg#endif
25372b676d7Smrg	SISIOADDRESS			IOAddress;
25472b676d7Smrg	SISIOADDRESS			IOAddress2;  /* For dual chip XGI volari */
25572b676d7Smrg
25672b676d7Smrg#ifdef SIS_LINUX_KERNEL
25772b676d7Smrg	SISIOADDRESS			RelIO;
25872b676d7Smrg#endif
25972b676d7Smrg	SISIOADDRESS			SiS_P3c4;
26072b676d7Smrg	SISIOADDRESS			SiS_P3d4;
26172b676d7Smrg	SISIOADDRESS			SiS_P3c0;
26272b676d7Smrg	SISIOADDRESS			SiS_P3ce;
26372b676d7Smrg	SISIOADDRESS			SiS_P3c2;
26472b676d7Smrg	SISIOADDRESS			SiS_P3ca;
26572b676d7Smrg	SISIOADDRESS			SiS_P3c6;
26672b676d7Smrg	SISIOADDRESS			SiS_P3c7;
26772b676d7Smrg	SISIOADDRESS			SiS_P3c8;
26872b676d7Smrg	SISIOADDRESS			SiS_P3c9;
26972b676d7Smrg	SISIOADDRESS			SiS_P3cb;
27072b676d7Smrg	SISIOADDRESS			SiS_P3cc;
27172b676d7Smrg	SISIOADDRESS			SiS_P3cd;
27272b676d7Smrg	SISIOADDRESS			SiS_P3da;
27372b676d7Smrg	SISIOADDRESS			SiS_Part1Port;
27472b676d7Smrg	SISIOADDRESS			SiS_Part2Port;
27572b676d7Smrg	SISIOADDRESS			SiS_Part3Port;
27672b676d7Smrg	SISIOADDRESS			SiS_Part4Port;
27772b676d7Smrg	SISIOADDRESS			SiS_Part5Port;
27872b676d7Smrg	SISIOADDRESS			SiS_VidCapt;
27972b676d7Smrg	SISIOADDRESS			SiS_VidPlay;
28072b676d7Smrg	unsigned short			SiS_IF_DEF_LVDS;
28172b676d7Smrg	unsigned short			SiS_IF_DEF_CH70xx;
28272b676d7Smrg	unsigned short			SiS_IF_DEF_CONEX;
28372b676d7Smrg	unsigned short			SiS_IF_DEF_TRUMPION;
28472b676d7Smrg	unsigned short			SiS_IF_DEF_DSTN;
28572b676d7Smrg	unsigned short			SiS_IF_DEF_FSTN;
28672b676d7Smrg	unsigned short			SiS_SysFlags;
28772b676d7Smrg	unsigned char			SiS_VGAINFO;
28872b676d7Smrg#ifdef SIS_XORG_XF86
28972b676d7Smrg	unsigned short			SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
29072b676d7Smrg#endif
29172b676d7Smrg	BOOLEAN				SiS_UseROM;
29272b676d7Smrg	BOOLEAN				SiS_ROMNew;
29372b676d7Smrg	BOOLEAN				SiS_XGIROM;
29472b676d7Smrg	BOOLEAN				SiS_NeedRomModeData;
29572b676d7Smrg	BOOLEAN				PanelSelfDetected;
29672b676d7Smrg	BOOLEAN				DDCPortMixup;
29772b676d7Smrg	int				SiS_CHOverScan;
29872b676d7Smrg	BOOLEAN				SiS_CHSOverScan;
29972b676d7Smrg	BOOLEAN				SiS_ChSW;
30072b676d7Smrg	BOOLEAN				SiS_UseLCDA;
30172b676d7Smrg	int				SiS_UseOEM;
30272b676d7Smrg	unsigned int			SiS_CustomT;
30372b676d7Smrg	int				SiS_UseWide, SiS_UseWideCRT2;
30472b676d7Smrg	int				SiS_TVBlue;
30572b676d7Smrg	unsigned short			SiS_Backup70xx;
30672b676d7Smrg	BOOLEAN				HaveEMI;
30772b676d7Smrg	BOOLEAN				HaveEMILCD;
30872b676d7Smrg	BOOLEAN				OverruleEMI;
30972b676d7Smrg	unsigned char			EMI_30,EMI_31,EMI_32,EMI_33;
31072b676d7Smrg	unsigned short			SiS_EMIOffset;
31172b676d7Smrg	unsigned short			SiS_PWDOffset;
31272b676d7Smrg	short				PDC, PDCA;
31372b676d7Smrg	unsigned char			SiS_MyCR63;
31472b676d7Smrg	unsigned short			SiS_CRT1Mode;
31572b676d7Smrg	unsigned short			SiS_flag_clearbuffer;
31672b676d7Smrg	int				SiS_RAMType;
31772b676d7Smrg	unsigned char			SiS_ChannelAB;
31872b676d7Smrg	unsigned char			SiS_DataBusWidth;
31972b676d7Smrg	unsigned short			SiS_ModeType;
32072b676d7Smrg	unsigned short			SiS_VBInfo;
32172b676d7Smrg	unsigned int			SiS_TVMode;
32272b676d7Smrg	unsigned short			SiS_LCDResInfo;
32372b676d7Smrg	unsigned short			SiS_LCDTypeInfo;
32472b676d7Smrg	unsigned short			SiS_LCDInfo;
32572b676d7Smrg	unsigned short			SiS_LCDInfo661;
32672b676d7Smrg	unsigned short			SiS_VBType;
32772b676d7Smrg	unsigned short			SiS_VBExtInfo;
32872b676d7Smrg	unsigned short			SiS_YPbPr;
32972b676d7Smrg	unsigned short			SiS_SelectCRT2Rate;
33072b676d7Smrg	unsigned short			SiS_SetFlag;
33172b676d7Smrg	unsigned short			SiS_RVBHCFACT;
33272b676d7Smrg	unsigned short			SiS_RVBHCMAX;
33372b676d7Smrg	unsigned short			SiS_RVBHRS;
33472b676d7Smrg	unsigned short			SiS_RVBHRS2;
33572b676d7Smrg	unsigned short			SiS_VGAVT;
33672b676d7Smrg	unsigned short			SiS_VGAHT;
33772b676d7Smrg	unsigned short			SiS_VT;
33872b676d7Smrg	unsigned short			SiS_HT;
33972b676d7Smrg	unsigned short			SiS_VGAVDE;
34072b676d7Smrg	unsigned short			SiS_VGAHDE;
34172b676d7Smrg	unsigned short			SiS_VDE;
34272b676d7Smrg	unsigned short			SiS_HDE;
34372b676d7Smrg	unsigned short			SiS_NewFlickerMode;
34472b676d7Smrg	unsigned short			SiS_RY1COE;
34572b676d7Smrg	unsigned short			SiS_RY2COE;
34672b676d7Smrg	unsigned short			SiS_RY3COE;
34772b676d7Smrg	unsigned short			SiS_RY4COE;
34872b676d7Smrg	unsigned short			SiS_LCDHDES;
34972b676d7Smrg	unsigned short			SiS_LCDVDES;
35072b676d7Smrg	unsigned short			SiS_DDC_Port;
35172b676d7Smrg	unsigned short			SiS_DDC_Index;
35272b676d7Smrg	unsigned short			SiS_DDC_Data;
35372b676d7Smrg	unsigned short			SiS_DDC_NData;
35472b676d7Smrg	unsigned short			SiS_DDC_Clk;
35572b676d7Smrg	unsigned short			SiS_DDC_NClk;
35672b676d7Smrg	unsigned short			SiS_DDC_DeviceAddr;
35772b676d7Smrg	unsigned short			SiS_DDC_ReadAddr;
35872b676d7Smrg	unsigned short			SiS_DDC_SecAddr;
35972b676d7Smrg	unsigned short			SiS_ChrontelInit;
36072b676d7Smrg	BOOLEAN				SiS_SensibleSR11;
36172b676d7Smrg	unsigned short			SiS661LCD2TableSize;
36272b676d7Smrg
36372b676d7Smrg	unsigned short			SiS_PanelMinLVDS;
36472b676d7Smrg	unsigned short			SiS_PanelMin301;
36572b676d7Smrg
36672b676d7Smrg	const struct SiS_St		*SiS_SModeIDTable;
36772b676d7Smrg	const struct SiS_StandTable_S	*SiS_StandTable;
36872b676d7Smrg	const struct SiS_Ext		*SiS_EModeIDTable;
36972b676d7Smrg	const struct SiS_Ext2		*SiS_RefIndex;
37072b676d7Smrg	const struct SiS_VBMode		*SiS_VBModeIDTable;
37172b676d7Smrg	const struct SiS_CRT1Table	*SiS_CRT1Table;
37272b676d7Smrg	const struct SiS_MCLKData	*SiS_MCLKData_0;
37372b676d7Smrg	const struct SiS_MCLKData	*SiS_MCLKData_1;
37472b676d7Smrg	struct SiS_VCLKData		*SiS_VCLKData;
37572b676d7Smrg	struct SiS_VBVCLKData		*SiS_VBVCLKData;
37672b676d7Smrg	const struct SiS_StResInfo_S	*SiS_StResInfo;
37772b676d7Smrg	const struct SiS_ModeResInfo_S	*SiS_ModeResInfo;
37872b676d7Smrg
37972b676d7Smrg	const unsigned char		*pSiS_OutputSelect;
38072b676d7Smrg	const unsigned char		*pSiS_SoftSetting;
38172b676d7Smrg
38272b676d7Smrg	const unsigned char		*SiS_SR15;
38372b676d7Smrg
38472b676d7Smrg	const struct SiS_PanelDelayTbl	*SiS_PanelDelayTbl;
38572b676d7Smrg	const struct SiS_PanelDelayTbl	*SiS_PanelDelayTblLVDS;
38672b676d7Smrg
38772b676d7Smrg	/* SiS bridge */
38872b676d7Smrg
38972b676d7Smrg	const struct SiS_LCDData	*SiS_ExtLCD1024x768Data;
39072b676d7Smrg	const struct SiS_LCDData	*SiS_St2LCD1024x768Data;
39172b676d7Smrg	const struct SiS_LCDData	*SiS_LCD1280x720Data;
39272b676d7Smrg	const struct SiS_LCDData	*SiS_StLCD1280x768_2Data;
39372b676d7Smrg	const struct SiS_LCDData	*SiS_ExtLCD1280x768_2Data;
39472b676d7Smrg	const struct SiS_LCDData	*SiS_LCD1280x800Data;
39572b676d7Smrg	const struct SiS_LCDData	*SiS_LCD1280x800_2Data;
39672b676d7Smrg	const struct SiS_LCDData	*SiS_LCD1280x854Data;
39772b676d7Smrg	const struct SiS_LCDData	*SiS_LCD1280x960Data;
39872b676d7Smrg	const struct SiS_LCDData	*SiS_ExtLCD1280x1024Data;
39972b676d7Smrg	const struct SiS_LCDData	*SiS_St2LCD1280x1024Data;
40072b676d7Smrg	const struct SiS_LCDData	*SiS_StLCD1400x1050Data;
40172b676d7Smrg	const struct SiS_LCDData	*SiS_ExtLCD1400x1050Data;
40272b676d7Smrg	const struct SiS_LCDData	*SiS_StLCD1600x1200Data;
40372b676d7Smrg	const struct SiS_LCDData	*SiS_ExtLCD1600x1200Data;
40472b676d7Smrg	const struct SiS_LCDData	*SiS_LCD1680x1050Data;
40572b676d7Smrg	const struct SiS_LCDData	*SiS_NoScaleData;
40672b676d7Smrg	const struct SiS_TVData		*SiS_StPALData;
40772b676d7Smrg	const struct SiS_TVData		*SiS_ExtPALData;
40872b676d7Smrg	const struct SiS_TVData		*SiS_StNTSCData;
40972b676d7Smrg	const struct SiS_TVData		*SiS_ExtNTSCData;
41072b676d7Smrg	const struct SiS_TVData		*SiS_St1HiTVData;
41172b676d7Smrg	const struct SiS_TVData		*SiS_St2HiTVData;
41272b676d7Smrg	const struct SiS_TVData		*SiS_ExtHiTVData;
41372b676d7Smrg	const struct SiS_TVData		*SiS_St525iData;
41472b676d7Smrg	const struct SiS_TVData		*SiS_St525pData;
41572b676d7Smrg	const struct SiS_TVData		*SiS_St625iData;
41672b676d7Smrg	const struct SiS_TVData		*SiS_St625pData;
41772b676d7Smrg	const struct SiS_TVData		*SiS_St750pData;
41872b676d7Smrg	const struct SiS_TVData		*SiS_Ext525iData;
41972b676d7Smrg	const struct SiS_TVData		*SiS_Ext525pData;
42072b676d7Smrg	const struct SiS_TVData		*SiS_Ext625iData;
42172b676d7Smrg	const struct SiS_TVData		*SiS_Ext625pData;
42272b676d7Smrg	const struct SiS_TVData		*SiS_Ext750pData;
42372b676d7Smrg	const unsigned char		*SiS_NTSCTiming;
42472b676d7Smrg	const unsigned char		*SiS_PALTiming;
42572b676d7Smrg	const unsigned char		*SiS_HiTVExtTiming;
42672b676d7Smrg	const unsigned char		*SiS_HiTVSt1Timing;
42772b676d7Smrg	const unsigned char		*SiS_HiTVSt2Timing;
42872b676d7Smrg	const unsigned char		*SiS_HiTVGroup3Data;
42972b676d7Smrg	const unsigned char		*SiS_HiTVGroup3Simu;
43072b676d7Smrg#if 0
43172b676d7Smrg	const unsigned char		*SiS_HiTVTextTiming;
43272b676d7Smrg	const unsigned char		*SiS_HiTVGroup3Text;
43372b676d7Smrg#endif
43472b676d7Smrg
43572b676d7Smrg	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_1;
43672b676d7Smrg	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_2;
43772b676d7Smrg	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_3;
43872b676d7Smrg
43972b676d7Smrg	/* LVDS, Chrontel */
44072b676d7Smrg
44172b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS320x240Data_1;
44272b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS320x240Data_2;
44372b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS640x480Data_1;
44472b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS800x600Data_1;
44572b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS1024x600Data_1;
44672b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS1024x768Data_1;
44772b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDSBARCO1366Data_1;
44872b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDSBARCO1366Data_2;
44972b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDSBARCO1024Data_1;
45072b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS848x480Data_1;
45172b676d7Smrg	const struct SiS_LVDSData	*SiS_LVDS848x480Data_2;
45272b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVUNTSCData;
45372b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVONTSCData;
45472b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVUPALData;
45572b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVOPALData;
45672b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVUPALMData;
45772b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVOPALMData;
45872b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVUPALNData;
45972b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVOPALNData;
46072b676d7Smrg	const struct SiS_LVDSData	*SiS_CHTVSOPALData;
46172b676d7Smrg
46272b676d7Smrg	const struct SiS_LVDSDes	*SiS_PanelType04_1a;
46372b676d7Smrg	const struct SiS_LVDSDes	*SiS_PanelType04_2a;
46472b676d7Smrg	const struct SiS_LVDSDes	*SiS_PanelType04_1b;
46572b676d7Smrg	const struct SiS_LVDSDes	*SiS_PanelType04_2b;
46672b676d7Smrg
46772b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_1;
46872b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_2;
46972b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_2_H;
47072b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_3;
47172b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_3_H;
47272b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1640x480_1;
47372b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1640x480_1_H;
47472b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1UNTSC;
47572b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1ONTSC;
47672b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1UPAL;
47772b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1OPAL;
47872b676d7Smrg	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1SOPAL;
47972b676d7Smrg
48072b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_UNTSC;
48172b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_ONTSC;
48272b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPAL;
48372b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPAL;
48472b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPALM;
48572b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPALM;
48672b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPALN;
48772b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPALN;
48872b676d7Smrg	const struct SiS_CHTVRegData	*SiS_CHTVReg_SOPAL;
48972b676d7Smrg
49072b676d7Smrg	const unsigned char		*SiS_CHTVVCLKUNTSC;
49172b676d7Smrg	const unsigned char		*SiS_CHTVVCLKONTSC;
49272b676d7Smrg	const unsigned char		*SiS_CHTVVCLKUPAL;
49372b676d7Smrg	const unsigned char		*SiS_CHTVVCLKOPAL;
49472b676d7Smrg	const unsigned char		*SiS_CHTVVCLKUPALM;
49572b676d7Smrg	const unsigned char		*SiS_CHTVVCLKOPALM;
49672b676d7Smrg	const unsigned char		*SiS_CHTVVCLKUPALN;
49772b676d7Smrg	const unsigned char		*SiS_CHTVVCLKOPALN;
49872b676d7Smrg	const unsigned char		*SiS_CHTVVCLKSOPAL;
49972b676d7Smrg
50072b676d7Smrg	unsigned short			PanelXRes, PanelHT;
50172b676d7Smrg	unsigned short			PanelYRes, PanelVT;
50272b676d7Smrg	unsigned short			PanelHRS,  PanelHRE;
50372b676d7Smrg	unsigned short			PanelVRS,  PanelVRE;
50472b676d7Smrg	unsigned short			PanelVCLKIdx300;
50572b676d7Smrg	unsigned short			PanelVCLKIdx315;
50672b676d7Smrg	BOOLEAN				Alternate1600x1200;
50772b676d7Smrg
50872b676d7Smrg	BOOLEAN				UseCustomMode;
50972b676d7Smrg	BOOLEAN				CRT1UsesCustomMode;
51072b676d7Smrg	unsigned short			CHDisplay;
51172b676d7Smrg	unsigned short			CHSyncStart;
51272b676d7Smrg	unsigned short			CHSyncEnd;
51372b676d7Smrg	unsigned short			CHTotal;
51472b676d7Smrg	unsigned short			CHBlankStart;
51572b676d7Smrg	unsigned short			CHBlankEnd;
51672b676d7Smrg	unsigned short			CVDisplay;
51772b676d7Smrg	unsigned short			CVSyncStart;
51872b676d7Smrg	unsigned short			CVSyncEnd;
51972b676d7Smrg	unsigned short			CVTotal;
52072b676d7Smrg	unsigned short			CVBlankStart;
52172b676d7Smrg	unsigned short			CVBlankEnd;
52272b676d7Smrg	unsigned int			CDClock;
52372b676d7Smrg	unsigned int			CFlags;
52472b676d7Smrg	unsigned char			CCRT1CRTC[17];
52572b676d7Smrg	unsigned char			CSR2B;
52672b676d7Smrg	unsigned char			CSR2C;
52772b676d7Smrg	unsigned short			CSRClock;
52872b676d7Smrg	unsigned short			CSRClock_CRT1;
52972b676d7Smrg	unsigned short			CModeFlag;
53072b676d7Smrg	unsigned short			CModeFlag_CRT1;
53172b676d7Smrg	unsigned short			CInfoFlag;
53272b676d7Smrg
53372b676d7Smrg	int				LVDSHL;
53472b676d7Smrg
53572b676d7Smrg	BOOLEAN				Backup;
53672b676d7Smrg	unsigned char			Backup_Mode;
53772b676d7Smrg	unsigned char			Backup_14;
53872b676d7Smrg	unsigned char			Backup_15;
53972b676d7Smrg	unsigned char			Backup_16;
54072b676d7Smrg	unsigned char			Backup_17;
54172b676d7Smrg	unsigned char			Backup_18;
54272b676d7Smrg	unsigned char			Backup_19;
54372b676d7Smrg	unsigned char			Backup_1a;
54472b676d7Smrg	unsigned char			Backup_1b;
54572b676d7Smrg	unsigned char			Backup_1c;
54672b676d7Smrg	unsigned char			Backup_1d;
54772b676d7Smrg
54872b676d7Smrg	unsigned char			Init_P4_0E;
54972b676d7Smrg
55072b676d7Smrg	int				UsePanelScaler;
55172b676d7Smrg	int				CenterScreen;
55272b676d7Smrg
55372b676d7Smrg	unsigned short			CP_Vendor, CP_Product;
55472b676d7Smrg	BOOLEAN				CP_HaveCustomData;
55572b676d7Smrg	int				CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
55672b676d7Smrg	int				CP_MaxX, CP_MaxY, CP_MaxClock;
55772b676d7Smrg	unsigned char			CP_PrefSR2B, CP_PrefSR2C;
55872b676d7Smrg	unsigned short			CP_PrefClock;
55972b676d7Smrg	BOOLEAN				CP_Supports64048075;
56072b676d7Smrg	int				CP_HDisplay[7], CP_VDisplay[7];	/* For Custom LCD panel dimensions */
56172b676d7Smrg	int				CP_HTotal[7], CP_VTotal[7];
56272b676d7Smrg	int				CP_HSyncStart[7], CP_VSyncStart[7];
56372b676d7Smrg	int				CP_HSyncEnd[7], CP_VSyncEnd[7];
56472b676d7Smrg	int				CP_HBlankStart[7], CP_VBlankStart[7];
56572b676d7Smrg	int				CP_HBlankEnd[7], CP_VBlankEnd[7];
56672b676d7Smrg	int				CP_Clock[7];
56772b676d7Smrg	BOOLEAN				CP_DataValid[7];
56872b676d7Smrg	BOOLEAN				CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
56972b676d7Smrg};
57072b676d7Smrg
57172b676d7Smrg#endif
57272b676d7Smrg
573