apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 1 | |
| 2 | #ifndef _VGATYPES_ |
| 3 | #define _VGATYPES_ |
| 4 | |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 5 | #include <linux/ioctl.h> |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 6 | |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 7 | #ifndef VBIOS_VER_MAX_LENGTH |
Bill Pemberton | 6e5db77 | 2010-06-17 13:10:57 -0400 | [diff] [blame] | 8 | #define VBIOS_VER_MAX_LENGTH 5 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 9 | #endif |
| 10 | |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 11 | #ifndef XGI_VB_CHIP_TYPE |
Bill Pemberton | 621a683 | 2010-06-17 13:10:48 -0400 | [diff] [blame] | 12 | enum XGI_VB_CHIP_TYPE { |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 13 | 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 Pemberton | 621a683 | 2010-06-17 13:10:48 -0400 | [diff] [blame] | 24 | }; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 25 | #endif |
| 26 | |
| 27 | #ifndef XGI_LCD_TYPE |
Bill Pemberton | 621a683 | 2010-06-17 13:10:48 -0400 | [diff] [blame] | 28 | enum XGI_LCD_TYPE { |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 29 | 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 Pemberton | 621a683 | 2010-06-17 13:10:48 -0400 | [diff] [blame] | 52 | }; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 53 | #endif |
| 54 | |
Bill Pemberton | 1d9f9a9 | 2010-06-17 13:10:49 -0400 | [diff] [blame] | 55 | struct XGI_DSReg |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 56 | { |
Bill Pemberton | 108afbf | 2010-06-17 13:10:47 -0400 | [diff] [blame] | 57 | unsigned char jIdx; |
| 58 | unsigned char jVal; |
Bill Pemberton | 1d9f9a9 | 2010-06-17 13:10:49 -0400 | [diff] [blame] | 59 | }; |
| 60 | |
Bill Pemberton | e4147ab | 2010-06-17 13:10:50 -0400 | [diff] [blame] | 61 | struct xgi_hw_device_info |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 62 | { |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 63 | unsigned long ulExternalChip; /* NO VB or other video bridge*/ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 64 | /* if ujVBChipID = VB_CHIP_UNKNOWN, */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 65 | |
Bill Pemberton | 274afb7 | 2010-06-17 13:10:43 -0400 | [diff] [blame] | 66 | unsigned char *pjVirtualRomBase; /* ROM image */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 67 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 68 | unsigned char UseROM; /* Use the ROM image if provided */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 69 | |
Bill Pemberton | fc3678a | 2010-06-17 13:10:44 -0400 | [diff] [blame] | 70 | void *pDevice; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 71 | |
Bill Pemberton | 274afb7 | 2010-06-17 13:10:43 -0400 | [diff] [blame] | 72 | unsigned char *pjVideoMemoryAddress;/* base virtual memory address */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 73 | /* of Linear VGA memory */ |
| 74 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 75 | unsigned long ulVideoMemorySize; /* size, in bytes, of the memory on the board */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 76 | |
Bill Pemberton | 274afb7 | 2010-06-17 13:10:43 -0400 | [diff] [blame] | 77 | unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 78 | |
Bill Pemberton | 274afb7 | 2010-06-17 13:10:43 -0400 | [diff] [blame] | 79 | unsigned char *pjCustomizedROMImage; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 80 | |
Bill Pemberton | 274afb7 | 2010-06-17 13:10:43 -0400 | [diff] [blame] | 81 | unsigned char *pj2ndVideoMemoryAddress; |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 82 | unsigned long ul2ndVideoMemorySize; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 83 | |
Bill Pemberton | 274afb7 | 2010-06-17 13:10:43 -0400 | [diff] [blame] | 84 | unsigned char *pj2ndIOAddress; |
Bill Pemberton | 108afbf | 2010-06-17 13:10:47 -0400 | [diff] [blame] | 85 | unsigned char jChipType; /* Used to Identify Graphics Chip */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 86 | /* defined in the data structure type */ |
| 87 | /* "XGI_CHIP_TYPE" */ |
| 88 | |
Bill Pemberton | 108afbf | 2010-06-17 13:10:47 -0400 | [diff] [blame] | 89 | unsigned char jChipRevision; /* Used to Identify Graphics Chip Revision */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 90 | |
Bill Pemberton | 108afbf | 2010-06-17 13:10:47 -0400 | [diff] [blame] | 91 | unsigned char ujVBChipID; /* the ID of video bridge */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 92 | /* defined in the data structure type */ |
| 93 | /* "XGI_VB_CHIP_TYPE" */ |
| 94 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 95 | unsigned char bNewScratch; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 96 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 97 | unsigned long ulCRT2LCDType; /* defined in the data structure type */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 98 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 99 | unsigned long usExternalChip; /* NO VB or other video bridge (other than */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 100 | /* video bridge) */ |
| 101 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 102 | unsigned char bIntegratedMMEnabled;/* supporting integration MM enable */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 103 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 104 | unsigned char bSkipDramSizing; /* True: Skip video memory sizing. */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 105 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 106 | unsigned char bSkipSense; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 107 | |
Bill Pemberton | 82d6eb5 | 2010-06-17 13:10:46 -0400 | [diff] [blame] | 108 | unsigned char bIsPowerSaving; /* True: XGIInit() is invoked by power management, |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 109 | otherwise by 2nd adapter's initialzation */ |
| 110 | |
Bill Pemberton | 1d9f9a9 | 2010-06-17 13:10:49 -0400 | [diff] [blame] | 111 | struct XGI_DSReg *pSR; /* restore SR registers in initial function. */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 112 | /* end data :(idx, val) = (FF, FF). */ |
| 113 | /* Note : restore SR registers if */ |
Bill Pemberton | dda08c5 | 2010-06-17 13:10:42 -0400 | [diff] [blame] | 114 | /* bSkipDramSizing = 1 */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 115 | |
Bill Pemberton | 1d9f9a9 | 2010-06-17 13:10:49 -0400 | [diff] [blame] | 116 | struct XGI_DSReg *pCR; /* restore CR registers in initial function. */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 117 | /* end data :(idx, val) = (FF, FF) */ |
| 118 | /* Note : restore cR registers if */ |
Bill Pemberton | dda08c5 | 2010-06-17 13:10:42 -0400 | [diff] [blame] | 119 | /* bSkipDramSizing = 1 */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 120 | |
Bill Pemberton | e4147ab | 2010-06-17 13:10:50 -0400 | [diff] [blame] | 121 | unsigned char(*pQueryVGAConfigSpace)(struct xgi_hw_device_info *, |
| 122 | unsigned long, unsigned long, |
| 123 | unsigned long *); |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 124 | |
Bill Pemberton | e4147ab | 2010-06-17 13:10:50 -0400 | [diff] [blame] | 125 | unsigned char(*pQueryNorthBridgeSpace)(struct xgi_hw_device_info *, |
| 126 | unsigned long, unsigned long, |
| 127 | unsigned long *); |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 128 | |
Bill Pemberton | 108afbf | 2010-06-17 13:10:47 -0400 | [diff] [blame] | 129 | unsigned char szVBIOSVer[VBIOS_VER_MAX_LENGTH]; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 130 | |
| 131 | }; |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 132 | |
| 133 | /* Addtional IOCTL for communication xgifb <> X driver */ |
| 134 | /* If changing this, xgifb.h must also be changed (for xgifb) */ |
| 135 | |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 136 | |
| 137 | #endif |
| 138 | |