18c2ecf20Sopenharmony_ci/* $XFree86$ */
28c2ecf20Sopenharmony_ci/* $XdotOrg$ */
38c2ecf20Sopenharmony_ci/*
48c2ecf20Sopenharmony_ci * General structure definitions for universal mode switching modules
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * If distributed as part of the Linux kernel, the following license terms
98c2ecf20Sopenharmony_ci * apply:
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * * This program is free software; you can redistribute it and/or modify
128c2ecf20Sopenharmony_ci * * it under the terms of the GNU General Public License as published by
138c2ecf20Sopenharmony_ci * * the Free Software Foundation; either version 2 of the named License,
148c2ecf20Sopenharmony_ci * * or any later version.
158c2ecf20Sopenharmony_ci * *
168c2ecf20Sopenharmony_ci * * This program is distributed in the hope that it will be useful,
178c2ecf20Sopenharmony_ci * * but WITHOUT ANY WARRANTY; without even the implied warranty of
188c2ecf20Sopenharmony_ci * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
198c2ecf20Sopenharmony_ci * * GNU General Public License for more details.
208c2ecf20Sopenharmony_ci * *
218c2ecf20Sopenharmony_ci * * You should have received a copy of the GNU General Public License
228c2ecf20Sopenharmony_ci * * along with this program; if not, write to the Free Software
238c2ecf20Sopenharmony_ci * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
248c2ecf20Sopenharmony_ci *
258c2ecf20Sopenharmony_ci * Otherwise, the following license terms apply:
268c2ecf20Sopenharmony_ci *
278c2ecf20Sopenharmony_ci * * Redistribution and use in source and binary forms, with or without
288c2ecf20Sopenharmony_ci * * modification, are permitted provided that the following conditions
298c2ecf20Sopenharmony_ci * * are met:
308c2ecf20Sopenharmony_ci * * 1) Redistributions of source code must retain the above copyright
318c2ecf20Sopenharmony_ci * *    notice, this list of conditions and the following disclaimer.
328c2ecf20Sopenharmony_ci * * 2) Redistributions in binary form must reproduce the above copyright
338c2ecf20Sopenharmony_ci * *    notice, this list of conditions and the following disclaimer in the
348c2ecf20Sopenharmony_ci * *    documentation and/or other materials provided with the distribution.
358c2ecf20Sopenharmony_ci * * 3) The name of the author may not be used to endorse or promote products
368c2ecf20Sopenharmony_ci * *    derived from this software without specific prior written permission.
378c2ecf20Sopenharmony_ci * *
388c2ecf20Sopenharmony_ci * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
398c2ecf20Sopenharmony_ci * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
408c2ecf20Sopenharmony_ci * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
418c2ecf20Sopenharmony_ci * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
428c2ecf20Sopenharmony_ci * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
438c2ecf20Sopenharmony_ci * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
448c2ecf20Sopenharmony_ci * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
458c2ecf20Sopenharmony_ci * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
468c2ecf20Sopenharmony_ci * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
478c2ecf20Sopenharmony_ci * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
488c2ecf20Sopenharmony_ci *
498c2ecf20Sopenharmony_ci * Author: 	Thomas Winischhofer <thomas@winischhofer.net>
508c2ecf20Sopenharmony_ci *
518c2ecf20Sopenharmony_ci */
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci#ifndef _VSTRUCT_H_
548c2ecf20Sopenharmony_ci#define _VSTRUCT_H_
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_cistruct SiS_PanelDelayTbl {
578c2ecf20Sopenharmony_ci 	unsigned char timer[2];
588c2ecf20Sopenharmony_ci};
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_cistruct SiS_LCDData {
618c2ecf20Sopenharmony_ci	unsigned short RVBHCMAX;
628c2ecf20Sopenharmony_ci	unsigned short RVBHCFACT;
638c2ecf20Sopenharmony_ci	unsigned short VGAHT;
648c2ecf20Sopenharmony_ci	unsigned short VGAVT;
658c2ecf20Sopenharmony_ci	unsigned short LCDHT;
668c2ecf20Sopenharmony_ci	unsigned short LCDVT;
678c2ecf20Sopenharmony_ci};
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_cistruct SiS_TVData {
708c2ecf20Sopenharmony_ci	unsigned short RVBHCMAX;
718c2ecf20Sopenharmony_ci	unsigned short RVBHCFACT;
728c2ecf20Sopenharmony_ci	unsigned short VGAHT;
738c2ecf20Sopenharmony_ci	unsigned short VGAVT;
748c2ecf20Sopenharmony_ci	unsigned short TVHDE;
758c2ecf20Sopenharmony_ci	unsigned short TVVDE;
768c2ecf20Sopenharmony_ci	unsigned short RVBHRS;
778c2ecf20Sopenharmony_ci	unsigned char  FlickerMode;
788c2ecf20Sopenharmony_ci	unsigned short HALFRVBHRS;
798c2ecf20Sopenharmony_ci	unsigned short RVBHRS2;
808c2ecf20Sopenharmony_ci	unsigned char  RY1COE;
818c2ecf20Sopenharmony_ci	unsigned char  RY2COE;
828c2ecf20Sopenharmony_ci	unsigned char  RY3COE;
838c2ecf20Sopenharmony_ci	unsigned char  RY4COE;
848c2ecf20Sopenharmony_ci};
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_cistruct SiS_LVDSData {
878c2ecf20Sopenharmony_ci	unsigned short VGAHT;
888c2ecf20Sopenharmony_ci	unsigned short VGAVT;
898c2ecf20Sopenharmony_ci	unsigned short LCDHT;
908c2ecf20Sopenharmony_ci	unsigned short LCDVT;
918c2ecf20Sopenharmony_ci};
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_cistruct SiS_LVDSDes {
948c2ecf20Sopenharmony_ci	unsigned short LCDHDES;
958c2ecf20Sopenharmony_ci	unsigned short LCDVDES;
968c2ecf20Sopenharmony_ci};
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_cistruct SiS_LVDSCRT1Data {
998c2ecf20Sopenharmony_ci	unsigned char  CR[15];
1008c2ecf20Sopenharmony_ci};
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_cistruct SiS_CHTVRegData {
1038c2ecf20Sopenharmony_ci	unsigned char  Reg[16];
1048c2ecf20Sopenharmony_ci};
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_cistruct SiS_St {
1078c2ecf20Sopenharmony_ci	unsigned char  St_ModeID;
1088c2ecf20Sopenharmony_ci	unsigned short St_ModeFlag;
1098c2ecf20Sopenharmony_ci	unsigned char  St_StTableIndex;
1108c2ecf20Sopenharmony_ci	unsigned char  St_CRT2CRTC;
1118c2ecf20Sopenharmony_ci	unsigned char  St_ResInfo;
1128c2ecf20Sopenharmony_ci	unsigned char  VB_StTVFlickerIndex;
1138c2ecf20Sopenharmony_ci	unsigned char  VB_StTVEdgeIndex;
1148c2ecf20Sopenharmony_ci	unsigned char  VB_StTVYFilterIndex;
1158c2ecf20Sopenharmony_ci	unsigned char  St_PDC;
1168c2ecf20Sopenharmony_ci};
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_cistruct SiS_VBMode {
1198c2ecf20Sopenharmony_ci	unsigned char  ModeID;
1208c2ecf20Sopenharmony_ci	unsigned char  VB_TVDelayIndex;
1218c2ecf20Sopenharmony_ci	unsigned char  VB_TVFlickerIndex;
1228c2ecf20Sopenharmony_ci	unsigned char  VB_TVPhaseIndex;
1238c2ecf20Sopenharmony_ci	unsigned char  VB_TVYFilterIndex;
1248c2ecf20Sopenharmony_ci	unsigned char  VB_LCDDelayIndex;
1258c2ecf20Sopenharmony_ci	unsigned char  _VB_LCDHIndex;
1268c2ecf20Sopenharmony_ci	unsigned char  _VB_LCDVIndex;
1278c2ecf20Sopenharmony_ci};
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_cistruct SiS_StandTable_S {
1308c2ecf20Sopenharmony_ci	unsigned char  CRT_COLS;
1318c2ecf20Sopenharmony_ci	unsigned char  ROWS;
1328c2ecf20Sopenharmony_ci	unsigned char  CHAR_HEIGHT;
1338c2ecf20Sopenharmony_ci	unsigned short CRT_LEN;
1348c2ecf20Sopenharmony_ci	unsigned char  SR[4];
1358c2ecf20Sopenharmony_ci	unsigned char  MISC;
1368c2ecf20Sopenharmony_ci	unsigned char  CRTC[0x19];
1378c2ecf20Sopenharmony_ci	unsigned char  ATTR[0x14];
1388c2ecf20Sopenharmony_ci	unsigned char  GRC[9];
1398c2ecf20Sopenharmony_ci};
1408c2ecf20Sopenharmony_ci
1418c2ecf20Sopenharmony_cistruct SiS_Ext {
1428c2ecf20Sopenharmony_ci	unsigned char  Ext_ModeID;
1438c2ecf20Sopenharmony_ci	unsigned short Ext_ModeFlag;
1448c2ecf20Sopenharmony_ci	unsigned short Ext_VESAID;
1458c2ecf20Sopenharmony_ci	unsigned char  Ext_RESINFO;
1468c2ecf20Sopenharmony_ci	unsigned char  VB_ExtTVFlickerIndex;
1478c2ecf20Sopenharmony_ci	unsigned char  VB_ExtTVEdgeIndex;
1488c2ecf20Sopenharmony_ci	unsigned char  VB_ExtTVYFilterIndex;
1498c2ecf20Sopenharmony_ci	unsigned char  VB_ExtTVYFilterIndexROM661;
1508c2ecf20Sopenharmony_ci	unsigned char  REFindex;
1518c2ecf20Sopenharmony_ci	char           ROMMODEIDX661;
1528c2ecf20Sopenharmony_ci};
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_cistruct SiS_Ext2 {
1558c2ecf20Sopenharmony_ci	unsigned short Ext_InfoFlag;
1568c2ecf20Sopenharmony_ci	unsigned char  Ext_CRT1CRTC;
1578c2ecf20Sopenharmony_ci	unsigned char  Ext_CRTVCLK;
1588c2ecf20Sopenharmony_ci	unsigned char  Ext_CRT2CRTC;
1598c2ecf20Sopenharmony_ci	unsigned char  Ext_CRT2CRTC_NS;
1608c2ecf20Sopenharmony_ci	unsigned char  ModeID;
1618c2ecf20Sopenharmony_ci	unsigned short XRes;
1628c2ecf20Sopenharmony_ci	unsigned short YRes;
1638c2ecf20Sopenharmony_ci	unsigned char  Ext_PDC;
1648c2ecf20Sopenharmony_ci	unsigned char  Ext_FakeCRT2CRTC;
1658c2ecf20Sopenharmony_ci	unsigned char  Ext_FakeCRT2Clk;
1668c2ecf20Sopenharmony_ci	unsigned char  Ext_CRT1CRTC_NORM;
1678c2ecf20Sopenharmony_ci	unsigned char  Ext_CRTVCLK_NORM;
1688c2ecf20Sopenharmony_ci	unsigned char  Ext_CRT1CRTC_WIDE;
1698c2ecf20Sopenharmony_ci	unsigned char  Ext_CRTVCLK_WIDE;
1708c2ecf20Sopenharmony_ci};
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_cistruct SiS_Part2PortTbl {
1738c2ecf20Sopenharmony_ci 	unsigned char  CR[12];
1748c2ecf20Sopenharmony_ci};
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_cistruct SiS_CRT1Table {
1778c2ecf20Sopenharmony_ci	unsigned char  CR[17];
1788c2ecf20Sopenharmony_ci};
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_cistruct SiS_MCLKData {
1818c2ecf20Sopenharmony_ci	unsigned char  SR28,SR29,SR2A;
1828c2ecf20Sopenharmony_ci	unsigned short CLOCK;
1838c2ecf20Sopenharmony_ci};
1848c2ecf20Sopenharmony_ci
1858c2ecf20Sopenharmony_cistruct SiS_VCLKData {
1868c2ecf20Sopenharmony_ci	unsigned char  SR2B,SR2C;
1878c2ecf20Sopenharmony_ci	unsigned short CLOCK;
1888c2ecf20Sopenharmony_ci};
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_cistruct SiS_VBVCLKData {
1918c2ecf20Sopenharmony_ci	unsigned char  Part4_A,Part4_B;
1928c2ecf20Sopenharmony_ci	unsigned short CLOCK;
1938c2ecf20Sopenharmony_ci};
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_cistruct SiS_StResInfo_S {
1968c2ecf20Sopenharmony_ci	unsigned short HTotal;
1978c2ecf20Sopenharmony_ci	unsigned short VTotal;
1988c2ecf20Sopenharmony_ci};
1998c2ecf20Sopenharmony_ci
2008c2ecf20Sopenharmony_cistruct SiS_ModeResInfo_S {
2018c2ecf20Sopenharmony_ci	unsigned short HTotal;
2028c2ecf20Sopenharmony_ci	unsigned short VTotal;
2038c2ecf20Sopenharmony_ci	unsigned char  XChar;
2048c2ecf20Sopenharmony_ci	unsigned char  YChar;
2058c2ecf20Sopenharmony_ci};
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_ci/* Defines for SiS_CustomT */
2088c2ecf20Sopenharmony_ci/* Never change these for sisfb compatibility */
2098c2ecf20Sopenharmony_ci#define CUT_NONE		 0
2108c2ecf20Sopenharmony_ci#define CUT_FORCENONE		 1
2118c2ecf20Sopenharmony_ci#define CUT_BARCO1366		 2
2128c2ecf20Sopenharmony_ci#define CUT_BARCO1024		 3
2138c2ecf20Sopenharmony_ci#define CUT_COMPAQ1280		 4
2148c2ecf20Sopenharmony_ci#define CUT_COMPAQ12802		 5
2158c2ecf20Sopenharmony_ci#define CUT_PANEL848		 6
2168c2ecf20Sopenharmony_ci#define CUT_CLEVO1024		 7
2178c2ecf20Sopenharmony_ci#define CUT_CLEVO10242		 8
2188c2ecf20Sopenharmony_ci#define CUT_CLEVO1400		 9
2198c2ecf20Sopenharmony_ci#define CUT_CLEVO14002		10
2208c2ecf20Sopenharmony_ci#define CUT_UNIWILL1024		11
2218c2ecf20Sopenharmony_ci#define CUT_ASUSL3000D		12
2228c2ecf20Sopenharmony_ci#define CUT_UNIWILL10242	13
2238c2ecf20Sopenharmony_ci#define CUT_ACER1280		14
2248c2ecf20Sopenharmony_ci#define CUT_COMPAL1400_1	15
2258c2ecf20Sopenharmony_ci#define CUT_COMPAL1400_2	16
2268c2ecf20Sopenharmony_ci#define CUT_ASUSA2H_1		17
2278c2ecf20Sopenharmony_ci#define CUT_ASUSA2H_2		18
2288c2ecf20Sopenharmony_ci#define CUT_UNKNOWNLCD		19
2298c2ecf20Sopenharmony_ci#define CUT_AOP8060		20
2308c2ecf20Sopenharmony_ci#define CUT_PANEL856		21
2318c2ecf20Sopenharmony_ci
2328c2ecf20Sopenharmony_cistruct SiS_Private
2338c2ecf20Sopenharmony_ci{
2348c2ecf20Sopenharmony_ci	unsigned char			ChipType;
2358c2ecf20Sopenharmony_ci	unsigned char			ChipRevision;
2368c2ecf20Sopenharmony_ci	void				*ivideo;
2378c2ecf20Sopenharmony_ci	unsigned char 			*VirtualRomBase;
2388c2ecf20Sopenharmony_ci	bool				UseROM;
2398c2ecf20Sopenharmony_ci	unsigned char SISIOMEMTYPE	*VideoMemoryAddress;
2408c2ecf20Sopenharmony_ci	unsigned int			VideoMemorySize;
2418c2ecf20Sopenharmony_ci	SISIOADDRESS			IOAddress;
2428c2ecf20Sopenharmony_ci	SISIOADDRESS			IOAddress2;  /* For dual chip XGI volari */
2438c2ecf20Sopenharmony_ci
2448c2ecf20Sopenharmony_ci	SISIOADDRESS			RelIO;
2458c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3c4;
2468c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3d4;
2478c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3c0;
2488c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3ce;
2498c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3c2;
2508c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3ca;
2518c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3c6;
2528c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3c7;
2538c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3c8;
2548c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3c9;
2558c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3cb;
2568c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3cc;
2578c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3cd;
2588c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_P3da;
2598c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_Part1Port;
2608c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_Part2Port;
2618c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_Part3Port;
2628c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_Part4Port;
2638c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_Part5Port;
2648c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_VidCapt;
2658c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_VidPlay;
2668c2ecf20Sopenharmony_ci	unsigned short			SiS_IF_DEF_LVDS;
2678c2ecf20Sopenharmony_ci	unsigned short			SiS_IF_DEF_CH70xx;
2688c2ecf20Sopenharmony_ci	unsigned short			SiS_IF_DEF_CONEX;
2698c2ecf20Sopenharmony_ci	unsigned short			SiS_IF_DEF_TRUMPION;
2708c2ecf20Sopenharmony_ci	unsigned short			SiS_IF_DEF_DSTN;
2718c2ecf20Sopenharmony_ci	unsigned short			SiS_IF_DEF_FSTN;
2728c2ecf20Sopenharmony_ci	unsigned short			SiS_SysFlags;
2738c2ecf20Sopenharmony_ci	unsigned char			SiS_VGAINFO;
2748c2ecf20Sopenharmony_ci	bool				SiS_UseROM;
2758c2ecf20Sopenharmony_ci	bool				SiS_ROMNew;
2768c2ecf20Sopenharmony_ci	bool				SiS_XGIROM;
2778c2ecf20Sopenharmony_ci	bool				SiS_NeedRomModeData;
2788c2ecf20Sopenharmony_ci	bool				PanelSelfDetected;
2798c2ecf20Sopenharmony_ci	bool				DDCPortMixup;
2808c2ecf20Sopenharmony_ci	int				SiS_CHOverScan;
2818c2ecf20Sopenharmony_ci	bool				SiS_CHSOverScan;
2828c2ecf20Sopenharmony_ci	bool				SiS_ChSW;
2838c2ecf20Sopenharmony_ci	bool				SiS_UseLCDA;
2848c2ecf20Sopenharmony_ci	int				SiS_UseOEM;
2858c2ecf20Sopenharmony_ci	unsigned int			SiS_CustomT;
2868c2ecf20Sopenharmony_ci	int				SiS_UseWide, SiS_UseWideCRT2;
2878c2ecf20Sopenharmony_ci	int				SiS_TVBlue;
2888c2ecf20Sopenharmony_ci	unsigned short			SiS_Backup70xx;
2898c2ecf20Sopenharmony_ci	bool				HaveEMI;
2908c2ecf20Sopenharmony_ci	bool				HaveEMILCD;
2918c2ecf20Sopenharmony_ci	bool				OverruleEMI;
2928c2ecf20Sopenharmony_ci	unsigned char			EMI_30,EMI_31,EMI_32,EMI_33;
2938c2ecf20Sopenharmony_ci	unsigned short			SiS_EMIOffset;
2948c2ecf20Sopenharmony_ci	unsigned short			SiS_PWDOffset;
2958c2ecf20Sopenharmony_ci	short				PDC, PDCA;
2968c2ecf20Sopenharmony_ci	unsigned char			SiS_MyCR63;
2978c2ecf20Sopenharmony_ci	unsigned short			SiS_CRT1Mode;
2988c2ecf20Sopenharmony_ci	unsigned short			SiS_flag_clearbuffer;
2998c2ecf20Sopenharmony_ci	int				SiS_RAMType;
3008c2ecf20Sopenharmony_ci	unsigned char			SiS_ChannelAB;
3018c2ecf20Sopenharmony_ci	unsigned char			SiS_DataBusWidth;
3028c2ecf20Sopenharmony_ci	unsigned short			SiS_ModeType;
3038c2ecf20Sopenharmony_ci	unsigned short			SiS_VBInfo;
3048c2ecf20Sopenharmony_ci	unsigned short			SiS_TVMode;
3058c2ecf20Sopenharmony_ci	unsigned short			SiS_LCDResInfo;
3068c2ecf20Sopenharmony_ci	unsigned short			SiS_LCDTypeInfo;
3078c2ecf20Sopenharmony_ci	unsigned short			SiS_LCDInfo;
3088c2ecf20Sopenharmony_ci	unsigned short			SiS_LCDInfo661;
3098c2ecf20Sopenharmony_ci	unsigned short			SiS_VBType;
3108c2ecf20Sopenharmony_ci	unsigned short			SiS_VBExtInfo;
3118c2ecf20Sopenharmony_ci	unsigned short			SiS_YPbPr;
3128c2ecf20Sopenharmony_ci	unsigned short			SiS_SelectCRT2Rate;
3138c2ecf20Sopenharmony_ci	unsigned short			SiS_SetFlag;
3148c2ecf20Sopenharmony_ci	unsigned short			SiS_RVBHCFACT;
3158c2ecf20Sopenharmony_ci	unsigned short			SiS_RVBHCMAX;
3168c2ecf20Sopenharmony_ci	unsigned short			SiS_RVBHRS;
3178c2ecf20Sopenharmony_ci	unsigned short			SiS_RVBHRS2;
3188c2ecf20Sopenharmony_ci	unsigned short			SiS_VGAVT;
3198c2ecf20Sopenharmony_ci	unsigned short			SiS_VGAHT;
3208c2ecf20Sopenharmony_ci	unsigned short			SiS_VT;
3218c2ecf20Sopenharmony_ci	unsigned short			SiS_HT;
3228c2ecf20Sopenharmony_ci	unsigned short			SiS_VGAVDE;
3238c2ecf20Sopenharmony_ci	unsigned short			SiS_VGAHDE;
3248c2ecf20Sopenharmony_ci	unsigned short			SiS_VDE;
3258c2ecf20Sopenharmony_ci	unsigned short			SiS_HDE;
3268c2ecf20Sopenharmony_ci	unsigned short			SiS_NewFlickerMode;
3278c2ecf20Sopenharmony_ci	unsigned short			SiS_RY1COE;
3288c2ecf20Sopenharmony_ci	unsigned short			SiS_RY2COE;
3298c2ecf20Sopenharmony_ci	unsigned short			SiS_RY3COE;
3308c2ecf20Sopenharmony_ci	unsigned short			SiS_RY4COE;
3318c2ecf20Sopenharmony_ci	unsigned short			SiS_LCDHDES;
3328c2ecf20Sopenharmony_ci	unsigned short			SiS_LCDVDES;
3338c2ecf20Sopenharmony_ci	SISIOADDRESS			SiS_DDC_Port;
3348c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_Index;
3358c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_Data;
3368c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_NData;
3378c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_Clk;
3388c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_NClk;
3398c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_DeviceAddr;
3408c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_ReadAddr;
3418c2ecf20Sopenharmony_ci	unsigned short			SiS_DDC_SecAddr;
3428c2ecf20Sopenharmony_ci	unsigned short			SiS_ChrontelInit;
3438c2ecf20Sopenharmony_ci	bool				SiS_SensibleSR11;
3448c2ecf20Sopenharmony_ci	unsigned short			SiS661LCD2TableSize;
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_ci	unsigned short			SiS_PanelMinLVDS;
3478c2ecf20Sopenharmony_ci	unsigned short			SiS_PanelMin301;
3488c2ecf20Sopenharmony_ci
3498c2ecf20Sopenharmony_ci	const struct SiS_St		*SiS_SModeIDTable;
3508c2ecf20Sopenharmony_ci	const struct SiS_StandTable_S	*SiS_StandTable;
3518c2ecf20Sopenharmony_ci	const struct SiS_Ext		*SiS_EModeIDTable;
3528c2ecf20Sopenharmony_ci	const struct SiS_Ext2		*SiS_RefIndex;
3538c2ecf20Sopenharmony_ci	const struct SiS_VBMode		*SiS_VBModeIDTable;
3548c2ecf20Sopenharmony_ci	const struct SiS_CRT1Table	*SiS_CRT1Table;
3558c2ecf20Sopenharmony_ci	const struct SiS_MCLKData	*SiS_MCLKData_0;
3568c2ecf20Sopenharmony_ci	const struct SiS_MCLKData	*SiS_MCLKData_1;
3578c2ecf20Sopenharmony_ci	struct SiS_VCLKData		*SiS_VCLKData;
3588c2ecf20Sopenharmony_ci	struct SiS_VBVCLKData		*SiS_VBVCLKData;
3598c2ecf20Sopenharmony_ci	const struct SiS_StResInfo_S	*SiS_StResInfo;
3608c2ecf20Sopenharmony_ci	const struct SiS_ModeResInfo_S	*SiS_ModeResInfo;
3618c2ecf20Sopenharmony_ci
3628c2ecf20Sopenharmony_ci	const unsigned char		*pSiS_OutputSelect;
3638c2ecf20Sopenharmony_ci	const unsigned char		*pSiS_SoftSetting;
3648c2ecf20Sopenharmony_ci
3658c2ecf20Sopenharmony_ci	const unsigned char		*SiS_SR15;
3668c2ecf20Sopenharmony_ci
3678c2ecf20Sopenharmony_ci	const struct SiS_PanelDelayTbl	*SiS_PanelDelayTbl;
3688c2ecf20Sopenharmony_ci	const struct SiS_PanelDelayTbl	*SiS_PanelDelayTblLVDS;
3698c2ecf20Sopenharmony_ci
3708c2ecf20Sopenharmony_ci	/* SiS bridge */
3718c2ecf20Sopenharmony_ci
3728c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_ExtLCD1024x768Data;
3738c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_St2LCD1024x768Data;
3748c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_LCD1280x720Data;
3758c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_StLCD1280x768_2Data;
3768c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_ExtLCD1280x768_2Data;
3778c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_LCD1280x800Data;
3788c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_LCD1280x800_2Data;
3798c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_LCD1280x854Data;
3808c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_LCD1280x960Data;
3818c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_ExtLCD1280x1024Data;
3828c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_St2LCD1280x1024Data;
3838c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_StLCD1400x1050Data;
3848c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_ExtLCD1400x1050Data;
3858c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_StLCD1600x1200Data;
3868c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_ExtLCD1600x1200Data;
3878c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_LCD1680x1050Data;
3888c2ecf20Sopenharmony_ci	const struct SiS_LCDData	*SiS_NoScaleData;
3898c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_StPALData;
3908c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_ExtPALData;
3918c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_StNTSCData;
3928c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_ExtNTSCData;
3938c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_St1HiTVData;
3948c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_St2HiTVData;
3958c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_ExtHiTVData;
3968c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_St525iData;
3978c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_St525pData;
3988c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_St750pData;
3998c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_Ext525iData;
4008c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_Ext525pData;
4018c2ecf20Sopenharmony_ci	const struct SiS_TVData		*SiS_Ext750pData;
4028c2ecf20Sopenharmony_ci	const unsigned char		*SiS_NTSCTiming;
4038c2ecf20Sopenharmony_ci	const unsigned char		*SiS_PALTiming;
4048c2ecf20Sopenharmony_ci	const unsigned char		*SiS_HiTVExtTiming;
4058c2ecf20Sopenharmony_ci	const unsigned char		*SiS_HiTVSt1Timing;
4068c2ecf20Sopenharmony_ci	const unsigned char		*SiS_HiTVSt2Timing;
4078c2ecf20Sopenharmony_ci	const unsigned char		*SiS_HiTVGroup3Data;
4088c2ecf20Sopenharmony_ci	const unsigned char		*SiS_HiTVGroup3Simu;
4098c2ecf20Sopenharmony_ci#if 0
4108c2ecf20Sopenharmony_ci	const unsigned char		*SiS_HiTVTextTiming;
4118c2ecf20Sopenharmony_ci	const unsigned char		*SiS_HiTVGroup3Text;
4128c2ecf20Sopenharmony_ci#endif
4138c2ecf20Sopenharmony_ci
4148c2ecf20Sopenharmony_ci	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_1;
4158c2ecf20Sopenharmony_ci	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_2;
4168c2ecf20Sopenharmony_ci	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_3;
4178c2ecf20Sopenharmony_ci
4188c2ecf20Sopenharmony_ci	/* LVDS, Chrontel */
4198c2ecf20Sopenharmony_ci
4208c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS320x240Data_1;
4218c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS320x240Data_2;
4228c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS640x480Data_1;
4238c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS800x600Data_1;
4248c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS1024x600Data_1;
4258c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS1024x768Data_1;
4268c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDSBARCO1366Data_1;
4278c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDSBARCO1366Data_2;
4288c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDSBARCO1024Data_1;
4298c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS848x480Data_1;
4308c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_LVDS848x480Data_2;
4318c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVUNTSCData;
4328c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVONTSCData;
4338c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVUPALData;
4348c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVOPALData;
4358c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVUPALMData;
4368c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVOPALMData;
4378c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVUPALNData;
4388c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVOPALNData;
4398c2ecf20Sopenharmony_ci	const struct SiS_LVDSData	*SiS_CHTVSOPALData;
4408c2ecf20Sopenharmony_ci
4418c2ecf20Sopenharmony_ci	const struct SiS_LVDSDes	*SiS_PanelType04_1a;
4428c2ecf20Sopenharmony_ci	const struct SiS_LVDSDes	*SiS_PanelType04_2a;
4438c2ecf20Sopenharmony_ci	const struct SiS_LVDSDes	*SiS_PanelType04_1b;
4448c2ecf20Sopenharmony_ci	const struct SiS_LVDSDes	*SiS_PanelType04_2b;
4458c2ecf20Sopenharmony_ci
4468c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_1;
4478c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_2;
4488c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_2_H;
4498c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_3;
4508c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_3_H;
4518c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1640x480_1;
4528c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1640x480_1_H;
4538c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1UNTSC;
4548c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1ONTSC;
4558c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1UPAL;
4568c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1OPAL;
4578c2ecf20Sopenharmony_ci	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1SOPAL;
4588c2ecf20Sopenharmony_ci
4598c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_UNTSC;
4608c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_ONTSC;
4618c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPAL;
4628c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPAL;
4638c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPALM;
4648c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPALM;
4658c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPALN;
4668c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPALN;
4678c2ecf20Sopenharmony_ci	const struct SiS_CHTVRegData	*SiS_CHTVReg_SOPAL;
4688c2ecf20Sopenharmony_ci
4698c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKUNTSC;
4708c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKONTSC;
4718c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKUPAL;
4728c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKOPAL;
4738c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKUPALM;
4748c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKOPALM;
4758c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKUPALN;
4768c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKOPALN;
4778c2ecf20Sopenharmony_ci	const unsigned char		*SiS_CHTVVCLKSOPAL;
4788c2ecf20Sopenharmony_ci
4798c2ecf20Sopenharmony_ci	unsigned short			PanelXRes, PanelHT;
4808c2ecf20Sopenharmony_ci	unsigned short			PanelYRes, PanelVT;
4818c2ecf20Sopenharmony_ci	unsigned short			PanelHRS,  PanelHRE;
4828c2ecf20Sopenharmony_ci	unsigned short			PanelVRS,  PanelVRE;
4838c2ecf20Sopenharmony_ci	unsigned short			PanelVCLKIdx300;
4848c2ecf20Sopenharmony_ci	unsigned short			PanelVCLKIdx315;
4858c2ecf20Sopenharmony_ci	bool				Alternate1600x1200;
4868c2ecf20Sopenharmony_ci
4878c2ecf20Sopenharmony_ci	bool				UseCustomMode;
4888c2ecf20Sopenharmony_ci	bool				CRT1UsesCustomMode;
4898c2ecf20Sopenharmony_ci	unsigned short			CHDisplay;
4908c2ecf20Sopenharmony_ci	unsigned short			CHSyncStart;
4918c2ecf20Sopenharmony_ci	unsigned short			CHSyncEnd;
4928c2ecf20Sopenharmony_ci	unsigned short			CHTotal;
4938c2ecf20Sopenharmony_ci	unsigned short			CHBlankStart;
4948c2ecf20Sopenharmony_ci	unsigned short			CHBlankEnd;
4958c2ecf20Sopenharmony_ci	unsigned short			CVDisplay;
4968c2ecf20Sopenharmony_ci	unsigned short			CVSyncStart;
4978c2ecf20Sopenharmony_ci	unsigned short			CVSyncEnd;
4988c2ecf20Sopenharmony_ci	unsigned short			CVTotal;
4998c2ecf20Sopenharmony_ci	unsigned short			CVBlankStart;
5008c2ecf20Sopenharmony_ci	unsigned short			CVBlankEnd;
5018c2ecf20Sopenharmony_ci	unsigned int			CDClock;
5028c2ecf20Sopenharmony_ci	unsigned int			CFlags;
5038c2ecf20Sopenharmony_ci	unsigned char			CCRT1CRTC[17];
5048c2ecf20Sopenharmony_ci	unsigned char			CSR2B;
5058c2ecf20Sopenharmony_ci	unsigned char			CSR2C;
5068c2ecf20Sopenharmony_ci	unsigned short			CSRClock;
5078c2ecf20Sopenharmony_ci	unsigned short			CSRClock_CRT1;
5088c2ecf20Sopenharmony_ci	unsigned short			CModeFlag;
5098c2ecf20Sopenharmony_ci	unsigned short			CModeFlag_CRT1;
5108c2ecf20Sopenharmony_ci	unsigned short			CInfoFlag;
5118c2ecf20Sopenharmony_ci
5128c2ecf20Sopenharmony_ci	int				LVDSHL;
5138c2ecf20Sopenharmony_ci
5148c2ecf20Sopenharmony_ci	bool				Backup;
5158c2ecf20Sopenharmony_ci	unsigned char			Backup_Mode;
5168c2ecf20Sopenharmony_ci	unsigned char			Backup_14;
5178c2ecf20Sopenharmony_ci	unsigned char			Backup_15;
5188c2ecf20Sopenharmony_ci	unsigned char			Backup_16;
5198c2ecf20Sopenharmony_ci	unsigned char			Backup_17;
5208c2ecf20Sopenharmony_ci	unsigned char			Backup_18;
5218c2ecf20Sopenharmony_ci	unsigned char			Backup_19;
5228c2ecf20Sopenharmony_ci	unsigned char			Backup_1a;
5238c2ecf20Sopenharmony_ci	unsigned char			Backup_1b;
5248c2ecf20Sopenharmony_ci	unsigned char			Backup_1c;
5258c2ecf20Sopenharmony_ci	unsigned char			Backup_1d;
5268c2ecf20Sopenharmony_ci
5278c2ecf20Sopenharmony_ci	unsigned char			Init_P4_0E;
5288c2ecf20Sopenharmony_ci
5298c2ecf20Sopenharmony_ci	int				UsePanelScaler;
5308c2ecf20Sopenharmony_ci	int				CenterScreen;
5318c2ecf20Sopenharmony_ci
5328c2ecf20Sopenharmony_ci	unsigned short			CP_Vendor, CP_Product;
5338c2ecf20Sopenharmony_ci	bool				CP_HaveCustomData;
5348c2ecf20Sopenharmony_ci	int				CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
5358c2ecf20Sopenharmony_ci	int				CP_MaxX, CP_MaxY, CP_MaxClock;
5368c2ecf20Sopenharmony_ci	unsigned char			CP_PrefSR2B, CP_PrefSR2C;
5378c2ecf20Sopenharmony_ci	unsigned short			CP_PrefClock;
5388c2ecf20Sopenharmony_ci	bool				CP_Supports64048075;
5398c2ecf20Sopenharmony_ci	int				CP_HDisplay[7], CP_VDisplay[7];	/* For Custom LCD panel dimensions */
5408c2ecf20Sopenharmony_ci	int				CP_HTotal[7], CP_VTotal[7];
5418c2ecf20Sopenharmony_ci	int				CP_HSyncStart[7], CP_VSyncStart[7];
5428c2ecf20Sopenharmony_ci	int				CP_HSyncEnd[7], CP_VSyncEnd[7];
5438c2ecf20Sopenharmony_ci	int				CP_HBlankStart[7], CP_VBlankStart[7];
5448c2ecf20Sopenharmony_ci	int				CP_HBlankEnd[7], CP_VBlankEnd[7];
5458c2ecf20Sopenharmony_ci	int				CP_Clock[7];
5468c2ecf20Sopenharmony_ci	bool				CP_DataValid[7];
5478c2ecf20Sopenharmony_ci	bool				CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
5488c2ecf20Sopenharmony_ci};
5498c2ecf20Sopenharmony_ci
5508c2ecf20Sopenharmony_ci#endif
5518c2ecf20Sopenharmony_ci
552