patch-2.4.20 linux-2.4.20/drivers/video/sis/initdef.h

Next file: linux-2.4.20/drivers/video/sis/oem300.h
Previous file: linux-2.4.20/drivers/video/sis/init301.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/video/sis/initdef.h linux-2.4.20/drivers/video/sis/initdef.h
@@ -1,6 +1,5 @@
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/initdef.h,v 1.4 2000/12/02 01:16:17 dawes Exp $ */
 
-/* Comments and changes marked with "TW" by Thomas Winischhofer <thomas@winischhofer.net> */
 
 #ifndef _INITDEF_
 #define _INITDEF_
@@ -10,22 +9,20 @@
 #define SiS630                  0x6300
 #define SiS730                  0x6300
 
-/*301b*/
-/* VBType */
+/* SiS_VBType */
 #define VB_SIS301	      	0x0001
 #define VB_SIS301B        	0x0002
 #define VB_SIS302B        	0x0004
-#define VB_SIS301LV     	0x0008 /*301lv*/
-#define VB_SIS302LV     	0x0010
+#define VB_SIS30xLV     	0x0008
+#define VB_SIS30xNEW     	0x0010
 #define VB_NoLCD        	0x8000
-/*end 301b*/
+#define VB_SIS301BLV302BLV      (VB_SIS301B|VB_SIS302B|VB_SIS30xLV|VB_SIS30xNEW)
 
 #define CRT1Len                 17
 #define LVDSCRT1Len             15
 #define CHTVRegDataLen          5
 
-#define ModeInfoFlag            0x07
-#define IsTextMode              0x07
+/* SiS_ModeType */
 #define ModeText                0x00
 #define ModeCGA                 0x01
 #define ModeEGA                 0x02
@@ -35,10 +32,14 @@
 #define Mode24Bpp               0x06
 #define Mode32Bpp               0x07
 
+#define ModeInfoFlag            0x07
+#define IsTextMode              0x07
+
 #define DACInfoFlag             0x18
 #define MemoryInfoFlag          0x1E0
 #define MemorySizeShift         0x05
 
+/* modeflag */
 #define Charx8Dot               0x0200
 #define LineCompareOff          0x0400
 #define CRT2Mode                0x0800
@@ -69,7 +70,7 @@
 #define ECLKindex4              0x0400
 
 /* VBInfo */
-#define SetSimuScanMode         0x0001
+#define SetSimuScanMode         0x0001   /* CR 30 */
 #define SwitchToCRT2            0x0002
 #define SetCRT2ToTV             0x009C
 #define SetCRT2ToAVIDEO         0x0004
@@ -78,30 +79,93 @@
 #define SetCRT2ToLCD            0x0020
 #define SetCRT2ToRAMDAC         0x0040
 #define SetCRT2ToHiVisionTV     0x0080
-#define SetNTSCTV               0x0000
+#define SetNTSCTV               0x0000   /* CR 31 */
 #define SetPALTV                0x0100
 #define SetInSlaveMode          0x0200
 #define SetNotSimuMode          0x0400
 #define SetNotSimuTVMode        0x0400
 #define SetDispDevSwitch        0x0800
 #define LoadDACFlag             0x1000
+#define SetCHTVOverScan  	0x1000  /* TW: Re-defined (from 0x8000) */
 #define DisableCRT2Display      0x2000
+#define CRT2DisplayFlag         0x2000
 #define DriverMode              0x4000
-#define HotKeySwitch            0x8000
-#define SetCHTVOverScan  	0x8000
-#define SetCRT2ToLCDA           0x8000/*301b*/
+#define HotKeySwitch            0x8000  /* TW: ? */
+#define SetCRT2ToLCDA           0x8000
+
 #define PanelRGB18Bit           0x0100
 #define PanelRGB24Bit           0x0000
 
-#define TVOverScan              0x10
+#define TVOverScan              0x10    /* Bit in CR35 (300 series only) */
 #define TVOverScanShift         4
 #define ClearBufferFlag         0x20
