1#ifndef __LINUX_FBIO_H
2#define __LINUX_FBIO_H
3
4
5
6
7
8#define FBTYPE_NOTYPE -1
9#define FBTYPE_SUN1BW 0
10#define FBTYPE_SUN1COLOR 1
11#define FBTYPE_SUN2BW 2
12#define FBTYPE_SUN2COLOR 3
13#define FBTYPE_SUN2GP 4
14#define FBTYPE_SUN5COLOR 5
15#define FBTYPE_SUN3COLOR 6
16#define FBTYPE_MEMCOLOR 7
17#define FBTYPE_SUN4COLOR 8
18
19#define FBTYPE_NOTSUN1 9
20#define FBTYPE_NOTSUN2 10
21#define FBTYPE_NOTSUN3 11
22
23#define FBTYPE_SUNFAST_COLOR 12
24#define FBTYPE_SUNROP_COLOR 13
25#define FBTYPE_SUNFB_VIDEO 14
26#define FBTYPE_SUNGIFB 15
27#define FBTYPE_SUNGPLAS 16
28#define FBTYPE_SUNGP3 17
29#define FBTYPE_SUNGT 18
30#define FBTYPE_SUNLEO 19
31#define FBTYPE_MDICOLOR 20
32#define FBTYPE_TCXCOLOR 21
33
34#define FBTYPE_LASTPLUSONE 21
35
36
37#define FBTYPE_CREATOR 22
38#define FBTYPE_PCI_IGA1682 23
39#define FBTYPE_P9100COLOR 24
40
41#define FBTYPE_PCI_GENERIC 1000
42#define FBTYPE_PCI_MACH64 1001
43
44
45
46struct fbtype {
47 int fb_type;
48 int fb_height;
49 int fb_width;
50 int fb_depth;
51 int fb_cmsize;
52 int fb_size;
53};
54#define FBIOGTYPE _IOR('F', 0, struct fbtype)
55
56struct fbcmap {
57 int index;
58 int count;
59 unsigned char *red;
60 unsigned char *green;
61 unsigned char *blue;
62};
63
64#ifdef __KERNEL__
65#define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap)
66#define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap)
67#else
68#define FBIOPUTCMAP _IOW('F', 3, struct fbcmap)
69#define FBIOGETCMAP _IOW('F', 4, struct fbcmap)
70#endif
71
72
73#define FB_ATTR_NDEVSPECIFIC 8
74
75#define FB_ATTR_NEMUTYPES 4
76
77struct fbsattr {
78 int flags;
79 int emu_type;
80 int dev_specific[FB_ATTR_NDEVSPECIFIC];
81};
82
83struct fbgattr {
84 int real_type;
85 int owner;
86 struct fbtype fbtype;
87 struct fbsattr sattr;
88 int emu_types[FB_ATTR_NEMUTYPES];
89};
90#define FBIOSATTR _IOW('F', 5, struct fbgattr)
91#define FBIOGATTR _IOR('F', 6, struct fbgattr)
92
93#define FBIOSVIDEO _IOW('F', 7, int)
94#define FBIOGVIDEO _IOR('F', 8, int)
95
96
97struct fbcurpos {
98#ifdef __KERNEL__
99 short fbx, fby;
100#else
101 short x, y;
102#endif
103};
104
105
106#define FB_CUR_SETCUR 0x01
107#define FB_CUR_SETPOS 0x02
108#define FB_CUR_SETHOT 0x04
109#define FB_CUR_SETCMAP 0x08
110#define FB_CUR_SETSHAPE 0x10
111#define FB_CUR_SETALL 0x1F
112
113struct fbcursor {
114 short set;
115 short enable;
116 struct fbcurpos pos;
117 struct fbcurpos hot;
118 struct fbcmap cmap;
119 struct fbcurpos size;
120 char *image;
121 char *mask;
122};
123
124
125#define FBIOSCURSOR _IOW('F', 24, struct fbcursor)
126#define FBIOGCURSOR _IOWR('F', 25, struct fbcursor)
127
128
129#define FBIOSCURPOS _IOW('F', 26, struct fbcurpos)
130#define FBIOGCURPOS _IOW('F', 27, struct fbcurpos)
131
132
133#define FBIOGCURMAX _IOR('F', 28, struct fbcurpos)
134
135
136struct fb_wid_alloc {
137#define FB_WID_SHARED_8 0
138#define FB_WID_SHARED_24 1
139#define FB_WID_DBL_8 2
140#define FB_WID_DBL_24 3
141 __u32 wa_type;
142 __s32 wa_index;
143 __u32 wa_count;
144};
145struct fb_wid_item {
146 __u32 wi_type;
147 __s32 wi_index;
148 __u32 wi_attrs;
149 __u32 wi_values[32];
150};
151struct fb_wid_list {
152 __u32 wl_flags;
153 __u32 wl_count;
154 struct fb_wid_item *wl_list;
155};
156
157#define FBIO_WID_ALLOC _IOWR('F', 30, struct fb_wid_alloc)
158#define FBIO_WID_FREE _IOW('F', 31, struct fb_wid_alloc)
159#define FBIO_WID_PUT _IOW('F', 32, struct fb_wid_list)
160#define FBIO_WID_GET _IOWR('F', 33, struct fb_wid_list)
161
162
163#define FFB_IOCTL ('F'<<8)
164#define FFB_SYS_INFO (FFB_IOCTL|80)
165#define FFB_CLUTREAD (FFB_IOCTL|81)
166#define FFB_CLUTPOST (FFB_IOCTL|82)
167#define FFB_SETDIAGMODE (FFB_IOCTL|83)
168#define FFB_GETMONITORID (FFB_IOCTL|84)
169#define FFB_GETVIDEOMODE (FFB_IOCTL|85)
170#define FFB_SETVIDEOMODE (FFB_IOCTL|86)
171#define FFB_SETSERVER (FFB_IOCTL|87)
172#define FFB_SETOVCTL (FFB_IOCTL|88)
173#define FFB_GETOVCTL (FFB_IOCTL|89)
174#define FFB_GETSAXNUM (FFB_IOCTL|90)
175#define FFB_FBDEBUG (FFB_IOCTL|91)
176
177
178#define MDI_IOCTL ('M'<<8)
179#define MDI_RESET (MDI_IOCTL|1)
180#define MDI_GET_CFGINFO (MDI_IOCTL|2)
181#define MDI_SET_PIXELMODE (MDI_IOCTL|3)
182# define MDI_32_PIX 32
183# define MDI_16_PIX 16
184# define MDI_8_PIX 8
185
186struct mdi_cfginfo {
187 int mdi_ncluts;
188 int mdi_type;
189 int mdi_height;
190 int mdi_width;
191 int mdi_size;
192 int mdi_mode;
193 int mdi_pixfreq;
194};
195
196
197
198
199#define MDI_CLEAR_XLUT (MDI_IOCTL|9)
200
201
202struct fb_clut_alloc {
203 __u32 clutid;
204 __u32 flag;
205 __u32 index;
206};
207
208struct fb_clut {
209#define FB_CLUT_WAIT 0x00000001
210 __u32 flag;
211 __u32 clutid;
212 __u32 offset;
213 __u32 count;
214 char * red;
215 char * green;
216 char * blue;
217};
218
219struct fb_clut32 {
220 __u32 flag;
221 __u32 clutid;
222 __u32 offset;
223 __u32 count;
224 __u32 red;
225 __u32 green;
226 __u32 blue;
227};
228
229#define LEO_CLUTALLOC _IOWR('L', 53, struct fb_clut_alloc)
230#define LEO_CLUTFREE _IOW('L', 54, struct fb_clut_alloc)
231#define LEO_CLUTREAD _IOW('L', 55, struct fb_clut)
232#define LEO_CLUTPOST _IOW('L', 56, struct fb_clut)
233#define LEO_SETGAMMA _IOW('L', 68, int)
234#define LEO_GETGAMMA _IOR('L', 69, int)
235
236#ifdef __KERNEL__
237
238#define CG6_FBC 0x70000000
239#define CG6_TEC 0x70001000
240#define CG6_BTREGS 0x70002000
241#define CG6_FHC 0x70004000
242#define CG6_THC 0x70005000
243#define CG6_ROM 0x70006000
244#define CG6_RAM 0x70016000
245#define CG6_DHC 0x80000000
246
247#define CG3_MMAP_OFFSET 0x4000000
248
249
250#define TCX_RAM8BIT 0x00000000
251#define TCX_RAM24BIT 0x01000000
252#define TCX_UNK3 0x10000000
253#define TCX_UNK4 0x20000000
254#define TCX_CONTROLPLANE 0x28000000
255#define TCX_UNK6 0x30000000
256#define TCX_UNK7 0x38000000
257#define TCX_TEC 0x70000000
258#define TCX_BTREGS 0x70002000
259#define TCX_THC 0x70004000
260#define TCX_DHC 0x70008000
261#define TCX_ALT 0x7000a000
262#define TCX_SYNC 0x7000e000
263#define TCX_UNK2 0x70010000
264
265
266
267
268#define CG14_REGS 0
269#define CG14_CURSORREGS 0x1000
270#define CG14_DACREGS 0x2000
271#define CG14_XLUT 0x3000
272#define CG14_CLUT1 0x4000
273#define CG14_CLUT2 0x5000
274#define CG14_CLUT3 0x6000
275#define CG14_AUTO 0xf000
276
277#endif
278
279
280
281#define MDI_DIRECT_MAP 0x10000000
282#define MDI_CTLREG_MAP 0x20000000
283#define MDI_CURSOR_MAP 0x30000000
284#define MDI_SHDW_VRT_MAP 0x40000000
285
286
287
288#define MDI_CHUNKY_XBGR_MAP 0x50000000
289#define MDI_CHUNKY_BGR_MAP 0x60000000
290
291
292#define MDI_PLANAR_X16_MAP 0x70000000
293#define MDI_PLANAR_C16_MAP 0x80000000
294
295
296
297#define MDI_PLANAR_X32_MAP 0x90000000
298#define MDI_PLANAR_B32_MAP 0xa0000000
299#define MDI_PLANAR_G32_MAP 0xb0000000
300#define MDI_PLANAR_R32_MAP 0xc0000000
301
302
303#define LEO_SS0_MAP 0x00000000
304#define LEO_LC_SS0_USR_MAP 0x00800000
305#define LEO_LD_SS0_MAP 0x00801000
306#define LEO_LX_CURSOR_MAP 0x00802000
307#define LEO_SS1_MAP 0x00803000
308#define LEO_LC_SS1_USR_MAP 0x01003000
309#define LEO_LD_SS1_MAP 0x01004000
310#define LEO_UNK_MAP 0x01005000
311#define LEO_LX_KRN_MAP 0x01006000
312#define LEO_LC_SS0_KRN_MAP 0x01007000
313#define LEO_LC_SS1_KRN_MAP 0x01008000
314#define LEO_LD_GBL_MAP 0x01009000
315#define LEO_UNK2_MAP 0x0100a000
316
317#endif
318