blob: 5aeb3a4d66fb744a262a642bc24c6ba2491a82ff [file] [log] [blame]
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02001#ifndef _VGATYPES_
2#define _VGATYPES_
3
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02004#include <linux/ioctl.h>
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02005
apatard@mandriva.comd7636e02010-05-19 10:44:14 +02006#ifndef XGI_VB_CHIP_TYPE
Bill Pemberton621a6832010-06-17 13:10:48 -04007enum XGI_VB_CHIP_TYPE {
Kenji Toyamaeae5f022011-04-24 13:46:25 +08008 VB_CHIP_Legacy = 0,
9 VB_CHIP_301,
10 VB_CHIP_301B,
11 VB_CHIP_301LV,
12 VB_CHIP_302,
13 VB_CHIP_302B,
14 VB_CHIP_302LV,
15 VB_CHIP_301C,
16 VB_CHIP_302ELV,
17 VB_CHIP_UNKNOWN, /* other video bridge or no video bridge */
18 MAX_VB_CHIP
Bill Pemberton621a6832010-06-17 13:10:48 -040019};
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020020#endif
21
22#ifndef XGI_LCD_TYPE
Bill Pemberton621a6832010-06-17 13:10:48 -040023enum XGI_LCD_TYPE {
Kenji Toyamaeae5f022011-04-24 13:46:25 +080024 LCD_INVALID = 0,
25 LCD_320x480, /* FSTN, DSTN */
26 LCD_640x480,
27 LCD_640x480_2, /* FSTN, DSTN */
28 LCD_640x480_3, /* FSTN, DSTN */
29 LCD_800x600,
30 LCD_848x480,
31 LCD_1024x600,
32 LCD_1024x768,
33 LCD_1152x768,
34 LCD_1152x864,
35 LCD_1280x720,
36 LCD_1280x768,
37 LCD_1280x800,
38 LCD_1280x960,
39 LCD_1280x1024,
40 LCD_1400x1050,
41 LCD_1600x1200,
42 LCD_1680x1050,
43 LCD_1920x1440,
44 LCD_2048x1536,
45 LCD_CUSTOM,
46 LCD_UNKNOWN
Bill Pemberton621a6832010-06-17 13:10:48 -040047};
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020048#endif
49
Kenji Toyamaeae5f022011-04-24 13:46:25 +080050struct XGI_DSReg {
51 unsigned char jIdx;
52 unsigned char jVal;
Bill Pemberton1d9f9a92010-06-17 13:10:49 -040053};
54
Kenji Toyamaeae5f022011-04-24 13:46:25 +080055struct xgi_hw_device_info {
56 unsigned long ulExternalChip; /* NO VB or other video bridge*/
57 /* if ujVBChipID = VB_CHIP_UNKNOWN, */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020058
Kenji Toyamaeae5f022011-04-24 13:46:25 +080059 unsigned char *pjVirtualRomBase; /* ROM image */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020060
Kenji Toyamaeae5f022011-04-24 13:46:25 +080061 unsigned char *pjVideoMemoryAddress;/* base virtual memory address */
62 /* of Linear VGA memory */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020063
Kenji Toyamaeae5f022011-04-24 13:46:25 +080064 unsigned long ulVideoMemorySize; /* size, in bytes, of the
65 memory on the board */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020066
Kenji Toyamaeae5f022011-04-24 13:46:25 +080067 unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020068
Kenji Toyamaeae5f022011-04-24 13:46:25 +080069 unsigned char jChipType; /* Used to Identify Graphics Chip */
70 /* defined in the data structure type */
71 /* "XGI_CHIP_TYPE" */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020072
Kenji Toyamaeae5f022011-04-24 13:46:25 +080073 unsigned char jChipRevision; /* Used to Identify Graphics
74 Chip Revision */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020075
Kenji Toyamaeae5f022011-04-24 13:46:25 +080076 unsigned char ujVBChipID; /* the ID of video bridge */
77 /* defined in the data structure type */
78 /* "XGI_VB_CHIP_TYPE" */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020079
Kenji Toyamaeae5f022011-04-24 13:46:25 +080080 unsigned long ulCRT2LCDType; /* defined in the data structure type */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020081
Bill Pembertone4147ab2010-06-17 13:10:50 -040082 unsigned char(*pQueryVGAConfigSpace)(struct xgi_hw_device_info *,
83 unsigned long, unsigned long,
84 unsigned long *);
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020085};
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020086
Lucas De Marchi25985ed2011-03-30 22:57:33 -030087/* Additional IOCTL for communication xgifb <> X driver */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020088/* If changing this, xgifb.h must also be changed (for xgifb) */
apatard@mandriva.comd7636e02010-05-19 10:44:14 +020089#endif
90