162306a36Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * General structure definitions for universal mode switching modules 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * If distributed as part of the Linux kernel, the following license terms 862306a36Sopenharmony_ci * apply: 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * * This program is free software; you can redistribute it and/or modify 1162306a36Sopenharmony_ci * * it under the terms of the GNU General Public License as published by 1262306a36Sopenharmony_ci * * the Free Software Foundation; either version 2 of the named License, 1362306a36Sopenharmony_ci * * or any later version. 1462306a36Sopenharmony_ci * * 1562306a36Sopenharmony_ci * * This program is distributed in the hope that it will be useful, 1662306a36Sopenharmony_ci * * but WITHOUT ANY WARRANTY; without even the implied warranty of 1762306a36Sopenharmony_ci * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1862306a36Sopenharmony_ci * * GNU General Public License for more details. 1962306a36Sopenharmony_ci * * 2062306a36Sopenharmony_ci * * You should have received a copy of the GNU General Public License 2162306a36Sopenharmony_ci * * along with this program; if not, write to the Free Software 2262306a36Sopenharmony_ci * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci * Otherwise, the following license terms apply: 2562306a36Sopenharmony_ci * 2662306a36Sopenharmony_ci * * Redistribution and use in source and binary forms, with or without 2762306a36Sopenharmony_ci * * modification, are permitted provided that the following conditions 2862306a36Sopenharmony_ci * * are met: 2962306a36Sopenharmony_ci * * 1) Redistributions of source code must retain the above copyright 3062306a36Sopenharmony_ci * * notice, this list of conditions and the following disclaimer. 3162306a36Sopenharmony_ci * * 2) Redistributions in binary form must reproduce the above copyright 3262306a36Sopenharmony_ci * * notice, this list of conditions and the following disclaimer in the 3362306a36Sopenharmony_ci * * documentation and/or other materials provided with the distribution. 3462306a36Sopenharmony_ci * * 3) The name of the author may not be used to endorse or promote products 3562306a36Sopenharmony_ci * * derived from this software without specific prior written permission. 3662306a36Sopenharmony_ci * * 3762306a36Sopenharmony_ci * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 3862306a36Sopenharmony_ci * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 3962306a36Sopenharmony_ci * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 4062306a36Sopenharmony_ci * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 4162306a36Sopenharmony_ci * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 4262306a36Sopenharmony_ci * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 4362306a36Sopenharmony_ci * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 4462306a36Sopenharmony_ci * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 4562306a36Sopenharmony_ci * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 4662306a36Sopenharmony_ci * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 4762306a36Sopenharmony_ci * 4862306a36Sopenharmony_ci * Author: Thomas Winischhofer <thomas@winischhofer.net> 4962306a36Sopenharmony_ci * 5062306a36Sopenharmony_ci */ 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#ifndef _SISUSB_STRUCT_H_ 5362306a36Sopenharmony_ci#define _SISUSB_STRUCT_H_ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_cistruct SiS_St { 5662306a36Sopenharmony_ci unsigned char St_ModeID; 5762306a36Sopenharmony_ci unsigned short St_ModeFlag; 5862306a36Sopenharmony_ci unsigned char St_StTableIndex; 5962306a36Sopenharmony_ci unsigned char St_CRT2CRTC; 6062306a36Sopenharmony_ci unsigned char St_ResInfo; 6162306a36Sopenharmony_ci unsigned char VB_StTVFlickerIndex; 6262306a36Sopenharmony_ci unsigned char VB_StTVEdgeIndex; 6362306a36Sopenharmony_ci unsigned char VB_StTVYFilterIndex; 6462306a36Sopenharmony_ci unsigned char St_PDC; 6562306a36Sopenharmony_ci}; 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_cistruct SiS_StandTable { 6862306a36Sopenharmony_ci unsigned char CRT_COLS; 6962306a36Sopenharmony_ci unsigned char ROWS; 7062306a36Sopenharmony_ci unsigned char CHAR_HEIGHT; 7162306a36Sopenharmony_ci unsigned short CRT_LEN; 7262306a36Sopenharmony_ci unsigned char SR[4]; 7362306a36Sopenharmony_ci unsigned char MISC; 7462306a36Sopenharmony_ci unsigned char CRTC[0x19]; 7562306a36Sopenharmony_ci unsigned char ATTR[0x14]; 7662306a36Sopenharmony_ci unsigned char GRC[9]; 7762306a36Sopenharmony_ci}; 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_cistruct SiS_StResInfo_S { 8062306a36Sopenharmony_ci unsigned short HTotal; 8162306a36Sopenharmony_ci unsigned short VTotal; 8262306a36Sopenharmony_ci}; 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_cistruct SiS_Ext { 8562306a36Sopenharmony_ci unsigned char Ext_ModeID; 8662306a36Sopenharmony_ci unsigned short Ext_ModeFlag; 8762306a36Sopenharmony_ci unsigned short Ext_VESAID; 8862306a36Sopenharmony_ci unsigned char Ext_RESINFO; 8962306a36Sopenharmony_ci unsigned char VB_ExtTVFlickerIndex; 9062306a36Sopenharmony_ci unsigned char VB_ExtTVEdgeIndex; 9162306a36Sopenharmony_ci unsigned char VB_ExtTVYFilterIndex; 9262306a36Sopenharmony_ci unsigned char VB_ExtTVYFilterIndexROM661; 9362306a36Sopenharmony_ci unsigned char REFindex; 9462306a36Sopenharmony_ci signed char ROMMODEIDX661; 9562306a36Sopenharmony_ci}; 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_cistruct SiS_Ext2 { 9862306a36Sopenharmony_ci unsigned short Ext_InfoFlag; 9962306a36Sopenharmony_ci unsigned char Ext_CRT1CRTC; 10062306a36Sopenharmony_ci unsigned char Ext_CRTVCLK; 10162306a36Sopenharmony_ci unsigned char Ext_CRT2CRTC; 10262306a36Sopenharmony_ci unsigned char Ext_CRT2CRTC_NS; 10362306a36Sopenharmony_ci unsigned char ModeID; 10462306a36Sopenharmony_ci unsigned short XRes; 10562306a36Sopenharmony_ci unsigned short YRes; 10662306a36Sopenharmony_ci unsigned char Ext_PDC; 10762306a36Sopenharmony_ci unsigned char Ext_FakeCRT2CRTC; 10862306a36Sopenharmony_ci unsigned char Ext_FakeCRT2Clk; 10962306a36Sopenharmony_ci}; 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_cistruct SiS_CRT1Table { 11262306a36Sopenharmony_ci unsigned char CR[17]; 11362306a36Sopenharmony_ci}; 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_cistruct SiS_VCLKData { 11662306a36Sopenharmony_ci unsigned char SR2B, SR2C; 11762306a36Sopenharmony_ci unsigned short CLOCK; 11862306a36Sopenharmony_ci}; 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_cistruct SiS_ModeResInfo { 12162306a36Sopenharmony_ci unsigned short HTotal; 12262306a36Sopenharmony_ci unsigned short VTotal; 12362306a36Sopenharmony_ci unsigned char XChar; 12462306a36Sopenharmony_ci unsigned char YChar; 12562306a36Sopenharmony_ci}; 12662306a36Sopenharmony_ci 12762306a36Sopenharmony_cistruct SiS_Private { 12862306a36Sopenharmony_ci void *sisusb; 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci unsigned long IOAddress; 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ci unsigned long SiS_P3c4; 13362306a36Sopenharmony_ci unsigned long SiS_P3d4; 13462306a36Sopenharmony_ci unsigned long SiS_P3c0; 13562306a36Sopenharmony_ci unsigned long SiS_P3ce; 13662306a36Sopenharmony_ci unsigned long SiS_P3c2; 13762306a36Sopenharmony_ci unsigned long SiS_P3ca; 13862306a36Sopenharmony_ci unsigned long SiS_P3c6; 13962306a36Sopenharmony_ci unsigned long SiS_P3c7; 14062306a36Sopenharmony_ci unsigned long SiS_P3c8; 14162306a36Sopenharmony_ci unsigned long SiS_P3c9; 14262306a36Sopenharmony_ci unsigned long SiS_P3cb; 14362306a36Sopenharmony_ci unsigned long SiS_P3cc; 14462306a36Sopenharmony_ci unsigned long SiS_P3cd; 14562306a36Sopenharmony_ci unsigned long SiS_P3da; 14662306a36Sopenharmony_ci unsigned long SiS_Part1Port; 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci unsigned char SiS_MyCR63; 14962306a36Sopenharmony_ci unsigned short SiS_CRT1Mode; 15062306a36Sopenharmony_ci unsigned short SiS_ModeType; 15162306a36Sopenharmony_ci unsigned short SiS_SetFlag; 15262306a36Sopenharmony_ci 15362306a36Sopenharmony_ci const struct SiS_StandTable *SiS_StandTable; 15462306a36Sopenharmony_ci const struct SiS_St *SiS_SModeIDTable; 15562306a36Sopenharmony_ci const struct SiS_Ext *SiS_EModeIDTable; 15662306a36Sopenharmony_ci const struct SiS_Ext2 *SiS_RefIndex; 15762306a36Sopenharmony_ci const struct SiS_CRT1Table *SiS_CRT1Table; 15862306a36Sopenharmony_ci const struct SiS_VCLKData *SiS_VCLKData; 15962306a36Sopenharmony_ci const struct SiS_ModeResInfo *SiS_ModeResInfo; 16062306a36Sopenharmony_ci}; 16162306a36Sopenharmony_ci 16262306a36Sopenharmony_ci#endif 163