5 #include <linux/ioctl.h>
20 typedef unsigned char UCHAR;
24 typedef unsigned short USHORT;
28 typedef unsigned long ULONG;
36 typedef UCHAR BOOLEAN;
43 typedef unsigned long XGIIOADDRESS;
46 #ifndef VBIOS_VER_MAX_LENGTH
47 #define VBIOS_VER_MAX_LENGTH 4
50 #ifndef XGI_VB_CHIP_TYPE
51 typedef enum _XGI_VB_CHIP_TYPE {
61 VB_CHIP_UNKNOWN, /* other video bridge or no video bridge */
67 typedef enum _XGI_LCD_TYPE {
69 LCD_320x480, /* FSTN, DSTN */
71 LCD_640x480_2, /* FSTN, DSTN */
72 LCD_640x480_3, /* FSTN, DSTN */
95 typedef struct _XGI_DSReg
99 } XGI_DSReg, *PXGI_DSReg;
102 #ifndef XGI_HW_DEVICE_INFO
104 typedef struct _XGI_HW_DEVICE_INFO XGI_HW_DEVICE_INFO, *PXGI_HW_DEVICE_INFO;
106 typedef BOOLEAN (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, ULONG, ULONG, ULONG *);
108 struct _XGI_HW_DEVICE_INFO
110 ULONG ulExternalChip; /* NO VB or other video bridge*/
111 /* if ujVBChipID = VB_CHIP_UNKNOWN, */
113 unsigned char *pjVirtualRomBase; /* ROM image */
115 BOOLEAN UseROM; /* Use the ROM image if provided */
119 unsigned char *pjVideoMemoryAddress;/* base virtual memory address */
120 /* of Linear VGA memory */
122 ULONG ulVideoMemorySize; /* size, in bytes, of the memory on the board */
124 unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
126 unsigned char *pjCustomizedROMImage;
128 unsigned char *pj2ndVideoMemoryAddress;
129 ULONG ul2ndVideoMemorySize;
131 unsigned char *pj2ndIOAddress;
132 UCHAR jChipType; /* Used to Identify Graphics Chip */
133 /* defined in the data structure type */
134 /* "XGI_CHIP_TYPE" */
136 UCHAR jChipRevision; /* Used to Identify Graphics Chip Revision */
138 UCHAR ujVBChipID; /* the ID of video bridge */
139 /* defined in the data structure type */
140 /* "XGI_VB_CHIP_TYPE" */
144 ULONG ulCRT2LCDType; /* defined in the data structure type */
146 ULONG usExternalChip; /* NO VB or other video bridge (other than */
149 BOOLEAN bIntegratedMMEnabled;/* supporting integration MM enable */
151 BOOLEAN bSkipDramSizing; /* True: Skip video memory sizing. */
155 BOOLEAN bIsPowerSaving; /* True: XGIInit() is invoked by power management,
156 otherwise by 2nd adapter's initialzation */
158 PXGI_DSReg pSR; /* restore SR registers in initial function. */
159 /* end data :(idx, val) = (FF, FF). */
160 /* Note : restore SR registers if */
161 /* bSkipDramSizing = 1 */
163 PXGI_DSReg pCR; /* restore CR registers in initial function. */
164 /* end data :(idx, val) = (FF, FF) */
165 /* Note : restore cR registers if */
166 /* bSkipDramSizing = 1 */
171 PXGI_QUERYSPACE pQueryVGAConfigSpace;
173 PXGI_QUERYSPACE pQueryNorthBridgeSpace;
175 UCHAR szVBIOSVer[VBIOS_VER_MAX_LENGTH];
180 /* Addtional IOCTL for communication xgifb <> X driver */
181 /* If changing this, xgifb.h must also be changed (for xgifb) */