blob: df839eeb5efd0077536024f900010f3366915613 [file] [log] [blame]
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02001
2#ifndef _VGATYPES_
3#define _VGATYPES_
4
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02005#include <linux/ioctl.h>
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02006
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02007#ifndef VBIOS_VER_MAX_LENGTH
Bill Pemberton6e5db772010-06-17 13:10:57 -04008#define VBIOS_VER_MAX_LENGTH 5
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02009#endif
10
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020011#ifndef XGI_VB_CHIP_TYPE
Bill Pemberton621a6832010-06-17 13:10:48 -040012enum XGI_VB_CHIP_TYPE {
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020013 VB_CHIP_Legacy = 0,
14 VB_CHIP_301,
15 VB_CHIP_301B,
16 VB_CHIP_301LV,
17 VB_CHIP_302,
18 VB_CHIP_302B,
19 VB_CHIP_302LV,
20 VB_CHIP_301C,
21 VB_CHIP_302ELV,
22 VB_CHIP_UNKNOWN, /* other video bridge or no video bridge */
23 MAX_VB_CHIP
Bill Pemberton621a6832010-06-17 13:10:48 -040024};
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020025#endif
26
27#ifndef XGI_LCD_TYPE
Bill Pemberton621a6832010-06-17 13:10:48 -040028enum XGI_LCD_TYPE {
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020029 LCD_INVALID = 0,
30 LCD_320x480, /* FSTN, DSTN */
31 LCD_640x480,
32 LCD_640x480_2, /* FSTN, DSTN */
33 LCD_640x480_3, /* FSTN, DSTN */
34 LCD_800x600,
35 LCD_848x480,
36 LCD_1024x600,
37 LCD_1024x768,
38 LCD_1152x768,
39 LCD_1152x864,
40 LCD_1280x720,
41 LCD_1280x768,
42 LCD_1280x800,
43 LCD_1280x960,
44 LCD_1280x1024,
45 LCD_1400x1050,
46 LCD_1600x1200,
47 LCD_1680x1050,
48 LCD_1920x1440,
49 LCD_2048x1536,
50 LCD_CUSTOM,
51 LCD_UNKNOWN
Bill Pemberton621a6832010-06-17 13:10:48 -040052};
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020053#endif
54
Bill Pemberton1d9f9a92010-06-17 13:10:49 -040055struct XGI_DSReg
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020056{
Bill Pemberton108afbf2010-06-17 13:10:47 -040057 unsigned char jIdx;
58 unsigned char jVal;
Bill Pemberton1d9f9a92010-06-17 13:10:49 -040059};
60
Bill Pembertone4147ab2010-06-17 13:10:50 -040061struct xgi_hw_device_info
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020062{
Bill Pemberton82d6eb52010-06-17 13:10:46 -040063 unsigned long ulExternalChip; /* NO VB or other video bridge*/
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020064 /* if ujVBChipID = VB_CHIP_UNKNOWN, */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020065
Bill Pemberton274afb72010-06-17 13:10:43 -040066 unsigned char *pjVirtualRomBase; /* ROM image */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020067
Bill Pemberton82d6eb52010-06-17 13:10:46 -040068 unsigned char UseROM; /* Use the ROM image if provided */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020069
Bill Pembertonfc3678a2010-06-17 13:10:44 -040070 void *pDevice;
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020071
Bill Pemberton274afb72010-06-17 13:10:43 -040072 unsigned char *pjVideoMemoryAddress;/* base virtual memory address */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020073 /* of Linear VGA memory */
74
Bill Pemberton82d6eb52010-06-17 13:10:46 -040075 unsigned long ulVideoMemorySize; /* size, in bytes, of the memory on the board */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020076
Bill Pemberton274afb72010-06-17 13:10:43 -040077 unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020078
Bill Pemberton274afb72010-06-17 13:10:43 -040079 unsigned char *pjCustomizedROMImage;
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020080
Bill Pemberton274afb72010-06-17 13:10:43 -040081 unsigned char *pj2ndVideoMemoryAddress;
Bill Pemberton82d6eb52010-06-17 13:10:46 -040082 unsigned long ul2ndVideoMemorySize;
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020083
Bill Pemberton274afb72010-06-17 13:10:43 -040084 unsigned char *pj2ndIOAddress;
Bill Pemberton108afbf2010-06-17 13:10:47 -040085 unsigned char jChipType; /* Used to Identify Graphics Chip */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020086 /* defined in the data structure type */
87 /* "XGI_CHIP_TYPE" */
88
Bill Pemberton108afbf2010-06-17 13:10:47 -040089 unsigned char jChipRevision; /* Used to Identify Graphics Chip Revision */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020090
Bill Pemberton108afbf2010-06-17 13:10:47 -040091 unsigned char ujVBChipID; /* the ID of video bridge */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020092 /* defined in the data structure type */
93 /* "XGI_VB_CHIP_TYPE" */
94
Bill Pemberton82d6eb52010-06-17 13:10:46 -040095 unsigned char bNewScratch;
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020096
Bill Pemberton82d6eb52010-06-17 13:10:46 -040097 unsigned long ulCRT2LCDType; /* defined in the data structure type */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020098
Bill Pemberton82d6eb52010-06-17 13:10:46 -040099 unsigned long usExternalChip; /* NO VB or other video bridge (other than */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200100 /* video bridge) */
101
Bill Pemberton82d6eb52010-06-17 13:10:46 -0400102 unsigned char bIntegratedMMEnabled;/* supporting integration MM enable */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200103
Bill Pemberton82d6eb52010-06-17 13:10:46 -0400104 unsigned char bSkipDramSizing; /* True: Skip video memory sizing. */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200105
Bill Pemberton82d6eb52010-06-17 13:10:46 -0400106 unsigned char bSkipSense;
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200107
Bill Pemberton82d6eb52010-06-17 13:10:46 -0400108 unsigned char bIsPowerSaving; /* True: XGIInit() is invoked by power management,
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200109 otherwise by 2nd adapter's initialzation */
110
Bill Pemberton1d9f9a92010-06-17 13:10:49 -0400111 struct XGI_DSReg *pSR; /* restore SR registers in initial function. */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200112 /* end data :(idx, val) = (FF, FF). */
113 /* Note : restore SR registers if */
Bill Pembertondda08c52010-06-17 13:10:42 -0400114 /* bSkipDramSizing = 1 */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200115
Bill Pemberton1d9f9a92010-06-17 13:10:49 -0400116 struct XGI_DSReg *pCR; /* restore CR registers in initial function. */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200117 /* end data :(idx, val) = (FF, FF) */
118 /* Note : restore cR registers if */
Bill Pembertondda08c52010-06-17 13:10:42 -0400119 /* bSkipDramSizing = 1 */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200120
Bill Pembertone4147ab2010-06-17 13:10:50 -0400121 unsigned char(*pQueryVGAConfigSpace)(struct xgi_hw_device_info *,
122 unsigned long, unsigned long,
123 unsigned long *);
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200124
Bill Pembertone4147ab2010-06-17 13:10:50 -0400125 unsigned char(*pQueryNorthBridgeSpace)(struct xgi_hw_device_info *,
126 unsigned long, unsigned long,
127 unsigned long *);
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200128
Bill Pemberton108afbf2010-06-17 13:10:47 -0400129 unsigned char szVBIOSVer[VBIOS_VER_MAX_LENGTH];
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200130
131};
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200132
133/* Addtional IOCTL for communication xgifb <> X driver */
134/* If changing this, xgifb.h must also be changed (for xgifb) */
135
apatard@mandriva.comd7636e02010-05-19 10:44:14 +0200136
137#endif
138