709 lines · c
1/* $XFree86$ */2/* $XdotOrg$ */3/*4 * Global definitions for init.c and init301.c5 *6 * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria7 *8 * If distributed as part of the Linux kernel, the following license terms9 * apply:10 *11 * * This program is free software; you can redistribute it and/or modify12 * * it under the terms of the GNU General Public License as published by13 * * the Free Software Foundation; either version 2 of the named License,14 * * or any later version.15 * *16 * * This program is distributed in the hope that it will be useful,17 * * but WITHOUT ANY WARRANTY; without even the implied warranty of18 * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19 * * GNU General Public License for more details.20 * *21 * * You should have received a copy of the GNU General Public License22 * * along with this program; if not, write to the Free Software23 * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA24 *25 * Otherwise, the following license terms apply:26 *27 * * Redistribution and use in source and binary forms, with or without28 * * modification, are permitted provided that the following conditions29 * * are met:30 * * 1) Redistributions of source code must retain the above copyright31 * * notice, this list of conditions and the following disclaimer.32 * * 2) Redistributions in binary form must reproduce the above copyright33 * * notice, this list of conditions and the following disclaimer in the34 * * documentation and/or other materials provided with the distribution.35 * * 3) The name of the author may not be used to endorse or promote products36 * * derived from this software without specific prior written permission.37 * *38 * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR39 * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES40 * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.41 * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,42 * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT43 * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,44 * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY45 * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT46 * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF47 * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.48 *49 * Author: Thomas Winischhofer <thomas@winischhofer.net>50 *51 */52 53#ifndef _INITDEF_54#define _INITDEF_55 56#define IS_SIS330 (SiS_Pr->ChipType == SIS_330)57#define IS_SIS550 (SiS_Pr->ChipType == SIS_550)58#define IS_SIS650 (SiS_Pr->ChipType == SIS_650) /* All versions, incl 651, M65x */59#define IS_SIS740 (SiS_Pr->ChipType == SIS_740)60#define IS_SIS651 (SiS_Pr->SiS_SysFlags & (SF_Is651 | SF_Is652))61#define IS_SISM650 (SiS_Pr->SiS_SysFlags & (SF_IsM650 | SF_IsM652 | SF_IsM653))62#define IS_SIS65x (IS_SIS651 || IS_SISM650) /* Only special versions of 65x */63#define IS_SIS661 (SiS_Pr->ChipType == SIS_661)64#define IS_SIS741 (SiS_Pr->ChipType == SIS_741)65#define IS_SIS660 (SiS_Pr->ChipType == SIS_660)66#define IS_SIS760 (SiS_Pr->ChipType == SIS_760)67#define IS_SIS761 (SiS_Pr->ChipType == SIS_761)68#define IS_SIS661741660760 (IS_SIS661 || IS_SIS741 || IS_SIS660 || IS_SIS760 || IS_SIS761)69#define IS_SIS650740 ((SiS_Pr->ChipType >= SIS_650) && (SiS_Pr->ChipType < SIS_330))70#define IS_SIS550650740 (IS_SIS550 || IS_SIS650740)71#define IS_SIS650740660 (IS_SIS650 || IS_SIS740 || IS_SIS661741660760)72#define IS_SIS550650740660 (IS_SIS550 || IS_SIS650740660)73 74#define SISGETROMW(x) (ROMAddr[(x)] | (ROMAddr[(x)+1] << 8))75 76/* SiS_VBType */77#define VB_SIS301 0x000178#define VB_SIS301B 0x000279#define VB_SIS302B 0x000480#define VB_SIS301LV 0x000881#define VB_SIS302LV 0x001082#define VB_SIS302ELV 0x002083#define VB_SIS301C 0x004084#define VB_SIS307T 0x008085#define VB_SIS307LV 0x010086#define VB_UMC 0x400087#define VB_NoLCD 0x800088#define VB_SIS30xB (VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T)89#define VB_SIS30xC (VB_SIS301C | VB_SIS307T)90#define VB_SISTMDS (VB_SIS301 | VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T)91#define VB_SISLVDS (VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)92#define VB_SIS30xBLV (VB_SIS30xB | VB_SISLVDS)93#define VB_SIS30xCLV (VB_SIS30xC | VB_SIS302ELV | VB_SIS307LV)94#define VB_SISVB (VB_SIS301 | VB_SIS30xBLV)95#define VB_SISLCDA (VB_SIS302B | VB_SIS301C | VB_SIS307T | VB_SISLVDS)96#define VB_SISTMDSLCDA (VB_SIS301C | VB_SIS307T)97#define VB_SISPART4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV)98#define VB_SISHIVISION (VB_SIS301 | VB_SIS301B | VB_SIS302B)99#define VB_SISYPBPR (VB_SIS301C | VB_SIS307T | VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)100#define VB_SISTAP4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV)101#define VB_SISPART4OVERFLOW (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)102#define VB_SISPWD (VB_SIS301C | VB_SIS307T | VB_SISLVDS)103#define VB_SISEMI (VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)104#define VB_SISPOWER (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)105#define VB_SISDUALLINK (VB_SIS302LV | VB_SIS302ELV | VB_SIS307T | VB_SIS307LV)106#define VB_SISVGA2 VB_SISTMDS107#define VB_SISRAMDAC202 (VB_SIS301C | VB_SIS307T)108 109/* VBInfo */110#define SetSimuScanMode 0x0001 /* CR 30 */111#define SwitchCRT2 0x0002112#define SetCRT2ToAVIDEO 0x0004113#define SetCRT2ToSVIDEO 0x0008114#define SetCRT2ToSCART 0x0010115#define SetCRT2ToLCD 0x0020116#define SetCRT2ToRAMDAC 0x0040117#define SetCRT2ToHiVision 0x0080 /* for SiS bridge */118#define SetCRT2ToCHYPbPr SetCRT2ToHiVision /* for Chrontel */119#define SetNTSCTV 0x0000 /* CR 31 */120#define SetPALTV 0x0100 /* Deprecated here, now in TVMode */121#define SetInSlaveMode 0x0200122#define SetNotSimuMode 0x0400123#define SetNotSimuTVMode SetNotSimuMode124#define SetDispDevSwitch 0x0800125#define SetCRT2ToYPbPr525750 0x0800126#define LoadDACFlag 0x1000127#define DisableCRT2Display 0x2000128#define DriverMode 0x4000129#define HotKeySwitch 0x8000130#define SetCRT2ToLCDA 0x8000131 132/* v-- Needs change in sis_vga.c if changed (GPIO) --v */133#define SetCRT2ToTV (SetCRT2ToYPbPr525750|SetCRT2ToHiVision|SetCRT2ToSCART|SetCRT2ToSVIDEO|SetCRT2ToAVIDEO)134#define SetCRT2ToTVNoYPbPrHiVision (SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)135#define SetCRT2ToTVNoHiVision (SetCRT2ToYPbPr525750 | SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)136 137/* SiS_ModeType */138#define ModeText 0x00139#define ModeCGA 0x01140#define ModeEGA 0x02141#define ModeVGA 0x03142#define Mode15Bpp 0x04143#define Mode16Bpp 0x05144#define Mode24Bpp 0x06145#define Mode32Bpp 0x07146 147#define ModeTypeMask 0x07148#define IsTextMode 0x07149 150#define DACInfoFlag 0x0018151#define MemoryInfoFlag 0x01E0152#define MemorySizeShift 5153 154/* modeflag */155#define Charx8Dot 0x0200156#define LineCompareOff 0x0400157#define CRT2Mode 0x0800158#define HalfDCLK 0x1000159#define NoSupportSimuTV 0x2000160#define NoSupportLCDScale 0x4000 /* SiS bridge: No scaling possible (no matter what panel) */161#define DoubleScanMode 0x8000162 163/* Infoflag */164#define SupportTV 0x0008165#define SupportTV1024 0x0800166#define SupportCHTV 0x0800167#define Support64048060Hz 0x0800 /* Special for 640x480 LCD */168#define SupportHiVision 0x0010169#define SupportYPbPr750p 0x1000170#define SupportLCD 0x0020171#define SupportRAMDAC2 0x0040 /* All (<= 100Mhz) */172#define SupportRAMDAC2_135 0x0100 /* All except DH (<= 135Mhz) */173#define SupportRAMDAC2_162 0x0200 /* B, C (<= 162Mhz) */174#define SupportRAMDAC2_202 0x0400 /* C (<= 202Mhz) */175#define InterlaceMode 0x0080176#define SyncPP 0x0000177#define HaveWideTiming 0x2000 /* Have specific wide- and non-wide timing */178#define SyncPN 0x4000179#define SyncNP 0x8000180#define SyncNN 0xc000181 182/* SetFlag */183#define ProgrammingCRT2 0x0001184#define LowModeTests 0x0002185/* #define TVSimuMode 0x0002 - deprecated */186/* #define RPLLDIV2XO 0x0004 - deprecated */187#define LCDVESATiming 0x0008188#define EnableLVDSDDA 0x0010189#define SetDispDevSwitchFlag 0x0020190#define CheckWinDos 0x0040191#define SetDOSMode 0x0080192 193/* TVMode flag */194#define TVSetPAL 0x0001195#define TVSetNTSCJ 0x0002196#define TVSetPALM 0x0004197#define TVSetPALN 0x0008198#define TVSetCHOverScan 0x0010199#define TVSetYPbPr525i 0x0020 /* new 0x10 */200#define TVSetYPbPr525p 0x0040 /* new 0x20 */201#define TVSetYPbPr750p 0x0080 /* new 0x40 */202#define TVSetHiVision 0x0100 /* new 0x80; = 1080i, software-wise identical */203#define TVSetTVSimuMode 0x0200 /* new 0x200, prev. 0x800 */204#define TVRPLLDIV2XO 0x0400 /* prev 0x1000 */205#define TVSetNTSC1024 0x0800 /* new 0x100, prev. 0x2000 */206#define TVSet525p1024 0x1000 /* TW */207#define TVAspect43 0x2000208#define TVAspect169 0x4000209#define TVAspect43LB 0x8000210 211/* YPbPr flag (>=315, <661; converted to TVMode) */212#define YPbPr525p 0x0001213#define YPbPr750p 0x0002214#define YPbPr525i 0x0004215#define YPbPrHiVision 0x0008216#define YPbPrModeMask (YPbPr750p | YPbPr525p | YPbPr525i | YPbPrHiVision)217 218/* SysFlags (to identify special versions) */219#define SF_Is651 0x0001220#define SF_IsM650 0x0002221#define SF_Is652 0x0004222#define SF_IsM652 0x0008223#define SF_IsM653 0x0010224#define SF_IsM661 0x0020225#define SF_IsM741 0x0040226#define SF_IsM760 0x0080227#define SF_760UMA 0x4000 /* 76x: We have UMA */228#define SF_760LFB 0x8000 /* 76x: We have LFB */229 230/* CR32 (Newer 630, and 315 series)231 232 [0] VB connected with CVBS233 [1] VB connected with SVHS234 [2] VB connected with SCART235 [3] VB connected with LCD236 [4] VB connected with CRT2 (secondary VGA)237 [5] CRT1 monitor is connected238 [6] VB connected with Hi-Vision TV239 [7] <= 330: VB connected with DVI combo connector240 >= 661: VB connected to YPbPr241*/242 243/* CR35 (300 series only) */244#define TVOverScan 0x10245#define TVOverScanShift 4246 247/* CR35 (661 series only)248 [0] 1 = PAL, 0 = NTSC249 [1] 1 = NTSC-J (if D0 = 0)250 [2] 1 = PALM (if D0 = 1)251 [3] 1 = PALN (if D0 = 1)252 [4] 1 = Overscan (Chrontel only)253 [7:5] (only if D2 in CR38 is set)254 000 525i255 001 525p256 010 750p257 011 1080i (or HiVision on 301, 301B)258*/259 260/* CR37261 [0] Set 24/18 bit (0/1) RGB to LVDS/TMDS transmitter (set by BIOS)262 [3:1] External chip263 300 series:264 001 SiS301 (never seen)265 010 LVDS266 011 LVDS + Tumpion Zurac267 100 LVDS + Chrontel 7005268 110 Chrontel 7005269 315/330 series270 001 SiS30x (never seen)271 010 LVDS272 011 LVDS + Chrontel 7019273 660 series [2:1] only:274 reserved (chip type now in CR38)275 All other combinations reserved276 [3] 661 only: Pass 1:1 data277 [4] LVDS: 0: Panel Link expands / 1: Panel Link does not expand278 30x: 0: Bridge scales / 1: Bridge does not scale = Panel scales (if possible)279 [5] LCD polarity select280 0: VESA DMT Standard281 1: EDID 2.x defined282 [6] LCD horizontal polarity select283 0: High active284 1: Low active285 [7] LCD vertical polarity select286 0: High active287 1: Low active288*/289 290/* CR37: LCDInfo */291#define LCDRGB18Bit 0x0001292#define LCDNonExpanding 0x0010293#define LCDSync 0x0020294#define LCDPass11 0x0100 /* 0: center screen, 1: Pass 1:1 data */295#define LCDDualLink 0x0200296 297#define DontExpandLCD LCDNonExpanding298#define LCDNonExpandingShift 4299#define DontExpandLCDShift LCDNonExpandingShift300#define LCDSyncBit 0x00e0301#define LCDSyncShift 6302 303/* CR38 (315 series) */304#define EnableDualEdge 0x01305#define SetToLCDA 0x02 /* LCD channel A (301C/302B/30x(E)LV and 650+LVDS only) */306#define EnableCHScart 0x04 /* Scart on Ch7019 (unofficial definition - TW) */307#define EnableCHYPbPr 0x08 /* YPbPr on Ch7019 (480i HDTV); only on 650/Ch7019 systems */308#define EnableSiSYPbPr 0x08 /* Enable YPbPr mode (30xLV/301C only) */309#define EnableYPbPr525i 0x00 /* Enable 525i YPbPr mode (30xLV/301C only) (mask 0x30) */310#define EnableYPbPr525p 0x10 /* Enable 525p YPbPr mode (30xLV/301C only) (mask 0x30) */311#define EnableYPbPr750p 0x20 /* Enable 750p YPbPr mode (30xLV/301C only) (mask 0x30) */312#define EnableYPbPr1080i 0x30 /* Enable 1080i YPbPr mode (30xLV/301C only) (mask 0x30) */313#define EnablePALM 0x40 /* 1 = Set PALM */314#define EnablePALN 0x80 /* 1 = Set PALN */315#define EnableNTSCJ EnablePALM /* Not BIOS */316 317/* CR38 (661 and later)318 D[7:5] 000 No VB319 001 301 series VB320 010 LVDS321 011 Chrontel 7019322 100 Conexant323 D2 Enable YPbPr output (see CR35)324 D[1:0] LCDA (like before)325*/326 327#define EnablePALMN 0x40 /* Romflag: 1 = Allow PALM/PALN */328 329/* CR39 (650 only) */330#define LCDPass1_1 0x01 /* 0: center screen, 1: pass 1:1 data output */331#define Enable302LV_DualLink 0x04 /* 302LV only; enable dual link */332 333/* CR39 (661 and later)334 D[7] LVDS (SiS or third party)335 D[1:0] YPbPr Aspect Ratio336 00 4:3 letterbox337 01 4:3338 10 16:9339 11 4:3340*/341 342/* CR3B (651+301C)343 D[1:0] YPbPr Aspect Ratio344 ?345*/346 347/* CR79 (315/330 series only; not 661 and later)348 [3-0] Notify driver349 0001 Mode Switch event (set by BIOS)350 0010 Epansion On/Off event351 0011 TV UnderScan/OverScan event352 0100 Set Brightness event353 0101 Set Contrast event354 0110 Set Mute event355 0111 Set Volume Up/Down event356 [4] Enable Backlight Control by BIOS/driver357 (set by driver; set means that the BIOS should358 not touch the backlight registers because eg.359 the driver already switched off the backlight)360 [5] PAL/NTSC (set by BIOS)361 [6] Expansion On/Off (set by BIOS; copied to CR32[4])362 [7] TV UnderScan/OverScan (set by BIOS)363*/364 365/* CR7C - 661 and later366 [7] DualEdge enabled (or: to be enabled)367 [6] CRT2 = TV/LCD/VGA enabled (or: to be enabled)368 [5] Init done (set at end of SiS_Init)369 {4] LVDS LCD capabilities370 [3] LVDS LCD capabilities371 [2] LVDS LCD capabilities (PWD)372 [1] LVDS LCD capabilities (PWD)373 [0] LVDS=1, TMDS=0 (SiS or third party)374*/375 376/* CR7E - 661 and later377 VBType:378 [7] LVDS (third party)379 [3] 301C380 [2] 302LV381 [1] 301LV382 [0] 301B383*/384 385/* LCDResInfo */386#define Panel300_800x600 0x01 /* CR36 */387#define Panel300_1024x768 0x02388#define Panel300_1280x1024 0x03389#define Panel300_1280x960 0x04390#define Panel300_640x480 0x05391#define Panel300_1024x600 0x06392#define Panel300_1152x768 0x07393#define Panel300_1280x768 0x0a394#define Panel300_Custom 0x0f395#define Panel300_Barco1366 0x10396 397#define Panel310_800x600 0x01398#define Panel310_1024x768 0x02399#define Panel310_1280x1024 0x03400#define Panel310_640x480 0x04401#define Panel310_1024x600 0x05402#define Panel310_1152x864 0x06403#define Panel310_1280x960 0x07404#define Panel310_1152x768 0x08 /* LVDS only */405#define Panel310_1400x1050 0x09406#define Panel310_1280x768 0x0a407#define Panel310_1600x1200 0x0b408#define Panel310_320x240_2 0x0c /* xSTN */409#define Panel310_320x240_3 0x0d /* xSTN */410#define Panel310_320x240_1 0x0e /* xSTN - This is fake, can be any */411#define Panel310_Custom 0x0f412 413#define Panel661_800x600 0x01414#define Panel661_1024x768 0x02415#define Panel661_1280x1024 0x03416#define Panel661_640x480 0x04417#define Panel661_1024x600 0x05418#define Panel661_1152x864 0x06419#define Panel661_1280x960 0x07420#define Panel661_1280x854 0x08421#define Panel661_1400x1050 0x09422#define Panel661_1280x768 0x0a423#define Panel661_1600x1200 0x0b424#define Panel661_1280x800 0x0c425#define Panel661_1680x1050 0x0d426#define Panel661_1280x720 0x0e427#define Panel661_Custom 0x0f428 429#define Panel_800x600 0x01 /* Unified values */430#define Panel_1024x768 0x02 /* MUST match BIOS values from 0-e */431#define Panel_1280x1024 0x03432#define Panel_640x480 0x04433#define Panel_1024x600 0x05434#define Panel_1152x864 0x06435#define Panel_1280x960 0x07436#define Panel_1152x768 0x08 /* LVDS only */437#define Panel_1400x1050 0x09438#define Panel_1280x768 0x0a /* 30xB/C and LVDS only (BIOS: all) */439#define Panel_1600x1200 0x0b440#define Panel_1280x800 0x0c /* 661etc (TMDS) */441#define Panel_1680x1050 0x0d /* 661etc */442#define Panel_1280x720 0x0e /* 661etc */443#define Panel_Custom 0x0f /* MUST BE 0x0f (for DVI DDC detection) */444#define Panel_320x240_1 0x10 /* SiS 550 xSTN */445#define Panel_Barco1366 0x11446#define Panel_848x480 0x12447#define Panel_320x240_2 0x13 /* SiS 550 xSTN */448#define Panel_320x240_3 0x14 /* SiS 550 xSTN */449#define Panel_1280x768_2 0x15 /* 30xLV */450#define Panel_1280x768_3 0x16 /* (unused) */451#define Panel_1280x800_2 0x17 /* 30xLV */452#define Panel_856x480 0x18453#define Panel_1280x854 0x19 /* 661etc */454 455/* Index in ModeResInfo table */456#define SIS_RI_320x200 0457#define SIS_RI_320x240 1458#define SIS_RI_320x400 2459#define SIS_RI_400x300 3460#define SIS_RI_512x384 4461#define SIS_RI_640x400 5462#define SIS_RI_640x480 6463#define SIS_RI_800x600 7464#define SIS_RI_1024x768 8465#define SIS_RI_1280x1024 9466#define SIS_RI_1600x1200 10467#define SIS_RI_1920x1440 11468#define SIS_RI_2048x1536 12469#define SIS_RI_720x480 13470#define SIS_RI_720x576 14471#define SIS_RI_1280x960 15472#define SIS_RI_800x480 16473#define SIS_RI_1024x576 17474#define SIS_RI_1280x720 18475#define SIS_RI_856x480 19476#define SIS_RI_1280x768 20477#define SIS_RI_1400x1050 21478#define SIS_RI_1152x864 22 /* Up to here SiS conforming */479#define SIS_RI_848x480 23480#define SIS_RI_1360x768 24481#define SIS_RI_1024x600 25482#define SIS_RI_1152x768 26483#define SIS_RI_768x576 27484#define SIS_RI_1360x1024 28485#define SIS_RI_1680x1050 29486#define SIS_RI_1280x800 30487#define SIS_RI_1920x1080 31488#define SIS_RI_960x540 32489#define SIS_RI_960x600 33490#define SIS_RI_1280x854 34491 492/* CR5F */493#define IsM650 0x80494 495/* Timing data */496#define NTSCHT 1716497#define NTSC2HT 1920498#define NTSCVT 525499#define PALHT 1728500#define PALVT 625501#define StHiTVHT 892502#define StHiTVVT 1126503#define StHiTextTVHT 1000504#define StHiTextTVVT 1126505#define ExtHiTVHT 2100506#define ExtHiTVVT 1125507 508/* Indices in (VB)VCLKData tables */509 510#define VCLK28 0x00 /* Index in VCLKData table (300 and 315) */511#define VCLK40 0x04 /* Index in VCLKData table (300 and 315) */512#define VCLK65_300 0x09 /* Index in VCLKData table (300) */513#define VCLK108_2_300 0x14 /* Index in VCLKData table (300) */514#define VCLK81_300 0x3f /* Index in VCLKData table (300) */515#define VCLK108_3_300 0x42 /* Index in VCLKData table (300) */516#define VCLK100_300 0x43 /* Index in VCLKData table (300) */517#define VCLK34_300 0x3d /* Index in VCLKData table (300) */518#define VCLK_CUSTOM_300 0x47519 520#define VCLK65_315 0x0b /* Indices in (VB)VCLKData table (315) */521#define VCLK108_2_315 0x19522#define VCLK81_315 0x5b523#define VCLK162_315 0x5e524#define VCLK108_3_315 0x45525#define VCLK100_315 0x46526#define VCLK34_315 0x55527#define VCLK68_315 0x0d528#define VCLK_1280x800_315_2 0x5c529#define VCLK121_315 0x5d530#define VCLK130_315 0x72531#define VCLK_1280x720 0x5f532#define VCLK_1280x768_2 0x60533#define VCLK_1280x768_3 0x61 /* (unused?) */534#define VCLK_CUSTOM_315 0x62535#define VCLK_1280x720_2 0x63536#define VCLK_720x480 0x67537#define VCLK_720x576 0x68538#define VCLK_768x576 0x68539#define VCLK_848x480 0x65540#define VCLK_856x480 0x66541#define VCLK_800x480 0x65542#define VCLK_1024x576 0x51543#define VCLK_1152x864 0x64544#define VCLK_1360x768 0x58545#define VCLK_1280x800_315 0x6c546#define VCLK_1280x854 0x76547 548#define TVCLKBASE_300 0x21 /* Indices on TV clocks in VCLKData table (300) */549#define TVCLKBASE_315 0x3a /* Indices on TV clocks in (VB)VCLKData table (315) */550#define TVVCLKDIV2 0x00 /* Index relative to TVCLKBASE */551#define TVVCLK 0x01 /* Index relative to TVCLKBASE */552#define HiTVVCLKDIV2 0x02 /* Index relative to TVCLKBASE */553#define HiTVVCLK 0x03 /* Index relative to TVCLKBASE */554#define HiTVSimuVCLK 0x04 /* Index relative to TVCLKBASE */555#define HiTVTextVCLK 0x05 /* Index relative to TVCLKBASE */556#define YPbPr750pVCLK 0x25 /* Index relative to TVCLKBASE; was 0x0f NOT relative */557 558/* ------------------------------ */559 560#define SetSCARTOutput 0x01561 562#define HotPlugFunction 0x08563 564#define StStructSize 0x06565 566#define SIS_VIDEO_CAPTURE 0x00 - 0x30567#define SIS_VIDEO_PLAYBACK 0x02 - 0x30568#define SIS_CRT2_PORT_04 0x04 - 0x30569#define SIS_CRT2_PORT_10 0x10 - 0x30570#define SIS_CRT2_PORT_12 0x12 - 0x30571#define SIS_CRT2_PORT_14 0x14 - 0x30572 573#define ADR_CRT2PtrData 0x20E574#define offset_Zurac 0x210 /* TW: Trumpion Zurac data pointer */575#define ADR_LVDSDesPtrData 0x212576#define ADR_LVDSCRT1DataPtr 0x214577#define ADR_CHTVVCLKPtr 0x216578#define ADR_CHTVRegDataPtr 0x218579 580#define LCDDataLen 8581#define HiTVDataLen 12582#define TVDataLen 16583 584#define LVDSDataLen 6585#define LVDSDesDataLen 3586#define ActiveNonExpanding 0x40587#define ActiveNonExpandingShift 6588#define ActivePAL 0x20589#define ActivePALShift 5590#define ModeSwitchStatus 0x0F591#define SoftTVType 0x40592#define SoftSettingAddr 0x52593#define ModeSettingAddr 0x53594 595#define _PanelType00 0x00596#define _PanelType01 0x08597#define _PanelType02 0x10598#define _PanelType03 0x18599#define _PanelType04 0x20600#define _PanelType05 0x28601#define _PanelType06 0x30602#define _PanelType07 0x38603#define _PanelType08 0x40604#define _PanelType09 0x48605#define _PanelType0A 0x50606#define _PanelType0B 0x58607#define _PanelType0C 0x60608#define _PanelType0D 0x68609#define _PanelType0E 0x70610#define _PanelType0F 0x78611 612#define PRIMARY_VGA 0 /* 1: SiS is primary vga 0:SiS is secondary vga */613 614#define BIOSIDCodeAddr 0x235 /* Offsets to ptrs in BIOS image */615#define OEMUtilIDCodeAddr 0x237616#define VBModeIDTableAddr 0x239617#define OEMTVPtrAddr 0x241618#define PhaseTableAddr 0x243619#define NTSCFilterTableAddr 0x245620#define PALFilterTableAddr 0x247621#define OEMLCDPtr_1Addr 0x249622#define OEMLCDPtr_2Addr 0x24B623#define LCDHPosTable_1Addr 0x24D624#define LCDHPosTable_2Addr 0x24F625#define LCDVPosTable_1Addr 0x251626#define LCDVPosTable_2Addr 0x253627#define OEMLCDPIDTableAddr 0x255628 629#define VBModeStructSize 5630#define PhaseTableSize 4631#define FilterTableSize 4632#define LCDHPosTableSize 7633#define LCDVPosTableSize 5634#define OEMLVDSPIDTableSize 4635#define LVDSHPosTableSize 4636#define LVDSVPosTableSize 6637 638#define VB_ModeID 0639#define VB_TVTableIndex 1640#define VB_LCDTableIndex 2641#define VB_LCDHIndex 3642#define VB_LCDVIndex 4643 644#define OEMLCDEnable 0x0001645#define OEMLCDDelayEnable 0x0002646#define OEMLCDPOSEnable 0x0004647#define OEMTVEnable 0x0100648#define OEMTVDelayEnable 0x0200649#define OEMTVFlickerEnable 0x0400650#define OEMTVPhaseEnable 0x0800651#define OEMTVFilterEnable 0x1000652 653#define OEMLCDPanelIDSupport 0x0080654 655/*656 =============================================================657 for 315 series (old data layout)658 =============================================================659*/660#define SoftDRAMType 0x80661#define SoftSetting_OFFSET 0x52662#define SR07_OFFSET 0x7C663#define SR15_OFFSET 0x7D664#define SR16_OFFSET 0x81665#define SR17_OFFSET 0x85666#define SR19_OFFSET 0x8D667#define SR1F_OFFSET 0x99668#define SR21_OFFSET 0x9A669#define SR22_OFFSET 0x9B670#define SR23_OFFSET 0x9C671#define SR24_OFFSET 0x9D672#define SR25_OFFSET 0x9E673#define SR31_OFFSET 0x9F674#define SR32_OFFSET 0xA0675#define SR33_OFFSET 0xA1676 677#define CR40_OFFSET 0xA2678#define SR25_1_OFFSET 0xF6679#define CR49_OFFSET 0xF7680 681#define VB310Data_1_2_Offset 0xB6682#define VB310Data_4_D_Offset 0xB7683#define VB310Data_4_E_Offset 0xB8684#define VB310Data_4_10_Offset 0xBB685 686#define RGBSenseDataOffset 0xBD687#define YCSenseDataOffset 0xBF688#define VideoSenseDataOffset 0xC1689#define OutputSelectOffset 0xF3690 691#define ECLK_MCLK_DISTANCE 0x14692#define VBIOSTablePointerStart 0x100693#define StandTablePtrOffset VBIOSTablePointerStart+0x02694#define EModeIDTablePtrOffset VBIOSTablePointerStart+0x04695#define CRT1TablePtrOffset VBIOSTablePointerStart+0x06696#define ScreenOffsetPtrOffset VBIOSTablePointerStart+0x08697#define VCLKDataPtrOffset VBIOSTablePointerStart+0x0A698#define MCLKDataPtrOffset VBIOSTablePointerStart+0x0E699#define CRT2PtrDataPtrOffset VBIOSTablePointerStart+0x10700#define TVAntiFlickPtrOffset VBIOSTablePointerStart+0x12701#define TVDelayPtr1Offset VBIOSTablePointerStart+0x14702#define TVPhaseIncrPtr1Offset VBIOSTablePointerStart+0x16703#define TVYFilterPtr1Offset VBIOSTablePointerStart+0x18704#define LCDDelayPtr1Offset VBIOSTablePointerStart+0x20705#define TVEdgePtr1Offset VBIOSTablePointerStart+0x24706#define CRT2Delay1Offset VBIOSTablePointerStart+0x28707 708#endif709