Staging: xgifb: Remove USHORT, ULONG, BOOLEAN, and VOID typedefs
[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 CHAR
8typedef char CHAR;
9#endif
10
11#ifndef SHORT
12typedef short SHORT;
13#endif
14
15#ifndef LONG
16typedef long LONG;
17#endif
18
19#ifndef UCHAR
20typedef unsigned char UCHAR;
21#endif
22
d7636e0b 23typedef unsigned long XGIIOADDRESS;
d7636e0b 24
d7636e0b 25
26#ifndef VBIOS_VER_MAX_LENGTH
27#define VBIOS_VER_MAX_LENGTH 4
28#endif
29
d7636e0b 30#ifndef XGI_VB_CHIP_TYPE
31typedef enum _XGI_VB_CHIP_TYPE {
32 VB_CHIP_Legacy = 0,
33 VB_CHIP_301,
34 VB_CHIP_301B,
35 VB_CHIP_301LV,
36 VB_CHIP_302,
37 VB_CHIP_302B,
38 VB_CHIP_302LV,
39 VB_CHIP_301C,
40 VB_CHIP_302ELV,
41 VB_CHIP_UNKNOWN, /* other video bridge or no video bridge */
42 MAX_VB_CHIP
43} XGI_VB_CHIP_TYPE;
44#endif
45
46#ifndef XGI_LCD_TYPE
47typedef enum _XGI_LCD_TYPE {
48 LCD_INVALID = 0,
49 LCD_320x480, /* FSTN, DSTN */
50 LCD_640x480,
51 LCD_640x480_2, /* FSTN, DSTN */
52 LCD_640x480_3, /* FSTN, DSTN */
53 LCD_800x600,
54 LCD_848x480,
55 LCD_1024x600,
56 LCD_1024x768,
57 LCD_1152x768,
58 LCD_1152x864,
59 LCD_1280x720,
60 LCD_1280x768,
61 LCD_1280x800,
62 LCD_1280x960,
63 LCD_1280x1024,
64 LCD_1400x1050,
65 LCD_1600x1200,
66 LCD_1680x1050,
67 LCD_1920x1440,
68 LCD_2048x1536,
69 LCD_CUSTOM,
70 LCD_UNKNOWN
71} XGI_LCD_TYPE;
72#endif
73
d7636e0b 74#ifndef PXGI_DSReg
75typedef struct _XGI_DSReg
76{
77 UCHAR jIdx;
78 UCHAR jVal;
79} XGI_DSReg, *PXGI_DSReg;
80#endif
81
82#ifndef XGI_HW_DEVICE_INFO
83
84typedef struct _XGI_HW_DEVICE_INFO XGI_HW_DEVICE_INFO, *PXGI_HW_DEVICE_INFO;
85
82d6eb5b 86typedef unsigned char (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, unsigned long, unsigned long, unsigned long *);
d7636e0b 87
88struct _XGI_HW_DEVICE_INFO
89{
82d6eb5b 90 unsigned long ulExternalChip; /* NO VB or other video bridge*/
d7636e0b 91 /* if ujVBChipID = VB_CHIP_UNKNOWN, */
d7636e0b 92
274afb73 93 unsigned char *pjVirtualRomBase; /* ROM image */
d7636e0b 94
82d6eb5b 95 unsigned char UseROM; /* Use the ROM image if provided */
d7636e0b 96
fc3678a6 97 void *pDevice;
d7636e0b 98
274afb73 99 unsigned char *pjVideoMemoryAddress;/* base virtual memory address */
d7636e0b 100 /* of Linear VGA memory */
101
82d6eb5b 102 unsigned long ulVideoMemorySize; /* size, in bytes, of the memory on the board */
d7636e0b 103
274afb73 104 unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
d7636e0b 105
274afb73 106 unsigned char *pjCustomizedROMImage;
d7636e0b 107
274afb73 108 unsigned char *pj2ndVideoMemoryAddress;
82d6eb5b 109 unsigned long ul2ndVideoMemorySize;
d7636e0b 110
274afb73 111 unsigned char *pj2ndIOAddress;
d7636e0b 112 UCHAR jChipType; /* Used to Identify Graphics Chip */
113 /* defined in the data structure type */
114 /* "XGI_CHIP_TYPE" */
115
116 UCHAR jChipRevision; /* Used to Identify Graphics Chip Revision */
117
118 UCHAR ujVBChipID; /* the ID of video bridge */
119 /* defined in the data structure type */
120 /* "XGI_VB_CHIP_TYPE" */
121
82d6eb5b 122 unsigned char bNewScratch;
d7636e0b 123
82d6eb5b 124 unsigned long ulCRT2LCDType; /* defined in the data structure type */
d7636e0b 125
82d6eb5b 126 unsigned long usExternalChip; /* NO VB or other video bridge (other than */
d7636e0b 127 /* video bridge) */
128
82d6eb5b 129 unsigned char bIntegratedMMEnabled;/* supporting integration MM enable */
d7636e0b 130
82d6eb5b 131 unsigned char bSkipDramSizing; /* True: Skip video memory sizing. */
d7636e0b 132
82d6eb5b 133 unsigned char bSkipSense;
d7636e0b 134
82d6eb5b 135 unsigned char bIsPowerSaving; /* True: XGIInit() is invoked by power management,
d7636e0b 136 otherwise by 2nd adapter's initialzation */
137
138 PXGI_DSReg pSR; /* restore SR registers in initial function. */
139 /* end data :(idx, val) = (FF, FF). */
140 /* Note : restore SR registers if */
dda08c59 141 /* bSkipDramSizing = 1 */
d7636e0b 142
143 PXGI_DSReg pCR; /* restore CR registers in initial function. */
144 /* end data :(idx, val) = (FF, FF) */
145 /* Note : restore cR registers if */
dda08c59 146 /* bSkipDramSizing = 1 */
d7636e0b 147/*
148#endif
149*/
150
151 PXGI_QUERYSPACE pQueryVGAConfigSpace;
152
153 PXGI_QUERYSPACE pQueryNorthBridgeSpace;
154
155 UCHAR szVBIOSVer[VBIOS_VER_MAX_LENGTH];
156
157};
158#endif
159
160/* Addtional IOCTL for communication xgifb <> X driver */
161/* If changing this, xgifb.h must also be changed (for xgifb) */
162
d7636e0b 163
164#endif
165