18c2ecf20Sopenharmony_ci/* $XFree86$ */ 28c2ecf20Sopenharmony_ci/* $XdotOrg$ */ 38c2ecf20Sopenharmony_ci/* 48c2ecf20Sopenharmony_ci * Global definitions for init.c and init301.c 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * If distributed as part of the Linux kernel, the following license terms 98c2ecf20Sopenharmony_ci * apply: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * * This program is free software; you can redistribute it and/or modify 128c2ecf20Sopenharmony_ci * * it under the terms of the GNU General Public License as published by 138c2ecf20Sopenharmony_ci * * the Free Software Foundation; either version 2 of the named License, 148c2ecf20Sopenharmony_ci * * or any later version. 158c2ecf20Sopenharmony_ci * * 168c2ecf20Sopenharmony_ci * * This program is distributed in the hope that it will be useful, 178c2ecf20Sopenharmony_ci * * but WITHOUT ANY WARRANTY; without even the implied warranty of 188c2ecf20Sopenharmony_ci * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 198c2ecf20Sopenharmony_ci * * GNU General Public License for more details. 208c2ecf20Sopenharmony_ci * * 218c2ecf20Sopenharmony_ci * * You should have received a copy of the GNU General Public License 228c2ecf20Sopenharmony_ci * * along with this program; if not, write to the Free Software 238c2ecf20Sopenharmony_ci * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 248c2ecf20Sopenharmony_ci * 258c2ecf20Sopenharmony_ci * Otherwise, the following license terms apply: 268c2ecf20Sopenharmony_ci * 278c2ecf20Sopenharmony_ci * * Redistribution and use in source and binary forms, with or without 288c2ecf20Sopenharmony_ci * * modification, are permitted provided that the following conditions 298c2ecf20Sopenharmony_ci * * are met: 308c2ecf20Sopenharmony_ci * * 1) Redistributions of source code must retain the above copyright 318c2ecf20Sopenharmony_ci * * notice, this list of conditions and the following disclaimer. 328c2ecf20Sopenharmony_ci * * 2) Redistributions in binary form must reproduce the above copyright 338c2ecf20Sopenharmony_ci * * notice, this list of conditions and the following disclaimer in the 348c2ecf20Sopenharmony_ci * * documentation and/or other materials provided with the distribution. 358c2ecf20Sopenharmony_ci * * 3) The name of the author may not be used to endorse or promote products 368c2ecf20Sopenharmony_ci * * derived from this software without specific prior written permission. 378c2ecf20Sopenharmony_ci * * 388c2ecf20Sopenharmony_ci * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 398c2ecf20Sopenharmony_ci * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 408c2ecf20Sopenharmony_ci * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 418c2ecf20Sopenharmony_ci * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 428c2ecf20Sopenharmony_ci * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 438c2ecf20Sopenharmony_ci * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 448c2ecf20Sopenharmony_ci * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 458c2ecf20Sopenharmony_ci * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 468c2ecf20Sopenharmony_ci * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 478c2ecf20Sopenharmony_ci * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 488c2ecf20Sopenharmony_ci * 498c2ecf20Sopenharmony_ci * Author: Thomas Winischhofer <thomas@winischhofer.net> 508c2ecf20Sopenharmony_ci * 518c2ecf20Sopenharmony_ci */ 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#ifndef _INITDEF_ 548c2ecf20Sopenharmony_ci#define _INITDEF_ 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci#define IS_SIS330 (SiS_Pr->ChipType == SIS_330) 578c2ecf20Sopenharmony_ci#define IS_SIS550 (SiS_Pr->ChipType == SIS_550) 588c2ecf20Sopenharmony_ci#define IS_SIS650 (SiS_Pr->ChipType == SIS_650) /* All versions, incl 651, M65x */ 598c2ecf20Sopenharmony_ci#define IS_SIS740 (SiS_Pr->ChipType == SIS_740) 608c2ecf20Sopenharmony_ci#define IS_SIS651 (SiS_Pr->SiS_SysFlags & (SF_Is651 | SF_Is652)) 618c2ecf20Sopenharmony_ci#define IS_SISM650 (SiS_Pr->SiS_SysFlags & (SF_IsM650 | SF_IsM652 | SF_IsM653)) 628c2ecf20Sopenharmony_ci#define IS_SIS65x (IS_SIS651 || IS_SISM650) /* Only special versions of 65x */ 638c2ecf20Sopenharmony_ci#define IS_SIS661 (SiS_Pr->ChipType == SIS_661) 648c2ecf20Sopenharmony_ci#define IS_SIS741 (SiS_Pr->ChipType == SIS_741) 658c2ecf20Sopenharmony_ci#define IS_SIS660 (SiS_Pr->ChipType == SIS_660) 668c2ecf20Sopenharmony_ci#define IS_SIS760 (SiS_Pr->ChipType == SIS_760) 678c2ecf20Sopenharmony_ci#define IS_SIS761 (SiS_Pr->ChipType == SIS_761) 688c2ecf20Sopenharmony_ci#define IS_SIS661741660760 (IS_SIS661 || IS_SIS741 || IS_SIS660 || IS_SIS760 || IS_SIS761) 698c2ecf20Sopenharmony_ci#define IS_SIS650740 ((SiS_Pr->ChipType >= SIS_650) && (SiS_Pr->ChipType < SIS_330)) 708c2ecf20Sopenharmony_ci#define IS_SIS550650740 (IS_SIS550 || IS_SIS650740) 718c2ecf20Sopenharmony_ci#define IS_SIS650740660 (IS_SIS650 || IS_SIS740 || IS_SIS661741660760) 728c2ecf20Sopenharmony_ci#define IS_SIS550650740660 (IS_SIS550 || IS_SIS650740660) 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci#define SISGETROMW(x) (ROMAddr[(x)] | (ROMAddr[(x)+1] << 8)) 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci/* SiS_VBType */ 778c2ecf20Sopenharmony_ci#define VB_SIS301 0x0001 788c2ecf20Sopenharmony_ci#define VB_SIS301B 0x0002 798c2ecf20Sopenharmony_ci#define VB_SIS302B 0x0004 808c2ecf20Sopenharmony_ci#define VB_SIS301LV 0x0008 818c2ecf20Sopenharmony_ci#define VB_SIS302LV 0x0010 828c2ecf20Sopenharmony_ci#define VB_SIS302ELV 0x0020 838c2ecf20Sopenharmony_ci#define VB_SIS301C 0x0040 848c2ecf20Sopenharmony_ci#define VB_SIS307T 0x0080 858c2ecf20Sopenharmony_ci#define VB_SIS307LV 0x0100 868c2ecf20Sopenharmony_ci#define VB_UMC 0x4000 878c2ecf20Sopenharmony_ci#define VB_NoLCD 0x8000 888c2ecf20Sopenharmony_ci#define VB_SIS30xB (VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T) 898c2ecf20Sopenharmony_ci#define VB_SIS30xC (VB_SIS301C | VB_SIS307T) 908c2ecf20Sopenharmony_ci#define VB_SISTMDS (VB_SIS301 | VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T) 918c2ecf20Sopenharmony_ci#define VB_SISLVDS (VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV) 928c2ecf20Sopenharmony_ci#define VB_SIS30xBLV (VB_SIS30xB | VB_SISLVDS) 938c2ecf20Sopenharmony_ci#define VB_SIS30xCLV (VB_SIS30xC | VB_SIS302ELV | VB_SIS307LV) 948c2ecf20Sopenharmony_ci#define VB_SISVB (VB_SIS301 | VB_SIS30xBLV) 958c2ecf20Sopenharmony_ci#define VB_SISLCDA (VB_SIS302B | VB_SIS301C | VB_SIS307T | VB_SISLVDS) 968c2ecf20Sopenharmony_ci#define VB_SISTMDSLCDA (VB_SIS301C | VB_SIS307T) 978c2ecf20Sopenharmony_ci#define VB_SISPART4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV) 988c2ecf20Sopenharmony_ci#define VB_SISHIVISION (VB_SIS301 | VB_SIS301B | VB_SIS302B) 998c2ecf20Sopenharmony_ci#define VB_SISYPBPR (VB_SIS301C | VB_SIS307T | VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV) 1008c2ecf20Sopenharmony_ci#define VB_SISTAP4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV) 1018c2ecf20Sopenharmony_ci#define VB_SISPART4OVERFLOW (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV) 1028c2ecf20Sopenharmony_ci#define VB_SISPWD (VB_SIS301C | VB_SIS307T | VB_SISLVDS) 1038c2ecf20Sopenharmony_ci#define VB_SISEMI (VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV) 1048c2ecf20Sopenharmony_ci#define VB_SISPOWER (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV) 1058c2ecf20Sopenharmony_ci#define VB_SISDUALLINK (VB_SIS302LV | VB_SIS302ELV | VB_SIS307T | VB_SIS307LV) 1068c2ecf20Sopenharmony_ci#define VB_SISVGA2 VB_SISTMDS 1078c2ecf20Sopenharmony_ci#define VB_SISRAMDAC202 (VB_SIS301C | VB_SIS307T) 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci/* VBInfo */ 1108c2ecf20Sopenharmony_ci#define SetSimuScanMode 0x0001 /* CR 30 */ 1118c2ecf20Sopenharmony_ci#define SwitchCRT2 0x0002 1128c2ecf20Sopenharmony_ci#define SetCRT2ToAVIDEO 0x0004 1138c2ecf20Sopenharmony_ci#define SetCRT2ToSVIDEO 0x0008 1148c2ecf20Sopenharmony_ci#define SetCRT2ToSCART 0x0010 1158c2ecf20Sopenharmony_ci#define SetCRT2ToLCD 0x0020 1168c2ecf20Sopenharmony_ci#define SetCRT2ToRAMDAC 0x0040 1178c2ecf20Sopenharmony_ci#define SetCRT2ToHiVision 0x0080 /* for SiS bridge */ 1188c2ecf20Sopenharmony_ci#define SetCRT2ToCHYPbPr SetCRT2ToHiVision /* for Chrontel */ 1198c2ecf20Sopenharmony_ci#define SetNTSCTV 0x0000 /* CR 31 */ 1208c2ecf20Sopenharmony_ci#define SetPALTV 0x0100 /* Deprecated here, now in TVMode */ 1218c2ecf20Sopenharmony_ci#define SetInSlaveMode 0x0200 1228c2ecf20Sopenharmony_ci#define SetNotSimuMode 0x0400 1238c2ecf20Sopenharmony_ci#define SetNotSimuTVMode SetNotSimuMode 1248c2ecf20Sopenharmony_ci#define SetDispDevSwitch 0x0800 1258c2ecf20Sopenharmony_ci#define SetCRT2ToYPbPr525750 0x0800 1268c2ecf20Sopenharmony_ci#define LoadDACFlag 0x1000 1278c2ecf20Sopenharmony_ci#define DisableCRT2Display 0x2000 1288c2ecf20Sopenharmony_ci#define DriverMode 0x4000 1298c2ecf20Sopenharmony_ci#define HotKeySwitch 0x8000 1308c2ecf20Sopenharmony_ci#define SetCRT2ToLCDA 0x8000 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci/* v-- Needs change in sis_vga.c if changed (GPIO) --v */ 1338c2ecf20Sopenharmony_ci#define SetCRT2ToTV (SetCRT2ToYPbPr525750|SetCRT2ToHiVision|SetCRT2ToSCART|SetCRT2ToSVIDEO|SetCRT2ToAVIDEO) 1348c2ecf20Sopenharmony_ci#define SetCRT2ToTVNoYPbPrHiVision (SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO) 1358c2ecf20Sopenharmony_ci#define SetCRT2ToTVNoHiVision (SetCRT2ToYPbPr525750 | SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO) 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci/* SiS_ModeType */ 1388c2ecf20Sopenharmony_ci#define ModeText 0x00 1398c2ecf20Sopenharmony_ci#define ModeCGA 0x01 1408c2ecf20Sopenharmony_ci#define ModeEGA 0x02 1418c2ecf20Sopenharmony_ci#define ModeVGA 0x03 1428c2ecf20Sopenharmony_ci#define Mode15Bpp 0x04 1438c2ecf20Sopenharmony_ci#define Mode16Bpp 0x05 1448c2ecf20Sopenharmony_ci#define Mode24Bpp 0x06 1458c2ecf20Sopenharmony_ci#define Mode32Bpp 0x07 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci#define ModeTypeMask 0x07 1488c2ecf20Sopenharmony_ci#define IsTextMode 0x07 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci#define DACInfoFlag 0x0018 1518c2ecf20Sopenharmony_ci#define MemoryInfoFlag 0x01E0 1528c2ecf20Sopenharmony_ci#define MemorySizeShift 5 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ci/* modeflag */ 1558c2ecf20Sopenharmony_ci#define Charx8Dot 0x0200 1568c2ecf20Sopenharmony_ci#define LineCompareOff 0x0400 1578c2ecf20Sopenharmony_ci#define CRT2Mode 0x0800 1588c2ecf20Sopenharmony_ci#define HalfDCLK 0x1000 1598c2ecf20Sopenharmony_ci#define NoSupportSimuTV 0x2000 1608c2ecf20Sopenharmony_ci#define NoSupportLCDScale 0x4000 /* SiS bridge: No scaling possible (no matter what panel) */ 1618c2ecf20Sopenharmony_ci#define DoubleScanMode 0x8000 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci/* Infoflag */ 1648c2ecf20Sopenharmony_ci#define SupportTV 0x0008 1658c2ecf20Sopenharmony_ci#define SupportTV1024 0x0800 1668c2ecf20Sopenharmony_ci#define SupportCHTV 0x0800 1678c2ecf20Sopenharmony_ci#define Support64048060Hz 0x0800 /* Special for 640x480 LCD */ 1688c2ecf20Sopenharmony_ci#define SupportHiVision 0x0010 1698c2ecf20Sopenharmony_ci#define SupportYPbPr750p 0x1000 1708c2ecf20Sopenharmony_ci#define SupportLCD 0x0020 1718c2ecf20Sopenharmony_ci#define SupportRAMDAC2 0x0040 /* All (<= 100Mhz) */ 1728c2ecf20Sopenharmony_ci#define SupportRAMDAC2_135 0x0100 /* All except DH (<= 135Mhz) */ 1738c2ecf20Sopenharmony_ci#define SupportRAMDAC2_162 0x0200 /* B, C (<= 162Mhz) */ 1748c2ecf20Sopenharmony_ci#define SupportRAMDAC2_202 0x0400 /* C (<= 202Mhz) */ 1758c2ecf20Sopenharmony_ci#define InterlaceMode 0x0080 1768c2ecf20Sopenharmony_ci#define SyncPP 0x0000 1778c2ecf20Sopenharmony_ci#define HaveWideTiming 0x2000 /* Have specific wide- and non-wide timing */ 1788c2ecf20Sopenharmony_ci#define SyncPN 0x4000 1798c2ecf20Sopenharmony_ci#define SyncNP 0x8000 1808c2ecf20Sopenharmony_ci#define SyncNN 0xc000 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ci/* SetFlag */ 1838c2ecf20Sopenharmony_ci#define ProgrammingCRT2 0x0001 1848c2ecf20Sopenharmony_ci#define LowModeTests 0x0002 1858c2ecf20Sopenharmony_ci/* #define TVSimuMode 0x0002 - deprecated */ 1868c2ecf20Sopenharmony_ci/* #define RPLLDIV2XO 0x0004 - deprecated */ 1878c2ecf20Sopenharmony_ci#define LCDVESATiming 0x0008 1888c2ecf20Sopenharmony_ci#define EnableLVDSDDA 0x0010 1898c2ecf20Sopenharmony_ci#define SetDispDevSwitchFlag 0x0020 1908c2ecf20Sopenharmony_ci#define CheckWinDos 0x0040 1918c2ecf20Sopenharmony_ci#define SetDOSMode 0x0080 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_ci/* TVMode flag */ 1948c2ecf20Sopenharmony_ci#define TVSetPAL 0x0001 1958c2ecf20Sopenharmony_ci#define TVSetNTSCJ 0x0002 1968c2ecf20Sopenharmony_ci#define TVSetPALM 0x0004 1978c2ecf20Sopenharmony_ci#define TVSetPALN 0x0008 1988c2ecf20Sopenharmony_ci#define TVSetCHOverScan 0x0010 1998c2ecf20Sopenharmony_ci#define TVSetYPbPr525i 0x0020 /* new 0x10 */ 2008c2ecf20Sopenharmony_ci#define TVSetYPbPr525p 0x0040 /* new 0x20 */ 2018c2ecf20Sopenharmony_ci#define TVSetYPbPr750p 0x0080 /* new 0x40 */ 2028c2ecf20Sopenharmony_ci#define TVSetHiVision 0x0100 /* new 0x80; = 1080i, software-wise identical */ 2038c2ecf20Sopenharmony_ci#define TVSetTVSimuMode 0x0200 /* new 0x200, prev. 0x800 */ 2048c2ecf20Sopenharmony_ci#define TVRPLLDIV2XO 0x0400 /* prev 0x1000 */ 2058c2ecf20Sopenharmony_ci#define TVSetNTSC1024 0x0800 /* new 0x100, prev. 0x2000 */ 2068c2ecf20Sopenharmony_ci#define TVSet525p1024 0x1000 /* TW */ 2078c2ecf20Sopenharmony_ci#define TVAspect43 0x2000 2088c2ecf20Sopenharmony_ci#define TVAspect169 0x4000 2098c2ecf20Sopenharmony_ci#define TVAspect43LB 0x8000 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci/* YPbPr flag (>=315, <661; converted to TVMode) */ 2128c2ecf20Sopenharmony_ci#define YPbPr525p 0x0001 2138c2ecf20Sopenharmony_ci#define YPbPr750p 0x0002 2148c2ecf20Sopenharmony_ci#define YPbPr525i 0x0004 2158c2ecf20Sopenharmony_ci#define YPbPrHiVision 0x0008 2168c2ecf20Sopenharmony_ci#define YPbPrModeMask (YPbPr750p | YPbPr525p | YPbPr525i | YPbPrHiVision) 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci/* SysFlags (to identify special versions) */ 2198c2ecf20Sopenharmony_ci#define SF_Is651 0x0001 2208c2ecf20Sopenharmony_ci#define SF_IsM650 0x0002 2218c2ecf20Sopenharmony_ci#define SF_Is652 0x0004 2228c2ecf20Sopenharmony_ci#define SF_IsM652 0x0008 2238c2ecf20Sopenharmony_ci#define SF_IsM653 0x0010 2248c2ecf20Sopenharmony_ci#define SF_IsM661 0x0020 2258c2ecf20Sopenharmony_ci#define SF_IsM741 0x0040 2268c2ecf20Sopenharmony_ci#define SF_IsM760 0x0080 2278c2ecf20Sopenharmony_ci#define SF_760UMA 0x4000 /* 76x: We have UMA */ 2288c2ecf20Sopenharmony_ci#define SF_760LFB 0x8000 /* 76x: We have LFB */ 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci/* CR32 (Newer 630, and 315 series) 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci [0] VB connected with CVBS 2338c2ecf20Sopenharmony_ci [1] VB connected with SVHS 2348c2ecf20Sopenharmony_ci [2] VB connected with SCART 2358c2ecf20Sopenharmony_ci [3] VB connected with LCD 2368c2ecf20Sopenharmony_ci [4] VB connected with CRT2 (secondary VGA) 2378c2ecf20Sopenharmony_ci [5] CRT1 monitor is connected 2388c2ecf20Sopenharmony_ci [6] VB connected with Hi-Vision TV 2398c2ecf20Sopenharmony_ci [7] <= 330: VB connected with DVI combo connector 2408c2ecf20Sopenharmony_ci >= 661: VB connected to YPbPr 2418c2ecf20Sopenharmony_ci*/ 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci/* CR35 (300 series only) */ 2448c2ecf20Sopenharmony_ci#define TVOverScan 0x10 2458c2ecf20Sopenharmony_ci#define TVOverScanShift 4 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci/* CR35 (661 series only) 2488c2ecf20Sopenharmony_ci [0] 1 = PAL, 0 = NTSC 2498c2ecf20Sopenharmony_ci [1] 1 = NTSC-J (if D0 = 0) 2508c2ecf20Sopenharmony_ci [2] 1 = PALM (if D0 = 1) 2518c2ecf20Sopenharmony_ci [3] 1 = PALN (if D0 = 1) 2528c2ecf20Sopenharmony_ci [4] 1 = Overscan (Chrontel only) 2538c2ecf20Sopenharmony_ci [7:5] (only if D2 in CR38 is set) 2548c2ecf20Sopenharmony_ci 000 525i 2558c2ecf20Sopenharmony_ci 001 525p 2568c2ecf20Sopenharmony_ci 010 750p 2578c2ecf20Sopenharmony_ci 011 1080i (or HiVision on 301, 301B) 2588c2ecf20Sopenharmony_ci*/ 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci/* CR37 2618c2ecf20Sopenharmony_ci [0] Set 24/18 bit (0/1) RGB to LVDS/TMDS transmitter (set by BIOS) 2628c2ecf20Sopenharmony_ci [3:1] External chip 2638c2ecf20Sopenharmony_ci 300 series: 2648c2ecf20Sopenharmony_ci 001 SiS301 (never seen) 2658c2ecf20Sopenharmony_ci 010 LVDS 2668c2ecf20Sopenharmony_ci 011 LVDS + Tumpion Zurac 2678c2ecf20Sopenharmony_ci 100 LVDS + Chrontel 7005 2688c2ecf20Sopenharmony_ci 110 Chrontel 7005 2698c2ecf20Sopenharmony_ci 315/330 series 2708c2ecf20Sopenharmony_ci 001 SiS30x (never seen) 2718c2ecf20Sopenharmony_ci 010 LVDS 2728c2ecf20Sopenharmony_ci 011 LVDS + Chrontel 7019 2738c2ecf20Sopenharmony_ci 660 series [2:1] only: 2748c2ecf20Sopenharmony_ci reserved (chip type now in CR38) 2758c2ecf20Sopenharmony_ci All other combinations reserved 2768c2ecf20Sopenharmony_ci [3] 661 only: Pass 1:1 data 2778c2ecf20Sopenharmony_ci [4] LVDS: 0: Panel Link expands / 1: Panel Link does not expand 2788c2ecf20Sopenharmony_ci 30x: 0: Bridge scales / 1: Bridge does not scale = Panel scales (if possible) 2798c2ecf20Sopenharmony_ci [5] LCD polarity select 2808c2ecf20Sopenharmony_ci 0: VESA DMT Standard 2818c2ecf20Sopenharmony_ci 1: EDID 2.x defined 2828c2ecf20Sopenharmony_ci [6] LCD horizontal polarity select 2838c2ecf20Sopenharmony_ci 0: High active 2848c2ecf20Sopenharmony_ci 1: Low active 2858c2ecf20Sopenharmony_ci [7] LCD vertical polarity select 2868c2ecf20Sopenharmony_ci 0: High active 2878c2ecf20Sopenharmony_ci 1: Low active 2888c2ecf20Sopenharmony_ci*/ 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_ci/* CR37: LCDInfo */ 2918c2ecf20Sopenharmony_ci#define LCDRGB18Bit 0x0001 2928c2ecf20Sopenharmony_ci#define LCDNonExpanding 0x0010 2938c2ecf20Sopenharmony_ci#define LCDSync 0x0020 2948c2ecf20Sopenharmony_ci#define LCDPass11 0x0100 /* 0: center screen, 1: Pass 1:1 data */ 2958c2ecf20Sopenharmony_ci#define LCDDualLink 0x0200 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci#define DontExpandLCD LCDNonExpanding 2988c2ecf20Sopenharmony_ci#define LCDNonExpandingShift 4 2998c2ecf20Sopenharmony_ci#define DontExpandLCDShift LCDNonExpandingShift 3008c2ecf20Sopenharmony_ci#define LCDSyncBit 0x00e0 3018c2ecf20Sopenharmony_ci#define LCDSyncShift 6 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci/* CR38 (315 series) */ 3048c2ecf20Sopenharmony_ci#define EnableDualEdge 0x01 3058c2ecf20Sopenharmony_ci#define SetToLCDA 0x02 /* LCD channel A (301C/302B/30x(E)LV and 650+LVDS only) */ 3068c2ecf20Sopenharmony_ci#define EnableCHScart 0x04 /* Scart on Ch7019 (unofficial definition - TW) */ 3078c2ecf20Sopenharmony_ci#define EnableCHYPbPr 0x08 /* YPbPr on Ch7019 (480i HDTV); only on 650/Ch7019 systems */ 3088c2ecf20Sopenharmony_ci#define EnableSiSYPbPr 0x08 /* Enable YPbPr mode (30xLV/301C only) */ 3098c2ecf20Sopenharmony_ci#define EnableYPbPr525i 0x00 /* Enable 525i YPbPr mode (30xLV/301C only) (mask 0x30) */ 3108c2ecf20Sopenharmony_ci#define EnableYPbPr525p 0x10 /* Enable 525p YPbPr mode (30xLV/301C only) (mask 0x30) */ 3118c2ecf20Sopenharmony_ci#define EnableYPbPr750p 0x20 /* Enable 750p YPbPr mode (30xLV/301C only) (mask 0x30) */ 3128c2ecf20Sopenharmony_ci#define EnableYPbPr1080i 0x30 /* Enable 1080i YPbPr mode (30xLV/301C only) (mask 0x30) */ 3138c2ecf20Sopenharmony_ci#define EnablePALM 0x40 /* 1 = Set PALM */ 3148c2ecf20Sopenharmony_ci#define EnablePALN 0x80 /* 1 = Set PALN */ 3158c2ecf20Sopenharmony_ci#define EnableNTSCJ EnablePALM /* Not BIOS */ 3168c2ecf20Sopenharmony_ci 3178c2ecf20Sopenharmony_ci/* CR38 (661 and later) 3188c2ecf20Sopenharmony_ci D[7:5] 000 No VB 3198c2ecf20Sopenharmony_ci 001 301 series VB 3208c2ecf20Sopenharmony_ci 010 LVDS 3218c2ecf20Sopenharmony_ci 011 Chrontel 7019 3228c2ecf20Sopenharmony_ci 100 Conexant 3238c2ecf20Sopenharmony_ci D2 Enable YPbPr output (see CR35) 3248c2ecf20Sopenharmony_ci D[1:0] LCDA (like before) 3258c2ecf20Sopenharmony_ci*/ 3268c2ecf20Sopenharmony_ci 3278c2ecf20Sopenharmony_ci#define EnablePALMN 0x40 /* Romflag: 1 = Allow PALM/PALN */ 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci/* CR39 (650 only) */ 3308c2ecf20Sopenharmony_ci#define LCDPass1_1 0x01 /* 0: center screen, 1: pass 1:1 data output */ 3318c2ecf20Sopenharmony_ci#define Enable302LV_DualLink 0x04 /* 302LV only; enable dual link */ 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci/* CR39 (661 and later) 3348c2ecf20Sopenharmony_ci D[7] LVDS (SiS or third party) 3358c2ecf20Sopenharmony_ci D[1:0] YPbPr Aspect Ratio 3368c2ecf20Sopenharmony_ci 00 4:3 letterbox 3378c2ecf20Sopenharmony_ci 01 4:3 3388c2ecf20Sopenharmony_ci 10 16:9 3398c2ecf20Sopenharmony_ci 11 4:3 3408c2ecf20Sopenharmony_ci*/ 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci/* CR3B (651+301C) 3438c2ecf20Sopenharmony_ci D[1:0] YPbPr Aspect Ratio 3448c2ecf20Sopenharmony_ci ? 3458c2ecf20Sopenharmony_ci*/ 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci/* CR79 (315/330 series only; not 661 and later) 3488c2ecf20Sopenharmony_ci [3-0] Notify driver 3498c2ecf20Sopenharmony_ci 0001 Mode Switch event (set by BIOS) 3508c2ecf20Sopenharmony_ci 0010 Epansion On/Off event 3518c2ecf20Sopenharmony_ci 0011 TV UnderScan/OverScan event 3528c2ecf20Sopenharmony_ci 0100 Set Brightness event 3538c2ecf20Sopenharmony_ci 0101 Set Contrast event 3548c2ecf20Sopenharmony_ci 0110 Set Mute event 3558c2ecf20Sopenharmony_ci 0111 Set Volume Up/Down event 3568c2ecf20Sopenharmony_ci [4] Enable Backlight Control by BIOS/driver 3578c2ecf20Sopenharmony_ci (set by driver; set means that the BIOS should 3588c2ecf20Sopenharmony_ci not touch the backlight registers because eg. 3598c2ecf20Sopenharmony_ci the driver already switched off the backlight) 3608c2ecf20Sopenharmony_ci [5] PAL/NTSC (set by BIOS) 3618c2ecf20Sopenharmony_ci [6] Expansion On/Off (set by BIOS; copied to CR32[4]) 3628c2ecf20Sopenharmony_ci [7] TV UnderScan/OverScan (set by BIOS) 3638c2ecf20Sopenharmony_ci*/ 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci/* CR7C - 661 and later 3668c2ecf20Sopenharmony_ci [7] DualEdge enabled (or: to be enabled) 3678c2ecf20Sopenharmony_ci [6] CRT2 = TV/LCD/VGA enabled (or: to be enabled) 3688c2ecf20Sopenharmony_ci [5] Init done (set at end of SiS_Init) 3698c2ecf20Sopenharmony_ci {4] LVDS LCD capabilities 3708c2ecf20Sopenharmony_ci [3] LVDS LCD capabilities 3718c2ecf20Sopenharmony_ci [2] LVDS LCD capabilities (PWD) 3728c2ecf20Sopenharmony_ci [1] LVDS LCD capabilities (PWD) 3738c2ecf20Sopenharmony_ci [0] LVDS=1, TMDS=0 (SiS or third party) 3748c2ecf20Sopenharmony_ci*/ 3758c2ecf20Sopenharmony_ci 3768c2ecf20Sopenharmony_ci/* CR7E - 661 and later 3778c2ecf20Sopenharmony_ci VBType: 3788c2ecf20Sopenharmony_ci [7] LVDS (third party) 3798c2ecf20Sopenharmony_ci [3] 301C 3808c2ecf20Sopenharmony_ci [2] 302LV 3818c2ecf20Sopenharmony_ci [1] 301LV 3828c2ecf20Sopenharmony_ci [0] 301B 3838c2ecf20Sopenharmony_ci*/ 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_ci/* LCDResInfo */ 3868c2ecf20Sopenharmony_ci#define Panel300_800x600 0x01 /* CR36 */ 3878c2ecf20Sopenharmony_ci#define Panel300_1024x768 0x02 3888c2ecf20Sopenharmony_ci#define Panel300_1280x1024 0x03 3898c2ecf20Sopenharmony_ci#define Panel300_1280x960 0x04 3908c2ecf20Sopenharmony_ci#define Panel300_640x480 0x05 3918c2ecf20Sopenharmony_ci#define Panel300_1024x600 0x06 3928c2ecf20Sopenharmony_ci#define Panel300_1152x768 0x07 3938c2ecf20Sopenharmony_ci#define Panel300_1280x768 0x0a 3948c2ecf20Sopenharmony_ci#define Panel300_Custom 0x0f 3958c2ecf20Sopenharmony_ci#define Panel300_Barco1366 0x10 3968c2ecf20Sopenharmony_ci 3978c2ecf20Sopenharmony_ci#define Panel310_800x600 0x01 3988c2ecf20Sopenharmony_ci#define Panel310_1024x768 0x02 3998c2ecf20Sopenharmony_ci#define Panel310_1280x1024 0x03 4008c2ecf20Sopenharmony_ci#define Panel310_640x480 0x04 4018c2ecf20Sopenharmony_ci#define Panel310_1024x600 0x05 4028c2ecf20Sopenharmony_ci#define Panel310_1152x864 0x06 4038c2ecf20Sopenharmony_ci#define Panel310_1280x960 0x07 4048c2ecf20Sopenharmony_ci#define Panel310_1152x768 0x08 /* LVDS only */ 4058c2ecf20Sopenharmony_ci#define Panel310_1400x1050 0x09 4068c2ecf20Sopenharmony_ci#define Panel310_1280x768 0x0a 4078c2ecf20Sopenharmony_ci#define Panel310_1600x1200 0x0b 4088c2ecf20Sopenharmony_ci#define Panel310_320x240_2 0x0c /* xSTN */ 4098c2ecf20Sopenharmony_ci#define Panel310_320x240_3 0x0d /* xSTN */ 4108c2ecf20Sopenharmony_ci#define Panel310_320x240_1 0x0e /* xSTN - This is fake, can be any */ 4118c2ecf20Sopenharmony_ci#define Panel310_Custom 0x0f 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci#define Panel661_800x600 0x01 4148c2ecf20Sopenharmony_ci#define Panel661_1024x768 0x02 4158c2ecf20Sopenharmony_ci#define Panel661_1280x1024 0x03 4168c2ecf20Sopenharmony_ci#define Panel661_640x480 0x04 4178c2ecf20Sopenharmony_ci#define Panel661_1024x600 0x05 4188c2ecf20Sopenharmony_ci#define Panel661_1152x864 0x06 4198c2ecf20Sopenharmony_ci#define Panel661_1280x960 0x07 4208c2ecf20Sopenharmony_ci#define Panel661_1280x854 0x08 4218c2ecf20Sopenharmony_ci#define Panel661_1400x1050 0x09 4228c2ecf20Sopenharmony_ci#define Panel661_1280x768 0x0a 4238c2ecf20Sopenharmony_ci#define Panel661_1600x1200 0x0b 4248c2ecf20Sopenharmony_ci#define Panel661_1280x800 0x0c 4258c2ecf20Sopenharmony_ci#define Panel661_1680x1050 0x0d 4268c2ecf20Sopenharmony_ci#define Panel661_1280x720 0x0e 4278c2ecf20Sopenharmony_ci#define Panel661_Custom 0x0f 4288c2ecf20Sopenharmony_ci 4298c2ecf20Sopenharmony_ci#define Panel_800x600 0x01 /* Unified values */ 4308c2ecf20Sopenharmony_ci#define Panel_1024x768 0x02 /* MUST match BIOS values from 0-e */ 4318c2ecf20Sopenharmony_ci#define Panel_1280x1024 0x03 4328c2ecf20Sopenharmony_ci#define Panel_640x480 0x04 4338c2ecf20Sopenharmony_ci#define Panel_1024x600 0x05 4348c2ecf20Sopenharmony_ci#define Panel_1152x864 0x06 4358c2ecf20Sopenharmony_ci#define Panel_1280x960 0x07 4368c2ecf20Sopenharmony_ci#define Panel_1152x768 0x08 /* LVDS only */ 4378c2ecf20Sopenharmony_ci#define Panel_1400x1050 0x09 4388c2ecf20Sopenharmony_ci#define Panel_1280x768 0x0a /* 30xB/C and LVDS only (BIOS: all) */ 4398c2ecf20Sopenharmony_ci#define Panel_1600x1200 0x0b 4408c2ecf20Sopenharmony_ci#define Panel_1280x800 0x0c /* 661etc (TMDS) */ 4418c2ecf20Sopenharmony_ci#define Panel_1680x1050 0x0d /* 661etc */ 4428c2ecf20Sopenharmony_ci#define Panel_1280x720 0x0e /* 661etc */ 4438c2ecf20Sopenharmony_ci#define Panel_Custom 0x0f /* MUST BE 0x0f (for DVI DDC detection) */ 4448c2ecf20Sopenharmony_ci#define Panel_320x240_1 0x10 /* SiS 550 xSTN */ 4458c2ecf20Sopenharmony_ci#define Panel_Barco1366 0x11 4468c2ecf20Sopenharmony_ci#define Panel_848x480 0x12 4478c2ecf20Sopenharmony_ci#define Panel_320x240_2 0x13 /* SiS 550 xSTN */ 4488c2ecf20Sopenharmony_ci#define Panel_320x240_3 0x14 /* SiS 550 xSTN */ 4498c2ecf20Sopenharmony_ci#define Panel_1280x768_2 0x15 /* 30xLV */ 4508c2ecf20Sopenharmony_ci#define Panel_1280x768_3 0x16 /* (unused) */ 4518c2ecf20Sopenharmony_ci#define Panel_1280x800_2 0x17 /* 30xLV */ 4528c2ecf20Sopenharmony_ci#define Panel_856x480 0x18 4538c2ecf20Sopenharmony_ci#define Panel_1280x854 0x19 /* 661etc */ 4548c2ecf20Sopenharmony_ci 4558c2ecf20Sopenharmony_ci/* Index in ModeResInfo table */ 4568c2ecf20Sopenharmony_ci#define SIS_RI_320x200 0 4578c2ecf20Sopenharmony_ci#define SIS_RI_320x240 1 4588c2ecf20Sopenharmony_ci#define SIS_RI_320x400 2 4598c2ecf20Sopenharmony_ci#define SIS_RI_400x300 3 4608c2ecf20Sopenharmony_ci#define SIS_RI_512x384 4 4618c2ecf20Sopenharmony_ci#define SIS_RI_640x400 5 4628c2ecf20Sopenharmony_ci#define SIS_RI_640x480 6 4638c2ecf20Sopenharmony_ci#define SIS_RI_800x600 7 4648c2ecf20Sopenharmony_ci#define SIS_RI_1024x768 8 4658c2ecf20Sopenharmony_ci#define SIS_RI_1280x1024 9 4668c2ecf20Sopenharmony_ci#define SIS_RI_1600x1200 10 4678c2ecf20Sopenharmony_ci#define SIS_RI_1920x1440 11 4688c2ecf20Sopenharmony_ci#define SIS_RI_2048x1536 12 4698c2ecf20Sopenharmony_ci#define SIS_RI_720x480 13 4708c2ecf20Sopenharmony_ci#define SIS_RI_720x576 14 4718c2ecf20Sopenharmony_ci#define SIS_RI_1280x960 15 4728c2ecf20Sopenharmony_ci#define SIS_RI_800x480 16 4738c2ecf20Sopenharmony_ci#define SIS_RI_1024x576 17 4748c2ecf20Sopenharmony_ci#define SIS_RI_1280x720 18 4758c2ecf20Sopenharmony_ci#define SIS_RI_856x480 19 4768c2ecf20Sopenharmony_ci#define SIS_RI_1280x768 20 4778c2ecf20Sopenharmony_ci#define SIS_RI_1400x1050 21 4788c2ecf20Sopenharmony_ci#define SIS_RI_1152x864 22 /* Up to here SiS conforming */ 4798c2ecf20Sopenharmony_ci#define SIS_RI_848x480 23 4808c2ecf20Sopenharmony_ci#define SIS_RI_1360x768 24 4818c2ecf20Sopenharmony_ci#define SIS_RI_1024x600 25 4828c2ecf20Sopenharmony_ci#define SIS_RI_1152x768 26 4838c2ecf20Sopenharmony_ci#define SIS_RI_768x576 27 4848c2ecf20Sopenharmony_ci#define SIS_RI_1360x1024 28 4858c2ecf20Sopenharmony_ci#define SIS_RI_1680x1050 29 4868c2ecf20Sopenharmony_ci#define SIS_RI_1280x800 30 4878c2ecf20Sopenharmony_ci#define SIS_RI_1920x1080 31 4888c2ecf20Sopenharmony_ci#define SIS_RI_960x540 32 4898c2ecf20Sopenharmony_ci#define SIS_RI_960x600 33 4908c2ecf20Sopenharmony_ci#define SIS_RI_1280x854 34 4918c2ecf20Sopenharmony_ci 4928c2ecf20Sopenharmony_ci/* CR5F */ 4938c2ecf20Sopenharmony_ci#define IsM650 0x80 4948c2ecf20Sopenharmony_ci 4958c2ecf20Sopenharmony_ci/* Timing data */ 4968c2ecf20Sopenharmony_ci#define NTSCHT 1716 4978c2ecf20Sopenharmony_ci#define NTSC2HT 1920 4988c2ecf20Sopenharmony_ci#define NTSCVT 525 4998c2ecf20Sopenharmony_ci#define PALHT 1728 5008c2ecf20Sopenharmony_ci#define PALVT 625 5018c2ecf20Sopenharmony_ci#define StHiTVHT 892 5028c2ecf20Sopenharmony_ci#define StHiTVVT 1126 5038c2ecf20Sopenharmony_ci#define StHiTextTVHT 1000 5048c2ecf20Sopenharmony_ci#define StHiTextTVVT 1126 5058c2ecf20Sopenharmony_ci#define ExtHiTVHT 2100 5068c2ecf20Sopenharmony_ci#define ExtHiTVVT 1125 5078c2ecf20Sopenharmony_ci 5088c2ecf20Sopenharmony_ci/* Indices in (VB)VCLKData tables */ 5098c2ecf20Sopenharmony_ci 5108c2ecf20Sopenharmony_ci#define VCLK28 0x00 /* Index in VCLKData table (300 and 315) */ 5118c2ecf20Sopenharmony_ci#define VCLK40 0x04 /* Index in VCLKData table (300 and 315) */ 5128c2ecf20Sopenharmony_ci#define VCLK65_300 0x09 /* Index in VCLKData table (300) */ 5138c2ecf20Sopenharmony_ci#define VCLK108_2_300 0x14 /* Index in VCLKData table (300) */ 5148c2ecf20Sopenharmony_ci#define VCLK81_300 0x3f /* Index in VCLKData table (300) */ 5158c2ecf20Sopenharmony_ci#define VCLK108_3_300 0x42 /* Index in VCLKData table (300) */ 5168c2ecf20Sopenharmony_ci#define VCLK100_300 0x43 /* Index in VCLKData table (300) */ 5178c2ecf20Sopenharmony_ci#define VCLK34_300 0x3d /* Index in VCLKData table (300) */ 5188c2ecf20Sopenharmony_ci#define VCLK_CUSTOM_300 0x47 5198c2ecf20Sopenharmony_ci 5208c2ecf20Sopenharmony_ci#define VCLK65_315 0x0b /* Indices in (VB)VCLKData table (315) */ 5218c2ecf20Sopenharmony_ci#define VCLK108_2_315 0x19 5228c2ecf20Sopenharmony_ci#define VCLK81_315 0x5b 5238c2ecf20Sopenharmony_ci#define VCLK162_315 0x5e 5248c2ecf20Sopenharmony_ci#define VCLK108_3_315 0x45 5258c2ecf20Sopenharmony_ci#define VCLK100_315 0x46 5268c2ecf20Sopenharmony_ci#define VCLK34_315 0x55 5278c2ecf20Sopenharmony_ci#define VCLK68_315 0x0d 5288c2ecf20Sopenharmony_ci#define VCLK_1280x800_315_2 0x5c 5298c2ecf20Sopenharmony_ci#define VCLK121_315 0x5d 5308c2ecf20Sopenharmony_ci#define VCLK130_315 0x72 5318c2ecf20Sopenharmony_ci#define VCLK_1280x720 0x5f 5328c2ecf20Sopenharmony_ci#define VCLK_1280x768_2 0x60 5338c2ecf20Sopenharmony_ci#define VCLK_1280x768_3 0x61 /* (unused?) */ 5348c2ecf20Sopenharmony_ci#define VCLK_CUSTOM_315 0x62 5358c2ecf20Sopenharmony_ci#define VCLK_1280x720_2 0x63 5368c2ecf20Sopenharmony_ci#define VCLK_720x480 0x67 5378c2ecf20Sopenharmony_ci#define VCLK_720x576 0x68 5388c2ecf20Sopenharmony_ci#define VCLK_768x576 0x68 5398c2ecf20Sopenharmony_ci#define VCLK_848x480 0x65 5408c2ecf20Sopenharmony_ci#define VCLK_856x480 0x66 5418c2ecf20Sopenharmony_ci#define VCLK_800x480 0x65 5428c2ecf20Sopenharmony_ci#define VCLK_1024x576 0x51 5438c2ecf20Sopenharmony_ci#define VCLK_1152x864 0x64 5448c2ecf20Sopenharmony_ci#define VCLK_1360x768 0x58 5458c2ecf20Sopenharmony_ci#define VCLK_1280x800_315 0x6c 5468c2ecf20Sopenharmony_ci#define VCLK_1280x854 0x76 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_ci#define TVCLKBASE_300 0x21 /* Indices on TV clocks in VCLKData table (300) */ 5498c2ecf20Sopenharmony_ci#define TVCLKBASE_315 0x3a /* Indices on TV clocks in (VB)VCLKData table (315) */ 5508c2ecf20Sopenharmony_ci#define TVVCLKDIV2 0x00 /* Index relative to TVCLKBASE */ 5518c2ecf20Sopenharmony_ci#define TVVCLK 0x01 /* Index relative to TVCLKBASE */ 5528c2ecf20Sopenharmony_ci#define HiTVVCLKDIV2 0x02 /* Index relative to TVCLKBASE */ 5538c2ecf20Sopenharmony_ci#define HiTVVCLK 0x03 /* Index relative to TVCLKBASE */ 5548c2ecf20Sopenharmony_ci#define HiTVSimuVCLK 0x04 /* Index relative to TVCLKBASE */ 5558c2ecf20Sopenharmony_ci#define HiTVTextVCLK 0x05 /* Index relative to TVCLKBASE */ 5568c2ecf20Sopenharmony_ci#define YPbPr750pVCLK 0x25 /* Index relative to TVCLKBASE; was 0x0f NOT relative */ 5578c2ecf20Sopenharmony_ci 5588c2ecf20Sopenharmony_ci/* ------------------------------ */ 5598c2ecf20Sopenharmony_ci 5608c2ecf20Sopenharmony_ci#define SetSCARTOutput 0x01 5618c2ecf20Sopenharmony_ci 5628c2ecf20Sopenharmony_ci#define HotPlugFunction 0x08 5638c2ecf20Sopenharmony_ci 5648c2ecf20Sopenharmony_ci#define StStructSize 0x06 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ci#define SIS_VIDEO_CAPTURE 0x00 - 0x30 5678c2ecf20Sopenharmony_ci#define SIS_VIDEO_PLAYBACK 0x02 - 0x30 5688c2ecf20Sopenharmony_ci#define SIS_CRT2_PORT_04 0x04 - 0x30 5698c2ecf20Sopenharmony_ci#define SIS_CRT2_PORT_10 0x10 - 0x30 5708c2ecf20Sopenharmony_ci#define SIS_CRT2_PORT_12 0x12 - 0x30 5718c2ecf20Sopenharmony_ci#define SIS_CRT2_PORT_14 0x14 - 0x30 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ci#define ADR_CRT2PtrData 0x20E 5748c2ecf20Sopenharmony_ci#define offset_Zurac 0x210 /* TW: Trumpion Zurac data pointer */ 5758c2ecf20Sopenharmony_ci#define ADR_LVDSDesPtrData 0x212 5768c2ecf20Sopenharmony_ci#define ADR_LVDSCRT1DataPtr 0x214 5778c2ecf20Sopenharmony_ci#define ADR_CHTVVCLKPtr 0x216 5788c2ecf20Sopenharmony_ci#define ADR_CHTVRegDataPtr 0x218 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_ci#define LCDDataLen 8 5818c2ecf20Sopenharmony_ci#define HiTVDataLen 12 5828c2ecf20Sopenharmony_ci#define TVDataLen 16 5838c2ecf20Sopenharmony_ci 5848c2ecf20Sopenharmony_ci#define LVDSDataLen 6 5858c2ecf20Sopenharmony_ci#define LVDSDesDataLen 3 5868c2ecf20Sopenharmony_ci#define ActiveNonExpanding 0x40 5878c2ecf20Sopenharmony_ci#define ActiveNonExpandingShift 6 5888c2ecf20Sopenharmony_ci#define ActivePAL 0x20 5898c2ecf20Sopenharmony_ci#define ActivePALShift 5 5908c2ecf20Sopenharmony_ci#define ModeSwitchStatus 0x0F 5918c2ecf20Sopenharmony_ci#define SoftTVType 0x40 5928c2ecf20Sopenharmony_ci#define SoftSettingAddr 0x52 5938c2ecf20Sopenharmony_ci#define ModeSettingAddr 0x53 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_ci#define _PanelType00 0x00 5968c2ecf20Sopenharmony_ci#define _PanelType01 0x08 5978c2ecf20Sopenharmony_ci#define _PanelType02 0x10 5988c2ecf20Sopenharmony_ci#define _PanelType03 0x18 5998c2ecf20Sopenharmony_ci#define _PanelType04 0x20 6008c2ecf20Sopenharmony_ci#define _PanelType05 0x28 6018c2ecf20Sopenharmony_ci#define _PanelType06 0x30 6028c2ecf20Sopenharmony_ci#define _PanelType07 0x38 6038c2ecf20Sopenharmony_ci#define _PanelType08 0x40 6048c2ecf20Sopenharmony_ci#define _PanelType09 0x48 6058c2ecf20Sopenharmony_ci#define _PanelType0A 0x50 6068c2ecf20Sopenharmony_ci#define _PanelType0B 0x58 6078c2ecf20Sopenharmony_ci#define _PanelType0C 0x60 6088c2ecf20Sopenharmony_ci#define _PanelType0D 0x68 6098c2ecf20Sopenharmony_ci#define _PanelType0E 0x70 6108c2ecf20Sopenharmony_ci#define _PanelType0F 0x78 6118c2ecf20Sopenharmony_ci 6128c2ecf20Sopenharmony_ci#define PRIMARY_VGA 0 /* 1: SiS is primary vga 0:SiS is secondary vga */ 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci#define BIOSIDCodeAddr 0x235 /* Offsets to ptrs in BIOS image */ 6158c2ecf20Sopenharmony_ci#define OEMUtilIDCodeAddr 0x237 6168c2ecf20Sopenharmony_ci#define VBModeIDTableAddr 0x239 6178c2ecf20Sopenharmony_ci#define OEMTVPtrAddr 0x241 6188c2ecf20Sopenharmony_ci#define PhaseTableAddr 0x243 6198c2ecf20Sopenharmony_ci#define NTSCFilterTableAddr 0x245 6208c2ecf20Sopenharmony_ci#define PALFilterTableAddr 0x247 6218c2ecf20Sopenharmony_ci#define OEMLCDPtr_1Addr 0x249 6228c2ecf20Sopenharmony_ci#define OEMLCDPtr_2Addr 0x24B 6238c2ecf20Sopenharmony_ci#define LCDHPosTable_1Addr 0x24D 6248c2ecf20Sopenharmony_ci#define LCDHPosTable_2Addr 0x24F 6258c2ecf20Sopenharmony_ci#define LCDVPosTable_1Addr 0x251 6268c2ecf20Sopenharmony_ci#define LCDVPosTable_2Addr 0x253 6278c2ecf20Sopenharmony_ci#define OEMLCDPIDTableAddr 0x255 6288c2ecf20Sopenharmony_ci 6298c2ecf20Sopenharmony_ci#define VBModeStructSize 5 6308c2ecf20Sopenharmony_ci#define PhaseTableSize 4 6318c2ecf20Sopenharmony_ci#define FilterTableSize 4 6328c2ecf20Sopenharmony_ci#define LCDHPosTableSize 7 6338c2ecf20Sopenharmony_ci#define LCDVPosTableSize 5 6348c2ecf20Sopenharmony_ci#define OEMLVDSPIDTableSize 4 6358c2ecf20Sopenharmony_ci#define LVDSHPosTableSize 4 6368c2ecf20Sopenharmony_ci#define LVDSVPosTableSize 6 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_ci#define VB_ModeID 0 6398c2ecf20Sopenharmony_ci#define VB_TVTableIndex 1 6408c2ecf20Sopenharmony_ci#define VB_LCDTableIndex 2 6418c2ecf20Sopenharmony_ci#define VB_LCDHIndex 3 6428c2ecf20Sopenharmony_ci#define VB_LCDVIndex 4 6438c2ecf20Sopenharmony_ci 6448c2ecf20Sopenharmony_ci#define OEMLCDEnable 0x0001 6458c2ecf20Sopenharmony_ci#define OEMLCDDelayEnable 0x0002 6468c2ecf20Sopenharmony_ci#define OEMLCDPOSEnable 0x0004 6478c2ecf20Sopenharmony_ci#define OEMTVEnable 0x0100 6488c2ecf20Sopenharmony_ci#define OEMTVDelayEnable 0x0200 6498c2ecf20Sopenharmony_ci#define OEMTVFlickerEnable 0x0400 6508c2ecf20Sopenharmony_ci#define OEMTVPhaseEnable 0x0800 6518c2ecf20Sopenharmony_ci#define OEMTVFilterEnable 0x1000 6528c2ecf20Sopenharmony_ci 6538c2ecf20Sopenharmony_ci#define OEMLCDPanelIDSupport 0x0080 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ci/* 6568c2ecf20Sopenharmony_ci ============================================================= 6578c2ecf20Sopenharmony_ci for 315 series (old data layout) 6588c2ecf20Sopenharmony_ci ============================================================= 6598c2ecf20Sopenharmony_ci*/ 6608c2ecf20Sopenharmony_ci#define SoftDRAMType 0x80 6618c2ecf20Sopenharmony_ci#define SoftSetting_OFFSET 0x52 6628c2ecf20Sopenharmony_ci#define SR07_OFFSET 0x7C 6638c2ecf20Sopenharmony_ci#define SR15_OFFSET 0x7D 6648c2ecf20Sopenharmony_ci#define SR16_OFFSET 0x81 6658c2ecf20Sopenharmony_ci#define SR17_OFFSET 0x85 6668c2ecf20Sopenharmony_ci#define SR19_OFFSET 0x8D 6678c2ecf20Sopenharmony_ci#define SR1F_OFFSET 0x99 6688c2ecf20Sopenharmony_ci#define SR21_OFFSET 0x9A 6698c2ecf20Sopenharmony_ci#define SR22_OFFSET 0x9B 6708c2ecf20Sopenharmony_ci#define SR23_OFFSET 0x9C 6718c2ecf20Sopenharmony_ci#define SR24_OFFSET 0x9D 6728c2ecf20Sopenharmony_ci#define SR25_OFFSET 0x9E 6738c2ecf20Sopenharmony_ci#define SR31_OFFSET 0x9F 6748c2ecf20Sopenharmony_ci#define SR32_OFFSET 0xA0 6758c2ecf20Sopenharmony_ci#define SR33_OFFSET 0xA1 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_ci#define CR40_OFFSET 0xA2 6788c2ecf20Sopenharmony_ci#define SR25_1_OFFSET 0xF6 6798c2ecf20Sopenharmony_ci#define CR49_OFFSET 0xF7 6808c2ecf20Sopenharmony_ci 6818c2ecf20Sopenharmony_ci#define VB310Data_1_2_Offset 0xB6 6828c2ecf20Sopenharmony_ci#define VB310Data_4_D_Offset 0xB7 6838c2ecf20Sopenharmony_ci#define VB310Data_4_E_Offset 0xB8 6848c2ecf20Sopenharmony_ci#define VB310Data_4_10_Offset 0xBB 6858c2ecf20Sopenharmony_ci 6868c2ecf20Sopenharmony_ci#define RGBSenseDataOffset 0xBD 6878c2ecf20Sopenharmony_ci#define YCSenseDataOffset 0xBF 6888c2ecf20Sopenharmony_ci#define VideoSenseDataOffset 0xC1 6898c2ecf20Sopenharmony_ci#define OutputSelectOffset 0xF3 6908c2ecf20Sopenharmony_ci 6918c2ecf20Sopenharmony_ci#define ECLK_MCLK_DISTANCE 0x14 6928c2ecf20Sopenharmony_ci#define VBIOSTablePointerStart 0x100 6938c2ecf20Sopenharmony_ci#define StandTablePtrOffset VBIOSTablePointerStart+0x02 6948c2ecf20Sopenharmony_ci#define EModeIDTablePtrOffset VBIOSTablePointerStart+0x04 6958c2ecf20Sopenharmony_ci#define CRT1TablePtrOffset VBIOSTablePointerStart+0x06 6968c2ecf20Sopenharmony_ci#define ScreenOffsetPtrOffset VBIOSTablePointerStart+0x08 6978c2ecf20Sopenharmony_ci#define VCLKDataPtrOffset VBIOSTablePointerStart+0x0A 6988c2ecf20Sopenharmony_ci#define MCLKDataPtrOffset VBIOSTablePointerStart+0x0E 6998c2ecf20Sopenharmony_ci#define CRT2PtrDataPtrOffset VBIOSTablePointerStart+0x10 7008c2ecf20Sopenharmony_ci#define TVAntiFlickPtrOffset VBIOSTablePointerStart+0x12 7018c2ecf20Sopenharmony_ci#define TVDelayPtr1Offset VBIOSTablePointerStart+0x14 7028c2ecf20Sopenharmony_ci#define TVPhaseIncrPtr1Offset VBIOSTablePointerStart+0x16 7038c2ecf20Sopenharmony_ci#define TVYFilterPtr1Offset VBIOSTablePointerStart+0x18 7048c2ecf20Sopenharmony_ci#define LCDDelayPtr1Offset VBIOSTablePointerStart+0x20 7058c2ecf20Sopenharmony_ci#define TVEdgePtr1Offset VBIOSTablePointerStart+0x24 7068c2ecf20Sopenharmony_ci#define CRT2Delay1Offset VBIOSTablePointerStart+0x28 7078c2ecf20Sopenharmony_ci 7088c2ecf20Sopenharmony_ci#endif 709