📄 init301.h
字号:
/* $XFree86$ *//* $XdotOrg$ *//* * Data and prototypes for init301.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 _INIT301_H_#define _INIT301_H_#include "osdef.h"#include "initdef.h"#ifdef SIS_XORG_XF86#include "sis.h"#include "sis_regs.h"#endif#ifdef SIS_LINUX_KERNEL#include "vgatypes.h"#include "vstruct.h"#ifdef SIS_CP#undef SIS_CP#endif#include <linux/config.h>#include <linux/version.h>#include <linux/types.h>#include <asm/io.h>#include <linux/fb.h>#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)#include <video/fbcon.h>#endif#include "sis.h"#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)#include <linux/sisfb.h>#else#include <video/sisfb.h>#endif#endifstatic const unsigned char SiS_YPbPrTable[3][64] = { { 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c, 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b, 0x0c,0x50,0x00,0x97,0x00,0xda,0x4a,0x17, 0x7d,0x05,0x4b,0x00,0x00,0xe2,0x00,0x02, 0x03,0x0a,0x65,0x9d /*0x8d*/,0x08,0x92,0x8f,0x40, 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x53 /*0x50*/, 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00 }, { 0x33,0x06,0x06,0x09,0x0b,0x0c,0x0c,0x0c, 0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, 0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4f,0x13, 0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8, 0x51,0x5e,0x60,0x49,0x7d,0x92,0x0f,0x40, 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x4e, 0x43,0x41,0x11,0x00,0xfc,0xff,0x32,0x00 }, {#if 0 /* OK, but sticks to left edge */ 0x13,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c, 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, 0xed,0x50,0x70,0x9f,0x16,0x59,0x21 /*0x2b*/,0x13, 0x27,0x0b,0x27,0xfc,0x30,0x27,0x1c,0xb0, 0x4b,0x4b,0x65 /*0x6f*/,0x2f,0x63,0x92,0x0f,0x40, 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x27, 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00#endif#if 1 /* Perfect */ 0x23,0x2d,0xe8,0x09,0x09,0xed,0x0c,0x0c, 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, 0xed,0x50,0x70,0x9f,0x16,0x59,0x60,0x13, 0x27,0x0b,0x27,0xfc,0x30,0x27,0x1c,0xb0, 0x4b,0x4b,0x6f,0x2f,0x63,0x92,0x0f,0x40, 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x73, 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00#endif }};static const unsigned char SiS_TVPhase[] ={ 0x21,0xED,0xBA,0x08, /* 0x00 SiS_NTSCPhase */ 0x2A,0x05,0xE3,0x00, /* 0x01 SiS_PALPhase */ 0x21,0xE4,0x2E,0x9B, /* 0x02 SiS_PALMPhase */ 0x21,0xF4,0x3E,0xBA, /* 0x03 SiS_PALNPhase */ 0x1E,0x8B,0xA2,0xA7, 0x1E,0x83,0x0A,0xE0, /* 0x05 SiS_SpecialPhaseM */ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x21,0xF0,0x7B,0xD6, /* 0x08 SiS_NTSCPhase2 */ 0x2A,0x09,0x86,0xE9, /* 0x09 SiS_PALPhase2 */ 0x21,0xE6,0xEF,0xA4, /* 0x0a SiS_PALMPhase2 */ 0x21,0xF6,0x94,0x46, /* 0x0b SiS_PALNPhase2 */ 0x1E,0x8B,0xA2,0xA7, 0x1E,0x83,0x0A,0xE0, /* 0x0d SiS_SpecialPhaseM */ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x1e,0x8c,0x5c,0x7a, /* 0x10 SiS_SpecialPhase */ 0x25,0xd4,0xfd,0x5e /* 0x11 SiS_SpecialPhaseJ */};static const unsigned char SiS_HiTVGroup3_1[] = { 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13, 0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6, 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, 0xac, 0xda, 0x60, 0xfe, 0x6a, 0x9a, 0x06, 0x10, 0xd1, 0x04, 0x18, 0x0a, 0xff, 0x80, 0x00, 0x80, 0x3b, 0x77, 0x00, 0xef, 0xe0, 0x10, 0xb0, 0xe0, 0x10, 0x4f, 0x0f, 0x0f, 0x05, 0x0f, 0x08, 0x6e, 0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01};static const unsigned char SiS_HiTVGroup3_2[] = { 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a, 0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6, 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, 0xac, 0x6a, 0x60, 0x2b, 0x52, 0xcd, 0x61, 0x10, 0x51, 0x04, 0x18, 0x0a, 0x1f, 0x80, 0x00, 0x80, 0xff, 0xa4, 0x04, 0x2b, 0x94, 0x21, 0x72, 0x94, 0x26, 0x05, 0x01, 0x0f, 0xed, 0x0f, 0x0a, 0x64, 0x18, 0x1d, 0x23, 0x28, 0x4c, 0xaa, 0x01};/* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */static const unsigned char SiS_Part2CLVX_1[] = { 0x00,0x00, 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, 0x7C,0x14,0x14,0x7C,0x7C,0x11,0x17,0x7C,0x7D,0x0E,0x19,0x7C,0x7E,0x0B,0x1B,0x7C, 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E};static const unsigned char SiS_Part2CLVX_2[] = { 0x00,0x00, 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, 0x7C,0x14,0x14,0x7C,0x7C,0x11,0x17,0x7C,0x7D,0x0E,0x19,0x7C,0x7E,0x0B,0x1B,0x7C, 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E};static const unsigned char SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */ 0xE0,0x01, 0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D,0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D, 0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C,0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C, 0x7D,0x13,0x13,0x7D,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x7D,0x7C,0x0E,0x18,0x7E, 0x7D,0x0C,0x19,0x7E,0x7D,0x0A,0x19,0x00,0x7D,0x08,0x1A,0x01,0x7E,0x06,0x1A,0x02, 0x58,0x02, 0x07,0x14,0x07,0x7E,0x06,0x14,0x09,0x7D,0x05,0x14,0x0A,0x7D,0x04,0x13,0x0B,0x7E, 0x03,0x13,0x0C,0x7E,0x02,0x12,0x0D,0x7F,0x01,0x12,0x0E,0x7F,0x01,0x11,0x0F,0x7F, 0x00,0x10,0x10,0x00,0x7F,0x0F,0x11,0x01,0x7F,0x0E,0x12,0x01,0x7E,0x0D,0x12,0x03, 0x7E,0x0C,0x13,0x03,0x7E,0x0B,0x13,0x04,0x7E,0x0A,0x14,0x04,0x7D,0x09,0x14,0x06, 0x00,0x03, 0x09,0x0F,0x09,0x7F,0x08,0x0F,0x09,0x00,0x07,0x0F,0x0A,0x00,0x06,0x0F,0x0A,0x01, 0x06,0x0E,0x0B,0x01,0x05,0x0E,0x0B,0x02,0x04,0x0E,0x0C,0x02,0x04,0x0D,0x0C,0x03, 0x03,0x0D,0x0D,0x03,0x02,0x0C,0x0D,0x05,0x02,0x0C,0x0E,0x04,0x01,0x0B,0x0E,0x06, 0x01,0x0B,0x0E,0x06,0x00,0x0A,0x0F,0x07,0x00,0x0A,0x0F,0x07,0x00,0x09,0x0F,0x08, 0xFF,0xFF};static const unsigned char SiS_Part2CLVX_4[] = { /* PAL */ 0x58,0x02, 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, 0x7D,0x13,0x13,0x7D,0x7D,0x11,0x14,0x7E,0x7D,0x0F,0x16,0x7E,0x7D,0x0E,0x17,0x7E, 0x7D,0x0C,0x18,0x7F,0x7D,0x0A,0x18,0x01,0x7D,0x08,0x19,0x02,0x7D,0x06,0x19,0x04, 0x00,0x03, 0x08,0x12,0x08,0x7E,0x07,0x12,0x09,0x7E,0x06,0x12,0x0A,0x7E,0x05,0x11,0x0B,0x7F, 0x04,0x11,0x0C,0x7F,0x03,0x11,0x0C,0x00,0x03,0x10,0x0D,0x00,0x02,0x0F,0x0E,0x01, 0x01,0x0F,0x0F,0x01,0x01,0x0E,0x0F,0x02,0x00,0x0D,0x10,0x03,0x7F,0x0C,0x11,0x04, 0x7F,0x0C,0x11,0x04,0x7F,0x0B,0x11,0x05,0x7E,0x0A,0x12,0x06,0x7E,0x09,0x12,0x07, 0x40,0x02, 0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D, 0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C, 0x7C,0x14,0x14,0x7C,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x7D,0x7C,0x0D,0x18,0x7F, 0x7D,0x0B,0x19,0x7F,0x7D,0x09,0x1A,0x00,0x7D,0x07,0x1A,0x02,0x7E,0x05,0x1B,0x02, 0xFF,0xFF};static const unsigned char SiS_Part2CLVX_5[] = { /* 750p */ 0x00,0x03, 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, 0x7D,0x13,0x13,0x7D,0x7D,0x11,0x14,0x7E,0x7D,0x0F,0x16,0x7E,0x7D,0x0E,0x17,0x7E, 0x7D,0x0C,0x18,0x7F,0x7D,0x0A,0x18,0x01,0x7D,0x08,0x19,0x02,0x7D,0x06,0x19,0x04, 0xFF,0xFF};static const unsigned char SiS_Part2CLVX_6[] = { /* 1080i */ 0x00,0x04, 0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D, 0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C, 0x7C,0x14,0x14,0x7C,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x7D,0x7C,0x0D,0x18,0x7F, 0x7D,0x0B,0x19,0x7F,0x7D,0x09,0x1A,0x00,0x7D,0x07,0x1A,0x02,0x7E,0x05,0x1B,0x02, 0xFF,0xFF,};#ifdef SIS315H/* 661 et al LCD data structure (2.03.00) */static const unsigned char SiS_LCDStruct661[] = { /* 1024x768 *//* type|CR37| HDE | VDE | HT | VT | hss | hse */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -