diff options
Diffstat (limited to 'src/vstruct.h')
-rw-r--r-- | src/vstruct.h | 202 |
1 files changed, 155 insertions, 47 deletions
diff --git a/src/vstruct.h b/src/vstruct.h index 7005986..c200559 100644 --- a/src/vstruct.h +++ b/src/vstruct.h @@ -1,5 +1,37 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/vstruct.h,v 1.3 2003/02/10 01:14:17 tsi Exp $ */ - +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/vstruct.h,v 1.22 2003/11/03 17:02:54 twini Exp $ */ +/* + * General structure definitions for universal mode switching modules + * + * Copyright 2002, 2003 by Thomas Winischhofer, Vienna, Austria + * + * If distributed as part of the linux kernel, the contents of this file + * is entirely covered by the GPL. + * + * Otherwise, the following terms apply: + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the copyright holder not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. The copyright holder makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * Authors: Thomas Winischhofer <thomas@winischhofer.net> + * Silicon Integrated Systems + * + */ + #ifdef _INIT_ #define EXTERN #else @@ -60,7 +92,6 @@ typedef struct _SiS_LVDSCRT1DataStruct UCHAR CR[15]; } SiS_LVDSCRT1DataStruct; -/*add for LCDA*/ typedef struct _SiS_LCDACRT1DataStruct { UCHAR CR[17]; @@ -81,6 +112,7 @@ typedef struct _SiS_StStruct UCHAR VB_StTVFlickerIndex; UCHAR VB_StTVEdgeIndex; UCHAR VB_StTVYFilterIndex; + UCHAR St_PDC; } SiS_StStruct; typedef struct _SiS_VBModeStruct @@ -112,14 +144,13 @@ typedef struct _SiS_ExtStruct { UCHAR Ext_ModeID; USHORT Ext_ModeFlag; - USHORT Ext_ModeInfo; - USHORT Ext_Point; + UCHAR Ext_ModeOffset; USHORT Ext_VESAID; - UCHAR Ext_VESAMEMSize; UCHAR Ext_RESINFO; UCHAR VB_ExtTVFlickerIndex; UCHAR VB_ExtTVEdgeIndex; UCHAR VB_ExtTVYFilterIndex; + UCHAR VB_ExtTVYFilterIndexROM661; UCHAR REFindex; } SiS_ExtStruct; @@ -132,7 +163,7 @@ typedef struct _SiS_Ext2Struct UCHAR ModeID; USHORT XRes; USHORT YRes; - USHORT ROM_OFFSET; + UCHAR Ext_PDC; } SiS_Ext2Struct; typedef struct _SiS_Part2PortTblStruct @@ -151,12 +182,6 @@ typedef struct _SiS_MCLKDataStruct USHORT CLOCK; } SiS_MCLKDataStruct; -typedef struct _SiS_ECLKDataStruct -{ - UCHAR SR2E,SR2F,SR30; - USHORT CLOCK; -} SiS_ECLKDataStruct; - typedef struct _SiS_VCLKDataStruct { UCHAR SR2B,SR2C; @@ -185,39 +210,67 @@ typedef struct _SiS_ModeResInfoStruct typedef UCHAR DRAM4Type[4]; +/* Defines for SiS_CustomT */ +/* Never change these for sisfb compatibility */ +#define CUT_NONE 0 +#define CUT_FORCENONE 1 +#define CUT_BARCO1366 2 +#define CUT_BARCO1024 3 +#define CUT_COMPAQ1280 4 +#define CUT_COMPAQ12802 5 +#define CUT_PANEL848 6 +#define CUT_CLEVO1024 7 +#define CUT_CLEVO10242 8 +#define CUT_CLEVO1400 9 +#define CUT_CLEVO14002 10 +#define CUT_UNIWILL1024 11 +#define CUT_ASUSL3000D 12 +#define CUT_UNIWILL10242 13 + typedef struct _SiS_Private { #ifdef LINUX_KERNEL - USHORT RelIO; + SISIOADDRESS RelIO; #endif - USHORT SiS_P3c4; - USHORT SiS_P3d4; - USHORT SiS_P3c0; - USHORT SiS_P3ce; - USHORT SiS_P3c2; - USHORT SiS_P3ca; - USHORT SiS_P3c6; - USHORT SiS_P3c7; - USHORT SiS_P3c8; - USHORT SiS_P3c9; - USHORT SiS_P3da; - USHORT SiS_Part1Port; - USHORT SiS_Part2Port; - USHORT SiS_Part3Port; - USHORT SiS_Part4Port; - USHORT SiS_Part5Port; + SISIOADDRESS SiS_P3c4; + SISIOADDRESS SiS_P3d4; + SISIOADDRESS SiS_P3c0; + SISIOADDRESS SiS_P3ce; + SISIOADDRESS SiS_P3c2; + SISIOADDRESS SiS_P3ca; + SISIOADDRESS SiS_P3c6; + SISIOADDRESS SiS_P3c7; + SISIOADDRESS SiS_P3c8; + SISIOADDRESS SiS_P3c9; + SISIOADDRESS SiS_P3cb; + SISIOADDRESS SiS_P3cd; + SISIOADDRESS SiS_P3da; + SISIOADDRESS SiS_Part1Port; + SISIOADDRESS SiS_Part2Port; + SISIOADDRESS SiS_Part3Port; + SISIOADDRESS SiS_Part4Port; + SISIOADDRESS SiS_Part5Port; + SISIOADDRESS SiS_VidCapt; + SISIOADDRESS SiS_VidPlay; USHORT SiS_IF_DEF_LVDS; + USHORT SiS_IF_DEF_CH70xx; + USHORT SiS_IF_DEF_CONEX; USHORT SiS_IF_DEF_TRUMPION; USHORT SiS_IF_DEF_DSTN; USHORT SiS_IF_DEF_FSTN; - USHORT SiS_IF_DEF_CH70xx; USHORT SiS_IF_DEF_HiVision; + USHORT SiS_SysFlags; UCHAR SiS_VGAINFO; +#ifndef LINUX_KERNEL + USHORT SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4; +#endif BOOLEAN SiS_UseROM; int SiS_CHOverScan; BOOLEAN SiS_CHSOverScan; BOOLEAN SiS_ChSW; + BOOLEAN SiS_UseLCDA; int SiS_UseOEM; + ULONG SiS_CustomT; USHORT SiS_Backup70xx; USHORT SiS_CRT1Mode; USHORT SiS_flag_clearbuffer; @@ -226,9 +279,11 @@ typedef struct _SiS_Private UCHAR SiS_DataBusWidth; USHORT SiS_ModeType; USHORT SiS_VBInfo; + USHORT SiS_TVMode; USHORT SiS_LCDResInfo; USHORT SiS_LCDTypeInfo; USHORT SiS_LCDInfo; + USHORT SiS_LCDInfo661; USHORT SiS_VBType; USHORT SiS_VBExtInfo; USHORT SiS_HiVision; @@ -271,22 +326,24 @@ typedef struct _SiS_Private USHORT SiS_Panel1280x768; USHORT SiS_Panel1024x600; USHORT SiS_Panel640x480; + USHORT SiS_Panel640x480_2; + USHORT SiS_Panel640x480_3; USHORT SiS_Panel1152x864; + USHORT SiS_PanelCustom; + USHORT SiS_PanelBarco1366; USHORT SiS_PanelMax; USHORT SiS_PanelMinLVDS; USHORT SiS_PanelMin301; USHORT SiS_ChrontelInit; - /* Pointers: */ const SiS_StStruct *SiS_SModeIDTable; - const SiS_StandTableStruct *SiS_StandTable; + SiS_StandTableStruct *SiS_StandTable; const SiS_ExtStruct *SiS_EModeIDTable; const SiS_Ext2Struct *SiS_RefIndex; const SiS_VBModeStruct *SiS_VBModeIDTable; const SiS_CRT1TableStruct *SiS_CRT1Table; const SiS_MCLKDataStruct *SiS_MCLKData_0; const SiS_MCLKDataStruct *SiS_MCLKData_1; - const SiS_ECLKDataStruct *SiS_ECLKData; const SiS_VCLKDataStruct *SiS_VCLKData; const SiS_VBVCLKDataStruct *SiS_VBVCLKData; const SiS_StResInfoStruct *SiS_StResInfo; @@ -317,7 +374,7 @@ typedef struct _SiS_Private const USHORT *pSiS_RGBSenseData; const USHORT *pSiS_VideoSenseData; const USHORT *pSiS_YCSenseData; - const USHORT *pSiS_RGBSenseData2; /*301b*/ + const USHORT *pSiS_RGBSenseData2; const USHORT *pSiS_VideoSenseData2; const USHORT *pSiS_YCSenseData2; #endif @@ -330,6 +387,8 @@ typedef struct _SiS_Private const UCHAR *SiS_PALMPhase2; const UCHAR *SiS_PALNPhase2; const UCHAR *SiS_SpecialPhase; + const UCHAR *SiS_SpecialPhaseM; + const UCHAR *SiS_SpecialPhaseJ; const SiS_LCDDataStruct *SiS_StLCD1024x768Data; const SiS_LCDDataStruct *SiS_ExtLCD1024x768Data; const SiS_LCDDataStruct *SiS_St2LCD1024x768Data; @@ -341,22 +400,22 @@ typedef struct _SiS_Private const SiS_LCDDataStruct *SiS_LCD1280x960Data; const SiS_LCDDataStruct *SiS_NoScaleData1400x1050; const SiS_LCDDataStruct *SiS_NoScaleData1600x1200; + const SiS_LCDDataStruct *SiS_NoScaleData1280x768; const SiS_LCDDataStruct *SiS_StLCD1400x1050Data; const SiS_LCDDataStruct *SiS_StLCD1600x1200Data; + const SiS_LCDDataStruct *SiS_StLCD1280x768Data; const SiS_LCDDataStruct *SiS_ExtLCD1400x1050Data; const SiS_LCDDataStruct *SiS_ExtLCD1600x1200Data; + const SiS_LCDDataStruct *SiS_ExtLCD1280x768Data; + const SiS_LCDDataStruct *SiS_NoScaleData; const SiS_TVDataStruct *SiS_StPALData; const SiS_TVDataStruct *SiS_ExtPALData; const SiS_TVDataStruct *SiS_StNTSCData; const SiS_TVDataStruct *SiS_ExtNTSCData; -#ifdef oldHV - const SiS_TVDataStruct *SiS_St1HiTVData; const SiS_TVDataStruct *SiS_St2HiTVData; const SiS_TVDataStruct *SiS_ExtHiTVData; -#endif const UCHAR *SiS_NTSCTiming; const UCHAR *SiS_PALTiming; -#ifdef oldHV const UCHAR *SiS_HiTVExtTiming; const UCHAR *SiS_HiTVSt1Timing; const UCHAR *SiS_HiTVSt2Timing; @@ -364,7 +423,6 @@ typedef struct _SiS_Private const UCHAR *SiS_HiTVGroup3Data; const UCHAR *SiS_HiTVGroup3Simu; const UCHAR *SiS_HiTVGroup3Text; -#endif const SiS_PanelDelayTblStruct *SiS_PanelDelayTbl; const SiS_PanelDelayTblStruct *SiS_PanelDelayTblLVDS; const SiS_LVDSDataStruct *SiS_LVDS800x600Data_1; @@ -377,6 +435,8 @@ typedef struct _SiS_Private const SiS_LVDSDataStruct *SiS_LVDS1280x960Data_2; const SiS_LVDSDataStruct *SiS_LVDS1400x1050Data_1; const SiS_LVDSDataStruct *SiS_LVDS1400x1050Data_2; + const SiS_LVDSDataStruct *SiS_LVDS1600x1200Data_1; + const SiS_LVDSDataStruct *SiS_LVDS1600x1200Data_2; const SiS_LVDSDataStruct *SiS_LVDS1280x768Data_1; const SiS_LVDSDataStruct *SiS_LVDS1280x768Data_2; const SiS_LVDSDataStruct *SiS_LVDS1024x600Data_1; @@ -384,12 +444,23 @@ typedef struct _SiS_Private const SiS_LVDSDataStruct *SiS_LVDS1152x768Data_1; const SiS_LVDSDataStruct *SiS_LVDS1152x768Data_2; const SiS_LVDSDataStruct *SiS_LVDS640x480Data_1; + const SiS_LVDSDataStruct *SiS_LVDS640x480Data_2; const SiS_LVDSDataStruct *SiS_LVDS320x480Data_1; + const SiS_LVDSDataStruct *SiS_LCDA1024x768Data_1; + const SiS_LVDSDataStruct *SiS_LCDA1024x768Data_2; + const SiS_LVDSDataStruct *SiS_LCDA1280x1024Data_1; + const SiS_LVDSDataStruct *SiS_LCDA1280x1024Data_2; const SiS_LVDSDataStruct *SiS_LCDA1400x1050Data_1; const SiS_LVDSDataStruct *SiS_LCDA1400x1050Data_2; const SiS_LVDSDataStruct *SiS_LCDA1600x1200Data_1; const SiS_LVDSDataStruct *SiS_LCDA1600x1200Data_2; const SiS_LVDSDataStruct *SiS_LVDSXXXxXXXData_1; + const SiS_LVDSDataStruct *SiS_LVDSBARCO1366Data_1; + const SiS_LVDSDataStruct *SiS_LVDSBARCO1366Data_2; + const SiS_LVDSDataStruct *SiS_LVDSBARCO1024Data_1; + const SiS_LVDSDataStruct *SiS_LVDSBARCO1024Data_2; + const SiS_LVDSDataStruct *SiS_LVDS848x480Data_1; + const SiS_LVDSDataStruct *SiS_LVDS848x480Data_2; const SiS_LVDSDataStruct *SiS_CHTVUNTSCData; const SiS_LVDSDataStruct *SiS_CHTVONTSCData; const SiS_LVDSDataStruct *SiS_CHTVUPALData; @@ -415,6 +486,7 @@ typedef struct _SiS_Private const SiS_LVDSDesStruct *SiS_PanelType0d_1; const SiS_LVDSDesStruct *SiS_PanelType0e_1; const SiS_LVDSDesStruct *SiS_PanelType0f_1; + const SiS_LVDSDesStruct *SiS_PanelTypeNS_1; const SiS_LVDSDesStruct *SiS_PanelType00_2; const SiS_LVDSDesStruct *SiS_PanelType01_2; const SiS_LVDSDesStruct *SiS_PanelType02_2; @@ -431,6 +503,7 @@ typedef struct _SiS_Private const SiS_LVDSDesStruct *SiS_PanelType0d_2; const SiS_LVDSDesStruct *SiS_PanelType0e_2; const SiS_LVDSDesStruct *SiS_PanelType0f_2; + const SiS_LVDSDesStruct *SiS_PanelTypeNS_2; const SiS_LVDSDesStruct *LVDS1024x768Des_1; const SiS_LVDSDesStruct *LVDS1280x1024Des_1; @@ -479,6 +552,12 @@ typedef struct _SiS_Private const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_2_H; const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1; const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1_H; + const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1; + const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1_H; + const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2; + const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2_H; + const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3; + const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3_H; const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UNTSC; const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1ONTSC; const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UPAL; @@ -487,28 +566,23 @@ typedef struct _SiS_Private const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1320x480_1; - const SiS_LCDACRT1DataStruct *SiS_LCDACRT1800x600_1; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11024x768_1; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11280x1024_1; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11400x1050_1; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11600x1200_1; - const SiS_LCDACRT1DataStruct *SiS_LCDACRT1800x600_1_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11024x768_1_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11280x1024_1_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11400x1050_1_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11600x1200_1_H; - const SiS_LCDACRT1DataStruct *SiS_LCDACRT1800x600_2; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11024x768_2; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11280x1024_2; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11400x1050_2; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11600x1200_2; - const SiS_LCDACRT1DataStruct *SiS_LCDACRT1800x600_2_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11024x768_2_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11280x1024_2_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11400x1050_2_H; const SiS_LCDACRT1DataStruct *SiS_LCDACRT11600x1200_2_H; - /* TW: New for 650/301LV */ const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_1; const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_1; const SiS_Part2PortTblStruct *SiS_CRT2Part2_1400x1050_1; @@ -540,6 +614,9 @@ typedef struct _SiS_Private const UCHAR *SiS_CHTVVCLKUPALN; const UCHAR *SiS_CHTVVCLKOPALN; const UCHAR *SiS_CHTVVCLKSOPAL; + + USHORT PanelXRes; + USHORT PanelYRes; BOOLEAN UseCustomMode; BOOLEAN CRT1UsesCustomMode; @@ -561,10 +638,41 @@ typedef struct _SiS_Private UCHAR CSR2B; UCHAR CSR2C; USHORT CSRClock; + USHORT CSRClock_CRT1; USHORT CModeFlag; + USHORT CModeFlag_CRT1; USHORT CInfoFlag; - BOOLEAN SiS_CHPALM; - BOOLEAN SiS_CHPALN; + + int LVDSHL; + + BOOLEAN Backup; + UCHAR Backup_Mode; + UCHAR Backup_14; + UCHAR Backup_15; + UCHAR Backup_16; + UCHAR Backup_17; + UCHAR Backup_18; + UCHAR Backup_19; + UCHAR Backup_1a; + UCHAR Backup_1b; + UCHAR Backup_1c; + UCHAR Backup_1d; + + int UsePanelScaler; + + USHORT CP_Vendor, CP_Product; + BOOLEAN CP_HaveCustomData; + int CP_PreferredX, CP_PreferredY; + int CP_MaxX, CP_MaxY, CP_MaxClock; + int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */ + int CP_HTotal[7], CP_VTotal[7]; + int CP_HSyncStart[7], CP_VSyncStart[7]; + int CP_HSyncEnd[7], CP_VSyncEnd[7]; + int CP_HBlankStart[7], CP_VBlankStart[7]; + int CP_HBlankEnd[7], CP_VBlankEnd[7]; + int CP_Clock[7]; + BOOLEAN CP_DataValid[7]; + BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7]; } SiS_Private; #endif |