-#define EnableDualEdge 		0x01		/*301b*/	
-#define SetToLCDA		0x02
+
+/* CR32 (Newer 630, and 310/325 series)
+
+   [0]   VB connected with CVBS
+   [1]   VB connected with SVHS
+   [2]   VB connected with SCART
+   [3]   VB connected with LCD
+   [4]   VB connected with CRT2 (secondary VGA)
+   [5]   CRT1 monitor is connected
+   [6]   VB connected with Hi-Vision TV
+   [7]   VB connected with DVI combo connector
+
+
+   CR37
+
+   [0]   Set 24/18 bit (0/1) RGB to LVDS/TMDS transmitter (set by BIOS)
+   [3:1] External chip
+         300 series:
+	    001   SiS301 (never seen)
+	    010   LVDS
+	    011   LVDS + Tumpion Zurac
+	    100   LVDS + Chrontel 7005
+	    110   Chrontel 7005
+	  310/325 series
+	    001   SiS30x (never seen)
+	    010   LVDS
+	    011   LVDS + Chrontel 7019
+	  All other combinations reserved
+   [4]    LVDS: Expanding(0)/Non-expanding(1) LCD display
+          30x:  SiS30x(0)/LCD monitor(1) scaling display
+   [5]    LCD polarity select
+          0: VESA DMT Standard
+	  1: EDID 2.x defined
+   [6]    LCD horizontal polarity select
+          0: High active
+	  1: Low active
+   [7]    LCD vertical polarity select
+          0: High active
+	  1: Low active
+*/
+
+#define EnableDualEdge 		0x01   /* CR38 (310/325 series) */
+/* #define PAL_NTSC             0x01      (only on 315PRO) */
+#define SetToLCDA		0x02   /* TW: LCD channel A (302B and 650+LVDS only) */
+#define EnableLVDSHiVision      0x08   /* TW: Only on 650/LVDS systems */
+#define SetYPbPr                0x10   /* TW: YPbPr color format */
+#define EnablePALMN             0x40
+#define EnablePALN              0x80
+
+/* CR79 (310/325 series only)
+   [3-0] Notify driver
+         0001 Mode Switch event (set by BIOS)
+	 0010 Epansion On/Off event
+	 0011 TV UnderScan/OverScan event
+	 0100 Set Brightness event
+	 0101 Set Contrast event
+	 0110 Set Mute event
+	 0111 Set Volume Up/Down event
+   [4]   Enable Backlight Control by BIOS/driver (set by driver)
+   [5]   PAL/NTSC (set by BIOS)
+   [6]   Expansion On/Off (set by BIOS)
+   [7]   TV UnderScan/OverScan (set by BIOS)
+*/
+
 
 #define SetSCARTOutput          0x01
 #define BoardTVType             0x02
-#define EnablePALMN             0x40
 
 /* SetFlag */
 #define ProgrammingCRT2         0x01
@@ -112,41 +176,69 @@
 #define SetDispDevSwitchFlag    0x20
 #define CheckWinDos             0x40
 #define SetJDOSMode             0x80
+#define CRT2IsVGA	        0x80  /* TW: Not sure about this name... */
 
 /* LCDResInfo */
-#define Panel800x600            0x01
-#define Panel1024x768           0x02
-#define Panel1280x1024          0x03
-#define Panel1280x960           0x04
-#define Panel640x480            0x05
-#define Panel1600x1200          0x06 /*301b*/
-#define Panel320x480            0x07 /*fstn*/
+#define Panel300_800x600        0x01	/* CR36 */
+#define Panel300_1024x768       0x02
+#define Panel300_1280x1024      0x03
+#define Panel300_1280x960       0x04
+#define Panel300_640x480        0x05
+#define Panel300_1024x600       0x06
+#define Panel300_1152x768       0x07
+#define Panel300_320x480        0x08 	/* fstn - TW: This is fake, can be any */
+
+#define Panel310_800x600        0x01
+#define Panel310_1024x768       0x02
+#define Panel310_1280x1024      0x03
+#define Panel310_640x480        0x04
+#define Panel310_1024x600       0x05
+#define Panel310_1152x864       0x06
+#define Panel310_1280x960       0x07
+#define Panel310_1152x768       0x08	/* TW: LVDS only */
+#define Panel310_1400x1050      0x09
+#define Panel310_1280x768       0x0a    /* TW: LVDS only */
+#define Panel310_1600x1200      0x0b
+#define Panel310_320x480        0x0c    /* fstn - TW: This is fake, can be any */
+
+#define Panel_800x600           0x01	/* Unified values */
+#define Panel_1024x768          0x02
+#define Panel_1280x1024         0x03
+#define Panel_640x480           0x04
+#define Panel_1024x600          0x05
+#define Panel_1152x864          0x06
+#define Panel_1280x960          0x07
+#define Panel_1152x768          0x08	/* TW: LVDS only */
+#define Panel_1400x1050         0x09
+#define Panel_1280x768          0x0a    /* TW: LVDS only */
+#define Panel_1600x1200         0x0b
+#define Panel_320x480           0x0c    /* fstn - TW: This is fake, can be any */
 
 #define ExtChipType             0x0e
 #define ExtChip301              0x02
 #define ExtChipLVDS             0x04
 #define ExtChipTrumpion         0x06
 #define ExtChipCH7005           0x08
