Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
[linux-btrfs-devel.git] / drivers / staging / xgifb / XGIfb.h
blob45b6015d160c33ae2ad304f99aff98ce8f13e55a
1 #ifndef _LINUX_XGIFB
2 #define _LINUX_XGIFB
3 #include <linux/ioctl.h>
4 #include <linux/types.h>
6 #define DISPTYPE_CRT1 0x00000008L
7 #define DISPTYPE_CRT2 0x00000004L
8 #define DISPTYPE_LCD 0x00000002L
9 #define DISPTYPE_TV 0x00000001L
10 #define DISPTYPE_DISP1 DISPTYPE_CRT1
11 #define DISPTYPE_DISP2 (DISPTYPE_CRT2 | DISPTYPE_LCD | DISPTYPE_TV)
12 #define DISPMODE_SINGLE 0x00000020L
13 #define DISPMODE_MIRROR 0x00000010L
14 #define DISPMODE_DUALVIEW 0x00000040L
16 #define HASVB_NONE 0x00
17 #define HASVB_301 0x01
18 #define HASVB_LVDS 0x02
19 #define HASVB_TRUMPION 0x04
20 #define HASVB_LVDS_CHRONTEL 0x10
21 #define HASVB_302 0x20
22 #define HASVB_303 0x40
23 #define HASVB_CHRONTEL 0x80
25 #ifndef XGIFB_ID
26 #define XGIFB_ID 0x53495346 /* Identify myself with 'XGIF' */
27 #endif
29 enum XGI_CHIP_TYPE {
30 XG40 = 32,
31 XG41,
32 XG42,
33 XG45,
34 XG20 = 48,
35 XG21,
36 XG27,
39 enum xgi_tvtype {
40 TVMODE_NTSC = 0,
41 TVMODE_PAL,
42 TVMODE_HIVISION,
43 TVTYPE_PALM, /* vicki@030226 */
44 TVTYPE_PALN, /* vicki@030226 */
45 TVTYPE_NTSCJ, /* vicki@030226 */
46 TVMODE_TOTAL
49 enum xgi_tv_plug { /* vicki@030226 */
50 /* TVPLUG_Legacy = 0, */
51 /* TVPLUG_COMPOSITE, */
52 /* TVPLUG_SVIDEO, */
53 /* TVPLUG_SCART, */
54 /* TVPLUG_TOTAL */
55 TVPLUG_UNKNOWN = 0,
56 TVPLUG_COMPOSITE = 1,
57 TVPLUG_SVIDEO = 2,
58 TVPLUG_COMPOSITE_AND_SVIDEO = 3,
59 TVPLUG_SCART = 4,
60 TVPLUG_YPBPR_525i = 5,
61 TVPLUG_YPBPR_525P = 6,
62 TVPLUG_YPBPR_750P = 7,
63 TVPLUG_YPBPR_1080i = 8,
64 TVPLUG_TOTAL
67 struct video_info {
68 int chip_id;
69 unsigned int video_size;
70 unsigned long video_base;
71 char *video_vbase;
72 unsigned long mmio_base;
73 unsigned long mmio_size;
74 char *mmio_vbase;
75 unsigned long vga_base;
76 unsigned long mtrr;
78 int video_bpp;
79 int video_cmap_len;
80 int video_width;
81 int video_height;
82 int video_vwidth;
83 int video_vheight;
84 int org_x;
85 int org_y;
86 int video_linelength;
87 unsigned int refresh_rate;
89 unsigned long disp_state;
90 unsigned char hasVB;
91 unsigned char TV_type;
92 unsigned char TV_plug;
94 enum XGI_CHIP_TYPE chip;
95 unsigned char revision_id;
97 unsigned short DstColor;
98 unsigned long XGI310_AccelDepth;
99 unsigned long CommandReg;
101 unsigned int pcibus;
102 unsigned int pcislot;
103 unsigned int pcifunc;
105 unsigned short subsysvendor;
106 unsigned short subsysdevice;
108 char reserved[236];
112 extern struct video_info xgi_video_info;
114 #endif