1 /* 2 * General structure definitions for universal mode switching modules 3 * 4 * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria 5 * 6 * If distributed as part of the Linux kernel, the following license terms 7 * apply: 8 * 9 * * This program is free software; you can redistribute it and/or modify 10 * * it under the terms of the GNU General Public License as published by 11 * * the Free Software Foundation; either version 2 of the named License, 12 * * or any later version. 13 * * 14 * * This program is distributed in the hope that it will be useful, 15 * * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * * GNU General Public License for more details. 18 * * 19 * * You should have received a copy of the GNU General Public License 20 * * along with this program; if not, write to the Free Software 21 * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 22 * 23 * Otherwise, the following license terms apply: 24 * 25 * * Redistribution and use in source and binary forms, with or without 26 * * modification, are permitted provided that the following conditions 27 * * are met: 28 * * 1) Redistributions of source code must retain the above copyright 29 * * notice, this list of conditions and the following disclaimer. 30 * * 2) Redistributions in binary form must reproduce the above copyright 31 * * notice, this list of conditions and the following disclaimer in the 32 * * documentation and/or other materials provided with the distribution. 33 * * 3) The name of the author may not be used to endorse or promote products 34 * * derived from this software without specific prior written permission. 35 * * 36 * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 37 * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 38 * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 39 * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 40 * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 41 * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 45 * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 46 * 47 * Author: Thomas Winischhofer <thomas@winischhofer.net> 48 * 49 */ 50 51 #ifndef _SISUSB_STRUCT_H_ 52 #define _SISUSB_STRUCT_H_ 53 54 struct SiS_St { 55 unsigned char St_ModeID; 56 unsigned short St_ModeFlag; 57 unsigned char St_StTableIndex; 58 unsigned char St_CRT2CRTC; 59 unsigned char St_ResInfo; 60 unsigned char VB_StTVFlickerIndex; 61 unsigned char VB_StTVEdgeIndex; 62 unsigned char VB_StTVYFilterIndex; 63 unsigned char St_PDC; 64 }; 65 66 struct SiS_StandTable { 67 unsigned char CRT_COLS; 68 unsigned char ROWS; 69 unsigned char CHAR_HEIGHT; 70 unsigned short CRT_LEN; 71 unsigned char SR[4]; 72 unsigned char MISC; 73 unsigned char CRTC[0x19]; 74 unsigned char ATTR[0x14]; 75 unsigned char GRC[9]; 76 }; 77 78 struct SiS_StResInfo_S { 79 unsigned short HTotal; 80 unsigned short VTotal; 81 }; 82 83 struct SiS_Ext { 84 unsigned char Ext_ModeID; 85 unsigned short Ext_ModeFlag; 86 unsigned short Ext_VESAID; 87 unsigned char Ext_RESINFO; 88 unsigned char VB_ExtTVFlickerIndex; 89 unsigned char VB_ExtTVEdgeIndex; 90 unsigned char VB_ExtTVYFilterIndex; 91 unsigned char VB_ExtTVYFilterIndexROM661; 92 unsigned char REFindex; 93 char ROMMODEIDX661; 94 }; 95 96 struct SiS_Ext2 { 97 unsigned short Ext_InfoFlag; 98 unsigned char Ext_CRT1CRTC; 99 unsigned char Ext_CRTVCLK; 100 unsigned char Ext_CRT2CRTC; 101 unsigned char Ext_CRT2CRTC_NS; 102 unsigned char ModeID; 103 unsigned short XRes; 104 unsigned short YRes; 105 unsigned char Ext_PDC; 106 unsigned char Ext_FakeCRT2CRTC; 107 unsigned char Ext_FakeCRT2Clk; 108 }; 109 110 struct SiS_CRT1Table { 111 unsigned char CR[17]; 112 }; 113 114 struct SiS_VCLKData { 115 unsigned char SR2B, SR2C; 116 unsigned short CLOCK; 117 }; 118 119 struct SiS_ModeResInfo { 120 unsigned short HTotal; 121 unsigned short VTotal; 122 unsigned char XChar; 123 unsigned char YChar; 124 }; 125 126 struct SiS_Private { 127 void *sisusb; 128 129 unsigned long IOAddress; 130 131 unsigned long SiS_P3c4; 132 unsigned long SiS_P3d4; 133 unsigned long SiS_P3c0; 134 unsigned long SiS_P3ce; 135 unsigned long SiS_P3c2; 136 unsigned long SiS_P3ca; 137 unsigned long SiS_P3c6; 138 unsigned long SiS_P3c7; 139 unsigned long SiS_P3c8; 140 unsigned long SiS_P3c9; 141 unsigned long SiS_P3cb; 142 unsigned long SiS_P3cc; 143 unsigned long SiS_P3cd; 144 unsigned long SiS_P3da; 145 unsigned long SiS_Part1Port; 146 147 unsigned char SiS_MyCR63; 148 unsigned short SiS_CRT1Mode; 149 unsigned short SiS_ModeType; 150 unsigned short SiS_SetFlag; 151 152 const struct SiS_StandTable *SiS_StandTable; 153 const struct SiS_St *SiS_SModeIDTable; 154 const struct SiS_Ext *SiS_EModeIDTable; 155 const struct SiS_Ext2 *SiS_RefIndex; 156 const struct SiS_CRT1Table *SiS_CRT1Table; 157 const struct SiS_VCLKData *SiS_VCLKData; 158 const struct SiS_ModeResInfo *SiS_ModeResInfo; 159 }; 160 161 #endif 162