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

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

diff -urN linux-2.4.19/drivers/video/sis/vgatypes.h linux-2.4.20/drivers/video/sis/vgatypes.h
@@ -1,12 +1,18 @@
 #ifndef _VGATYPES_
 #define _VGATYPES_
 
+#ifdef LINUX_XF86
+#include "xf86Pci.h"
+#endif
+
+#ifdef LINUX_KERNEL  /* TW: We don't want the X driver to depend on kernel source */
+#include <linux/ioctl.h>
+#endif
 
 #ifndef TC
 #define far
 #endif
 
-
 #ifndef FALSE
 #define FALSE   0
 #endif
@@ -19,7 +25,7 @@
 #define NULL    0
 #endif
 
-#ifndef CHAR 
+#ifndef CHAR
 typedef char CHAR;
 #endif
 
@@ -43,7 +49,6 @@
 typedef unsigned long ULONG;
 #endif
 
-
 #ifndef PUCHAR
 typedef UCHAR far *PUCHAR;
 #endif
@@ -77,7 +82,7 @@
 #define VBIOS_VER_MAX_LENGTH         4
 #endif
 
-#ifndef LINUX_KERNEL
+#ifndef LINUX_KERNEL   /* For kernel, this is defined in sisfb.h */
 #ifndef WIN2000
 #ifndef SIS_CHIP_TYPE
 typedef enum _SIS_CHIP_TYPE {
@@ -109,13 +114,13 @@
 typedef enum _SIS_VB_CHIP_TYPE {
     VB_CHIP_Legacy = 0,
     VB_CHIP_301,
-    VB_CHIP_301B,
-    VB_CHIP_301BLCD,
-    VB_CHIP_301BTV,
+    VB_CHIP_301B,      
+    VB_CHIP_301LV,
+    VB_CHIP_301LVX,
     VB_CHIP_302,
     VB_CHIP_302B,
-    VB_CHIP_302BLCD,
-    VB_CHIP_302BTV, 
+    VB_CHIP_302LV,
+    VB_CHIP_302LVX,
     VB_CHIP_303,
     VB_CHIP_UNKNOWN, /* other video bridge or no video bridge */
     MAX_VB_CHIP
@@ -135,13 +140,18 @@
     LCD_1600x1200,
     LCD_1920x1440,
     LCD_2048x1536,
-    LCD_320x480,    /* TW: FSTN */
+    LCD_320x480,       /* TW: FSTN */
+    LCD_1400x1050,
+    LCD_1152x864,
+    LCD_1152x768,
+    LCD_1280x768,
+    LCD_1024x600,
     LCD_UNKNOWN
 } SIS_LCD_TYPE;
 #endif
 #endif
 
-#ifndef WIN2000 /* mark by Paul ,Move definition to sisv.h*/
+#ifndef WIN2000 /* mark by Paul, Move definition to sisv.h*/
 #ifndef PSIS_DSReg
 typedef struct _SIS_DSReg
 {
@@ -158,15 +168,15 @@
 
 
 struct _SIS_HW_DEVICE_INFO
-{   
+{
     PVOID  pDevice;              /* The pointer to the physical device data structure
                                     in each OS or NULL for unused. */
-    UCHAR  *pjVirtualRomBase;    /* Only for NT, NULL for WinCE & Linux. */
-                                 /* base virtual address of VBIOS ROM Space */
+    UCHAR  *pjVirtualRomBase;    /* base virtual address of VBIOS ROM Space */
                                  /* or base virtual address of ROM image file. */
                                  /* if NULL, then read from pjROMImage; */
                                  /* Note:ROM image file is the file of VBIOS ROM */
 
+    BOOLEAN UseROM;		 /* TW: Use the ROM image if provided */
  
     UCHAR  *pjCustomizedROMImage;/* base virtual address of ROM image file. */
                                  /* wincE:ROM image file is the file for OEM */
@@ -201,6 +211,7 @@
                                  /*             011:Trumpion LVDS Scaling Chip */
                                  /*             100:LVDS(LCD-out)+Chrontel 7005 */
                                  /*             101:Single Chrontel 7005 */
+				 /* TW: This has changed on 310/325 series! */
 
     ULONG  ulCRT2LCDType;        /* defined in the data structure type */
                                  /* "SIS_LCD_TYPE" */
@@ -217,7 +228,7 @@
                                  /* end data :(idx, val) =  (FF, FF) */
                                  /* Note : restore cR registers if  */
                                  /* bSkipDramSizing = TRUE */
-    
+
     PSIS_QUERYSPACE  pQueryVGAConfigSpace; /* Get/Set VGA Configuration  */
                                            /* space */
  
@@ -226,9 +237,48 @@
 
     UCHAR  szVBIOSVer[VBIOS_VER_MAX_LENGTH];
 
+    UCHAR  pdc;			/* TW: PanelDelayCompensation */
+
+#ifdef LINUX_XF86
+    PCITAG PciTag;		/* PCI Tag for Linux XF86 */
+#endif
+};
+#endif
+#endif 
+
+
+/* TW: Addtional IOCTL for communication sisfb <> X driver        */
+/*     If changing this, sisfb.h must also be changed (for sisfb) */
+
+#ifdef LINUX_XF86  /* We don't want the X driver to depend on the kernel source */
+
+/* TW: ioctl for identifying and giving some info (esp. memory heap start) */
+#define SISFB_GET_INFO    0x80046ef8  /* Wow, what a terrible hack... */
+
+/* TW: Structure argument for SISFB_GET_INFO ioctl  */
+typedef struct _SISFB_INFO sisfb_info, *psisfb_info;
+
+struct _SISFB_INFO {
+	unsigned long sisfb_id;         /* for identifying sisfb */
+#ifndef SISFB_ID
+#define SISFB_ID	  0x53495346    /* Identify myself with 'SISF' */
+#endif
+ 	int    chip_id;			/* PCI ID of detected chip */
+	int    memory;			/* video memory in KB which sisfb manages */
+	int    heapstart;               /* heap start (= sisfb "mem" argument) in KB */
+	unsigned char fbvidmode;	/* current sisfb mode */
+
+	unsigned char sisfb_version;
+	unsigned char sisfb_revision;
+	unsigned char sisfb_patchlevel;
+
+	unsigned char sisfb_caps;	/* sisfb's capabilities */
+
+	int    sisfb_tqlen;		/* turbo queue length (in KB) */
+
+	char reserved[249]; 		/* for future use */
 };
 #endif
-#endif/*~ mark by Paul ,Move definition to sisv.h*/
 
 #ifndef WIN2000
 #ifndef WINCE_HEADER

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