-#define ExtChipMitacTV          0x0a
+#define ExtChipMitacTV          0x0a            /* TW: Incorrect, 0x0a = Chrontel 7005 only */
+
+#define IsM650                  0x80   		/* TW: CR5F */
 
 /* LCDInfo */
 #define LCDRGB18Bit             0x01
+#define LCDNonExpandingShift    0x04
 #define LCDNonExpanding         0x10
-
-#define LCDNonExpandingShift    4
 #define LCDSync                 0x20
+#define LCDPass11              0x100 
 #define LCDSyncBit              0xe0
 #define LCDSyncShift            6
 
-#define DDC2DelayTime           300     
-
-#define CRT2DisplayFlag         0x2000
 #define LCDDataLen              8
 #define HiTVDataLen             12
 #define TVDataLen               16
 #define SetPALTV                0x0100
-#define HalfDCLK                0x1000
+#define HalfDCLK                0x1000  /* modeflag */
 #define NTSCHT                  1716
+#define NTSC2HT                 1920
 #define NTSCVT                  525
 #define PALHT                   1728
 #define PALVT                   625
@@ -159,25 +251,23 @@
 
 #define VCLKStartFreq           25
 #define SoftDramType            0x80
-#define VCLK40                  0x04
-#define VCLK65                  0x09
-#define VCLK108_2               0x14
-#define LCDRGB18Bit             0x01
+
+#define VCLK40                  0x04   /* Index in VCLKData array */
+#define VCLK65                  0x09   /* Index in VCLKData array */
+#define VCLK108_2               0x14   /* Index in VCLKData array */
+#define TVVCLKDIV2              0x21   /* Indices in (VB)VCLKData arrays */
+#define TVVCLK                  0x22
+#define HiTVVCLKDIV2            0x23
+#define HiTVVCLK                0x24
+#define HiTVSimuVCLK            0x25
+#define HiTVTextVCLK            0x26
+
 #define LoadDACFlag             0x1000
 #define AfterLockCRT2           0x4000
 #define SetCRT2ToAVIDEO         0x0004
 #define SetCRT2ToSCART          0x0010
 #define Ext2StructSize          5
 
-#define TVVCLKDIV2              0x021
-#define TVVCLK                  0x022
-
-#define HiTVVCLKDIV2            0x023
-#define HiTVVCLK                0x024
-#define HiTVSimuVCLK            0x025
-#define HiTVTextVCLK            0x026
-#define SwitchToCRT2            0x0002
-#define LCDVESATiming           0x08
 #define SetSCARTOutput          0x01
 #define AVIDEOSense             0x01
 #define SVIDEOSense             0x02
@@ -190,14 +280,13 @@
 #define HotPlugFunction         0x08
 #define StStructSize            0x06
 
-#define SIS_CRT2_PORT_04        0x04 - 0x030
+#define SIS_CRT2_PORT_04        0x04 - 0x30
 #define SIS_CRT2_PORT_10        0x10 - 0x30
 #define SIS_CRT2_PORT_12        0x12 - 0x30
 #define SIS_CRT2_PORT_14        0x14 - 0x30
 
-#define LCDNonExpanding         0x10
 #define ADR_CRT2PtrData         0x20E
-#define offset_Zurac            0x210
+#define offset_Zurac            0x210   /* TW: Trumpion Zurac data pointer */
 #define ADR_LVDSDesPtrData      0x212
 #define ADR_LVDSCRT1DataPtr     0x214
 #define ADR_CHTVVCLKPtr         0x216
@@ -235,7 +324,7 @@
 #define _PanelType0F             0x78
 
 #define PRIMARY_VGA       	0     /* 1: SiS is primary vga 0:SiS is secondary vga */
-#define BIOSIDCodeAddr          0x235
+#define BIOSIDCodeAddr          0x235  /* TW: Offsets to ptrs in BIOS image */
 #define OEMUtilIDCodeAddr       0x237
 #define VBModeIDTableAddr       0x239
 #define OEMTVPtrAddr            0x241
@@ -276,9 +365,11 @@
 
 #define OEMLCDPanelIDSupport    0x0080
 
-/* =============================================================
-   			for 310
-============================================================== */
+/*
+  =============================================================
+   			for 310/325 series
+  =============================================================
+*/
 #define SoftDRAMType        0x80
 #define SoftSetting_OFFSET  0x52
 #define SR07_OFFSET  0x7C

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)