Merge branch 'stable/xen-swiotlb-0.8.6' of git://git.kernel.org/pub/scm/linux/kernel...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / xgifb / vgatypes.h
CommitLineData
d7636e0b 1
2#ifndef _VGATYPES_
3#define _VGATYPES_
4
d7636e0b 5#include <linux/ioctl.h>
d7636e0b 6
d7636e0b 7#ifndef VBIOS_VER_MAX_LENGTH
6e5db771 8#define VBIOS_VER_MAX_LENGTH 5
d7636e0b 9#endif
10
d7636e0b 11#ifndef XGI_VB_CHIP_TYPE
621a683f 12enum XGI_VB_CHIP_TYPE {
d7636e0b 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
621a683f 24};
d7636e0b 25#endif
26
27#ifndef XGI_LCD_TYPE
621a683f 28enum XGI_LCD_TYPE {
d7636e0b 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
621a683f 52};
d7636e0b 53#endif
54
1d9f9a9b 55struct XGI_DSReg
d7636e0b 56{
108afbf8
BP
57 unsigned char jIdx;
58 unsigned char jVal;
1d9f9a9b
BP
59};
60
e4147abe 61struct xgi_hw_device_info
d7636e0b 62{
82d6eb5b 63 unsigned long ulExternalChip; /* NO VB or other video bridge*/
d7636e0b 64 /* if ujVBChipID = VB_CHIP_UNKNOWN, */
d7636e0b 65
274afb73 66 unsigned char *pjVirtualRomBase; /* ROM image */
d7636e0b 67
82d6eb5b 68 unsigned char UseROM; /* Use the ROM image if provided */
d7636e0b 69
fc3678a6 70 void *pDevice;
d7636e0b 71
274afb73 72 unsigned char *pjVideoMemoryAddress;/* base virtual memory address */
d7636e0b 73 /* of Linear VGA memory */
74
82d6eb5b 75 unsigned long ulVideoMemorySize; /* size, in bytes, of the memory on the board */
d7636e0b 76
274afb73 77 unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
d7636e0b 78
274afb73 79 unsigned char *pjCustomizedROMImage;
d7636e0b 80
274afb73 81 unsigned char *pj2ndVideoMemoryAddress;
82d6eb5b 82 unsigned long ul2ndVideoMemorySize;
d7636e0b 83
274afb73 84 unsigned char *pj2ndIOAddress;
108afbf8 85 unsigned char jChipType; /* Used to Identify Graphics Chip */
d7636e0b 86 /* defined in the data structure type */
87 /* "XGI_CHIP_TYPE" */
88
108afbf8 89 unsigned char jChipRevision; /* Used to Identify Graphics Chip Revision */
d7636e0b 90
108afbf8 91 unsigned char ujVBChipID; /* the ID of video bridge */
d7636e0b 92 /* defined in the data structure type */
93 /* "XGI_VB_CHIP_TYPE" */
94
82d6eb5b 95 unsigned char bNewScratch;
d7636e0b 96
82d6eb5b 97 unsigned long ulCRT2LCDType; /* defined in the data structure type */
d7636e0b 98
82d6eb5b 99 unsigned long usExternalChip; /* NO VB or other video bridge (other than */
d7636e0b 100 /* video bridge) */
101
82d6eb5b 102 unsigned char bIntegratedMMEnabled;/* supporting integration MM enable */
d7636e0b 103
82d6eb5b 104 unsigned char bSkipDramSizing; /* True: Skip video memory sizing. */
d7636e0b 105
82d6eb5b 106 unsigned char bSkipSense;
d7636e0b 107
82d6eb5b 108 unsigned char bIsPowerSaving; /* True: XGIInit() is invoked by power management,
d7636e0b 109 otherwise by 2nd adapter's initialzation */
110
1d9f9a9b 111 struct XGI_DSReg *pSR; /* restore SR registers in initial function. */
d7636e0b 112 /* end data :(idx, val) = (FF, FF). */
113 /* Note : restore SR registers if */
dda08c59 114 /* bSkipDramSizing = 1 */
d7636e0b 115
1d9f9a9b 116 struct XGI_DSReg *pCR; /* restore CR registers in initial function. */
d7636e0b 117 /* end data :(idx, val) = (FF, FF) */
118 /* Note : restore cR registers if */
dda08c59 119 /* bSkipDramSizing = 1 */
d7636e0b 120
e4147abe
BP
121 unsigned char(*pQueryVGAConfigSpace)(struct xgi_hw_device_info *,
122 unsigned long, unsigned long,
123 unsigned long *);
d7636e0b 124
e4147abe
BP
125 unsigned char(*pQueryNorthBridgeSpace)(struct xgi_hw_device_info *,
126 unsigned long, unsigned long,
127 unsigned long *);
d7636e0b 128
108afbf8 129 unsigned char szVBIOSVer[VBIOS_VER_MAX_LENGTH];
d7636e0b 130
131};
d7636e0b 132
133/* Addtional IOCTL for communication xgifb <> X driver */
134/* If changing this, xgifb.h must also be changed (for xgifb) */
135
d7636e0b 136
137#endif
138