Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
0002 /*
0003  * General structure definitions for universal mode switching modules
0004  *
0005  * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
0006  *
0007  * If distributed as part of the Linux kernel, the following license terms
0008  * apply:
0009  *
0010  * * This program is free software; you can redistribute it and/or modify
0011  * * it under the terms of the GNU General Public License as published by
0012  * * the Free Software Foundation; either version 2 of the named License,
0013  * * or any later version.
0014  * *
0015  * * This program is distributed in the hope that it will be useful,
0016  * * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0018  * * GNU General Public License for more details.
0019  * *
0020  * * You should have received a copy of the GNU General Public License
0021  * * along with this program; if not, write to the Free Software
0022  * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
0023  *
0024  * Otherwise, the following license terms apply:
0025  *
0026  * * Redistribution and use in source and binary forms, with or without
0027  * * modification, are permitted provided that the following conditions
0028  * * are met:
0029  * * 1) Redistributions of source code must retain the above copyright
0030  * *    notice, this list of conditions and the following disclaimer.
0031  * * 2) Redistributions in binary form must reproduce the above copyright
0032  * *    notice, this list of conditions and the following disclaimer in the
0033  * *    documentation and/or other materials provided with the distribution.
0034  * * 3) The name of the author may not be used to endorse or promote products
0035  * *    derived from this software without specific prior written permission.
0036  * *
0037  * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
0038  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0039  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
0040  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
0041  * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
0042  * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0043  * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0044  * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0045  * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
0046  * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0047  *
0048  * Author:  Thomas Winischhofer <thomas@winischhofer.net>
0049  *
0050  */
0051 
0052 #ifndef _SISUSB_STRUCT_H_
0053 #define _SISUSB_STRUCT_H_
0054 
0055 struct SiS_St {
0056     unsigned char St_ModeID;
0057     unsigned short St_ModeFlag;
0058     unsigned char St_StTableIndex;
0059     unsigned char St_CRT2CRTC;
0060     unsigned char St_ResInfo;
0061     unsigned char VB_StTVFlickerIndex;
0062     unsigned char VB_StTVEdgeIndex;
0063     unsigned char VB_StTVYFilterIndex;
0064     unsigned char St_PDC;
0065 };
0066 
0067 struct SiS_StandTable {
0068     unsigned char CRT_COLS;
0069     unsigned char ROWS;
0070     unsigned char CHAR_HEIGHT;
0071     unsigned short CRT_LEN;
0072     unsigned char SR[4];
0073     unsigned char MISC;
0074     unsigned char CRTC[0x19];
0075     unsigned char ATTR[0x14];
0076     unsigned char GRC[9];
0077 };
0078 
0079 struct SiS_StResInfo_S {
0080     unsigned short HTotal;
0081     unsigned short VTotal;
0082 };
0083 
0084 struct SiS_Ext {
0085     unsigned char Ext_ModeID;
0086     unsigned short Ext_ModeFlag;
0087     unsigned short Ext_VESAID;
0088     unsigned char Ext_RESINFO;
0089     unsigned char VB_ExtTVFlickerIndex;
0090     unsigned char VB_ExtTVEdgeIndex;
0091     unsigned char VB_ExtTVYFilterIndex;
0092     unsigned char VB_ExtTVYFilterIndexROM661;
0093     unsigned char REFindex;
0094     char ROMMODEIDX661;
0095 };
0096 
0097 struct SiS_Ext2 {
0098     unsigned short Ext_InfoFlag;
0099     unsigned char Ext_CRT1CRTC;
0100     unsigned char Ext_CRTVCLK;
0101     unsigned char Ext_CRT2CRTC;
0102     unsigned char Ext_CRT2CRTC_NS;
0103     unsigned char ModeID;
0104     unsigned short XRes;
0105     unsigned short YRes;
0106     unsigned char Ext_PDC;
0107     unsigned char Ext_FakeCRT2CRTC;
0108     unsigned char Ext_FakeCRT2Clk;
0109 };
0110 
0111 struct SiS_CRT1Table {
0112     unsigned char CR[17];
0113 };
0114 
0115 struct SiS_VCLKData {
0116     unsigned char SR2B, SR2C;
0117     unsigned short CLOCK;
0118 };
0119 
0120 struct SiS_ModeResInfo {
0121     unsigned short HTotal;
0122     unsigned short VTotal;
0123     unsigned char XChar;
0124     unsigned char YChar;
0125 };
0126 
0127 struct SiS_Private {
0128     void *sisusb;
0129 
0130     unsigned long IOAddress;
0131 
0132     unsigned long SiS_P3c4;
0133     unsigned long SiS_P3d4;
0134     unsigned long SiS_P3c0;
0135     unsigned long SiS_P3ce;
0136     unsigned long SiS_P3c2;
0137     unsigned long SiS_P3ca;
0138     unsigned long SiS_P3c6;
0139     unsigned long SiS_P3c7;
0140     unsigned long SiS_P3c8;
0141     unsigned long SiS_P3c9;
0142     unsigned long SiS_P3cb;
0143     unsigned long SiS_P3cc;
0144     unsigned long SiS_P3cd;
0145     unsigned long SiS_P3da;
0146     unsigned long SiS_Part1Port;
0147 
0148     unsigned char SiS_MyCR63;
0149     unsigned short SiS_CRT1Mode;
0150     unsigned short SiS_ModeType;
0151     unsigned short SiS_SetFlag;
0152 
0153     const struct SiS_StandTable *SiS_StandTable;
0154     const struct SiS_St *SiS_SModeIDTable;
0155     const struct SiS_Ext *SiS_EModeIDTable;
0156     const struct SiS_Ext2 *SiS_RefIndex;
0157     const struct SiS_CRT1Table *SiS_CRT1Table;
0158     const struct SiS_VCLKData *SiS_VCLKData;
0159     const struct SiS_ModeResInfo *SiS_ModeResInfo;
0160 };
0161 
0162 #endif