📄 sisusb_init.h
字号:
/* $XFree86$ *//* $XdotOrg$ *//* * Data and prototypes for init.c * * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria * * If distributed as part of the Linux kernel, the following license terms * apply: * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the named License, * * or any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Otherwise, the following license terms apply: * * * Redistribution and use in source and binary forms, with or without * * modification, are permitted provided that the following conditions * * are met: * * 1) Redistributions of source code must retain the above copyright * * notice, this list of conditions and the following disclaimer. * * 2) Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * 3) The name of the author may not be used to endorse or promote products * * derived from this software without specific prior written permission. * * * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Author: Thomas Winischhofer <thomas@winischhofer.net> * */#ifndef _SISUSB_INIT_H_#define _SISUSB_INIT_H_/* SiS_ModeType */#define ModeText 0x00#define ModeCGA 0x01#define ModeEGA 0x02#define ModeVGA 0x03#define Mode15Bpp 0x04#define Mode16Bpp 0x05#define Mode24Bpp 0x06#define Mode32Bpp 0x07#define ModeTypeMask 0x07#define IsTextMode 0x07#define DACInfoFlag 0x0018#define MemoryInfoFlag 0x01E0#define MemorySizeShift 5/* modeflag */#define Charx8Dot 0x0200#define LineCompareOff 0x0400#define CRT2Mode 0x0800#define HalfDCLK 0x1000#define NoSupportSimuTV 0x2000#define NoSupportLCDScale 0x4000 /* SiS bridge: No scaling possible (no matter what panel) */#define DoubleScanMode 0x8000/* Infoflag */#define SupportTV 0x0008#define SupportTV1024 0x0800#define SupportCHTV 0x0800#define Support64048060Hz 0x0800 /* Special for 640x480 LCD */#define SupportHiVision 0x0010#define SupportYPbPr750p 0x1000#define SupportLCD 0x0020#define SupportRAMDAC2 0x0040 /* All (<= 100Mhz) */#define SupportRAMDAC2_135 0x0100 /* All except DH (<= 135Mhz) */#define SupportRAMDAC2_162 0x0200 /* B, C (<= 162Mhz) */#define SupportRAMDAC2_202 0x0400 /* C (<= 202Mhz) */#define InterlaceMode 0x0080#define SyncPP 0x0000#define SyncPN 0x4000#define SyncNP 0x8000#define SyncNN 0xc000/* SetFlag */#define ProgrammingCRT2 0x0001#define LowModeTests 0x0002#define LCDVESATiming 0x0008#define EnableLVDSDDA 0x0010#define SetDispDevSwitchFlag 0x0020#define CheckWinDos 0x0040#define SetDOSMode 0x0080/* Index in ModeResInfo table */#define SIS_RI_320x200 0#define SIS_RI_320x240 1#define SIS_RI_320x400 2#define SIS_RI_400x300 3#define SIS_RI_512x384 4#define SIS_RI_640x400 5#define SIS_RI_640x480 6#define SIS_RI_800x600 7#define SIS_RI_1024x768 8#define SIS_RI_1280x1024 9#define SIS_RI_1600x1200 10#define SIS_RI_1920x1440 11#define SIS_RI_2048x1536 12#define SIS_RI_720x480 13#define SIS_RI_720x576 14#define SIS_RI_1280x960 15#define SIS_RI_800x480 16#define SIS_RI_1024x576 17#define SIS_RI_1280x720 18#define SIS_RI_856x480 19#define SIS_RI_1280x768 20#define SIS_RI_1400x1050 21#define SIS_RI_1152x864 22 /* Up to here SiS conforming */#define SIS_RI_848x480 23#define SIS_RI_1360x768 24#define SIS_RI_1024x600 25#define SIS_RI_1152x768 26#define SIS_RI_768x576 27#define SIS_RI_1360x1024 28#define SIS_RI_1680x1050 29#define SIS_RI_1280x800 30#define SIS_RI_1920x1080 31#define SIS_RI_960x540 32#define SIS_RI_960x600 33#define SIS_VIDEO_CAPTURE 0x00 - 0x30#define SIS_VIDEO_PLAYBACK 0x02 - 0x30#define SIS_CRT2_PORT_04 0x04 - 0x30/* Mode numbers */static const unsigned short ModeIndex_320x200[] = { 0x59, 0x41, 0x00, 0x4f };static const unsigned short ModeIndex_320x240[] = { 0x50, 0x56, 0x00, 0x53 };static const unsigned short ModeIndex_400x300[] = { 0x51, 0x57, 0x00, 0x54 };static const unsigned short ModeIndex_512x384[] = { 0x52, 0x58, 0x00, 0x5c };static const unsigned short ModeIndex_640x400[] = { 0x2f, 0x5d, 0x00, 0x5e };static const unsigned short ModeIndex_640x480[] = { 0x2e, 0x44, 0x00, 0x62 };static const unsigned short ModeIndex_720x480[] = { 0x31, 0x33, 0x00, 0x35 };static const unsigned short ModeIndex_720x576[] = { 0x32, 0x34, 0x00, 0x36 };static const unsigned short ModeIndex_768x576[] = { 0x5f, 0x60, 0x00, 0x61 };static const unsigned short ModeIndex_800x480[] = { 0x70, 0x7a, 0x00, 0x76 };static const unsigned short ModeIndex_800x600[] = { 0x30, 0x47, 0x00, 0x63 };static const unsigned short ModeIndex_848x480[] = { 0x39, 0x3b, 0x00, 0x3e };static const unsigned short ModeIndex_856x480[] = { 0x3f, 0x42, 0x00, 0x45 };static const unsigned short ModeIndex_960x540[] = { 0x1d, 0x1e, 0x00, 0x1f };static const unsigned short ModeIndex_960x600[] = { 0x20, 0x21, 0x00, 0x22 };static const unsigned short ModeIndex_1024x768[] = { 0x38, 0x4a, 0x00, 0x64 };static const unsigned short ModeIndex_1024x576[] = { 0x71, 0x74, 0x00, 0x77 };static const unsigned short ModeIndex_1152x864[] = { 0x29, 0x2a, 0x00, 0x2b };static const unsigned short ModeIndex_1280x720[] = { 0x79, 0x75, 0x00, 0x78 };static const unsigned short ModeIndex_1280x768[] = { 0x23, 0x24, 0x00, 0x25 };static const unsigned short ModeIndex_1280x1024[] = { 0x3a, 0x4d, 0x00, 0x65 };static const unsigned char SiS_MDA_DAC[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F};static const unsigned char SiS_CGA_DAC[] = { 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F};static const unsigned char SiS_EGA_DAC[] = { 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x05, 0x15, 0x20, 0x30, 0x24, 0x34, 0x21, 0x31, 0x25, 0x35, 0x08, 0x18, 0x0C, 0x1C, 0x09, 0x19, 0x0D, 0x1D, 0x28, 0x38, 0x2C, 0x3C, 0x29, 0x39, 0x2D, 0x3D, 0x02, 0x12, 0x06, 0x16, 0x03, 0x13, 0x07, 0x17, 0x22, 0x32, 0x26, 0x36, 0x23, 0x33, 0x27, 0x37, 0x0A, 0x1A, 0x0E, 0x1E, 0x0B, 0x1B, 0x0F, 0x1F, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F};static const unsigned char SiS_VGA_DAC[] = { 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x00, 0x05, 0x08, 0x0B, 0x0E, 0x11, 0x14, 0x18, 0x1C, 0x20, 0x24, 0x28, 0x2D, 0x32, 0x38, 0x3F, 0x00, 0x10, 0x1F, 0x2F, 0x3F, 0x1F, 0x27, 0x2F, 0x37, 0x3F, 0x2D, 0x31, 0x36, 0x3A, 0x3F, 0x00, 0x07, 0x0E, 0x15, 0x1C, 0x0E, 0x11, 0x15, 0x18, 0x1C, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x00, 0x04, 0x08, 0x0C, 0x10, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x0B, 0x0C, 0x0D, 0x0F, 0x10};static const struct SiS_St SiSUSB_SModeIDTable[] = { {0x03, 0x0010, 0x18, 0x02, 0x02, 0x00, 0x01, 0x03, 0x40}, {0xff, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};static const struct SiS_StResInfo_S SiSUSB_StResInfo[] = { {640, 400}, {640, 350}, {720, 400}, {720, 350}, {640, 480}};static const struct SiS_ModeResInfo SiSUSB_ModeResInfo[] = { {320, 200, 8, 8}, /* 0x00 */ {320, 240, 8, 8}, /* 0x01 */ {320, 400, 8, 8}, /* 0x02 */ {400, 300, 8, 8}, /* 0x03 */ {512, 384, 8, 8}, /* 0x04 */ {640, 400, 8, 16}, /* 0x05 */ {640, 480, 8, 16}, /* 0x06 */ {800, 600, 8, 16}, /* 0x07 */ {1024, 768, 8, 16}, /* 0x08 */ {1280, 1024, 8, 16}, /* 0x09 */ {1600, 1200, 8, 16}, /* 0x0a */ {1920, 1440, 8, 16}, /* 0x0b */ {2048, 1536, 8, 16}, /* 0x0c */ {720, 480, 8, 16}, /* 0x0d */ {720, 576, 8, 16}, /* 0x0e */ {1280, 960, 8, 16}, /* 0x0f */ {800, 480, 8, 16}, /* 0x10 */ {1024, 576, 8, 16}, /* 0x11 */ {1280, 720, 8, 16}, /* 0x12 */ {856, 480, 8, 16}, /* 0x13 */ {1280, 768, 8, 16}, /* 0x14 */ {1400, 1050, 8, 16}, /* 0x15 */ {1152, 864, 8, 16}, /* 0x16 */ {848, 480, 8, 16}, /* 0x17 */ {1360, 768, 8, 16}, /* 0x18 */ {1024, 600, 8, 16}, /* 0x19 */ {1152, 768, 8, 16}, /* 0x1a */ {768, 576, 8, 16}, /* 0x1b */ {1360, 1024, 8, 16}, /* 0x1c */ {1680, 1050, 8, 16}, /* 0x1d */ {1280, 800, 8, 16}, /* 0x1e */ {1920, 1080, 8, 16}, /* 0x1f */ {960, 540, 8, 16}, /* 0x20 */ {960, 600, 8, 16} /* 0x21 */};static const struct SiS_StandTable SiSUSB_StandTable[] = { /* MD_3_400 - mode 0x03 - 400 */ { 0x50, 0x18, 0x10, 0x1000, {0x00, 0x03, 0x00, 0x02}, 0x67, {0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3, 0xff}, {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x0c, 0x00, 0x0f, 0x08}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -