xref: /original-bsd/sys/news3400/iop/framebuf.h (revision 1b6b78c3)
1 /*
2  * Copyright (c) 1992 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc.
7  *
8  * %sccs.include.redist.c%
9  *
10  * from: $Hdr: framebuf.h,v 4.300 91/06/09 06:42:21 root Rel41 $ SONY
11  *
12  *	@(#)framebuf.h	7.2 (Berkeley) 12/17/92
13  */
14 
15 #ifndef __FRAMEBUF__
16 #define __FRAMEBUF__ 1
17 
18 typedef unsigned short	Word;
19 
20 #define BitsPerWord	16
21 
22 typedef struct {
23 	short	x, y;
24 } sPoint;
25 
26 typedef struct {
27 	int	x, y;
28 } lPoint;
29 
30 typedef struct {
31 	sPoint	origin;
32 	sPoint	extent;
33 } sRectangle;
34 
35 typedef struct {
36 	lPoint	origin;
37 	lPoint	extent;
38 } lRectangle;
39 
40 typedef struct {
41 	char		type;	/* BM_FB, BM_MEM, BM_0, BM_1 or BM_LBP */
42 	char		depth;	/* bitmap depth */
43 	unsigned short	width;	/* width in Words */
44 	sRectangle	rect;	/* defined area */
45 	Word		*base;	/* for BM_MEM */
46 } sBitmap;
47 
48 typedef struct {
49 	char		type;	/* BM_FB, BM_MEM, BM_0, BM_1 or BM_LBP */
50 	char		depth;	/* bitmap depth */
51 	unsigned short	width;	/* width in Words */
52 	lRectangle	rect;	/* defined area */
53 	Word		*base;	/* for BM_MEM */
54 } lBitmap;
55 
56 #define BM_FB		0	/* frame buffer */
57 #define BM_MEM		1	/* bitmap in memory (XY format) */
58 #define BM_0		2	/* virtual bitmap of data '0' */
59 #define BM_1		3	/* virtual bitmap of data '1' */
60 #define BM_LBP		4	/* lbp page buffer (future support) */
61 
62 /* 2 operand bitblt */
63 typedef struct {
64 	unsigned char	func;		/* function code */
65 	char		transp;		/* transparency */
66 	int		fore_color;	/* foreground color */
67 	int		aux_color;	/* auxiliary color */
68 	int		planemask;	/* select plane */
69 	sBitmap		srcBitmap;	/* source bitmap */
70 	sRectangle	srcRect;	/* source rectangle */
71 	sBitmap		destBitmap;	/* destination bitmap */
72 	sRectangle	destClip;	/* clip rectangle */
73 	sPoint		destPoint;	/* destination point */
74 } sBitblt;
75 
76 typedef struct {
77 	unsigned char	func;		/* function code */
78 	char		transp;		/* transparency */
79 	int		fore_color;	/* foreground color */
80 	int		aux_color;	/* auxiliary color */
81 	int		planemask;	/* select plane */
82 	lBitmap		srcBitmap;	/* source bitmap */
83 	lRectangle	srcRect;	/* source rectangle */
84 	lBitmap		destBitmap;	/* destination bitmap */
85 	lRectangle	destClip;	/* clip rectangle */
86 	lPoint		destPoint;	/* destination point */
87 } lBitblt;
88 
89 /* tile 2 operand bitblt */
90 typedef struct {
91 	unsigned char	func;		/* function code */
92 	char		transp;		/* transparency */
93 	int		fore_color;	/* foreground color */
94 	int		aux_color;	/* auxiliary color */
95 	int		planemask;	/* select plane */
96 	sBitmap		ptnBitmap;	/* pattern bitmap */
97 	sRectangle	ptnRect;	/* pattern rectangle */
98 	sPoint		refPoint;	/* reference point */
99 	sBitmap		destBitmap;	/* destination bitmap */
100 	sRectangle	destClip;	/* clip rectangle */
101 	sRectangle	destRect;	/* destination rectangle */
102 } sTileBitblt;
103 
104 typedef struct {
105 	unsigned char	func;		/* function code */
106 	char		transp;		/* transparency */
107 	int		fore_color;	/* foreground color */
108 	int		aux_color;	/* auxiliary color */
109 	int		planemask;	/* select plane */
110 	lBitmap		ptnBitmap;	/* pattern bitmap */
111 	lRectangle	ptnRect;	/* pattern rectangle */
112 	lPoint		refPoint;	/* reference point */
113 	lBitmap		destBitmap;	/* destination bitmap */
114 	lRectangle	destClip;	/* clip rectangle */
115 	lRectangle	destRect;	/* destination rectangle */
116 } lTileBitblt;
117 
118 /* 3 operand bitblt */
119 typedef struct {
120 	unsigned char	func;		/* function code */
121 	char		transp;		/* transparency */
122 	int		fore_color;	/* foreground color */
123 	int		aux_color;	/* auxiliary color */
124 	int		planemask;	/* select plane */
125 	sBitmap		ptnBitmap;	/* pattern bitmap */
126 	sRectangle	ptnRect;	/* pattern rectangle */
127 	sPoint		refPoint;	/* reference point */
128 	sBitmap		srcBitmap;	/* source bitmap */
129 	sRectangle	srcRect;	/* source rectangle */
130 	sBitmap		destBitmap;	/* destination bitmap */
131 	sRectangle	destClip;	/* clip rectangle */
132 	sPoint		destPoint;	/* destination point */
133 } sBitblt3;
134 
135 typedef struct {
136 	unsigned char	func;		/* function code */
137 	char		transp;		/* transparency */
138 	int		fore_color;	/* foreground color */
139 	int		aux_color;	/* auxiliary color */
140 	int		planemask;	/* select plane */
141 	lBitmap		ptnBitmap;	/* pattern bitmap */
142 	lRectangle	ptnRect;	/* pattern rectangle */
143 	lPoint		refPoint;	/* reference point */
144 	lBitmap		srcBitmap;	/* source bitmap */
145 	lRectangle	srcRect;	/* source rectangle */
146 	lBitmap		destBitmap;	/* destination bitmap */
147 	lRectangle	destClip;	/* clip rectangle */
148 	lPoint		destPoint;	/* destination point */
149 } lBitblt3;
150 
151 typedef struct {
152 	sRectangle	srcRect;	/* source rectangle */
153 	sPoint		destPoint;	/* destination point */
154 } sSrcDest;
155 
156 typedef struct {
157 	lRectangle	srcRect;	/* source rectangle */
158 	lPoint		destPoint;	/* destination point */
159 } lSrcDest;
160 
161 /*
162  * batch bitblt
163  */
164 typedef struct {
165 	unsigned char	func;		/* function code */
166 	char		transp;		/* transparency */
167 	int		fore_color;	/* foreground color */
168 	int		aux_color;	/* auxiliary color */
169 	int		planemask;	/* select plane */
170 	sBitmap		srcBitmap;	/* source bitmap */
171 	sBitmap		destBitmap;	/* destination bitmap */
172 	sRectangle	destClip;	/* clip rectangle */
173 	int		nSrcDest;	/* number of src-dest in list */
174 	sSrcDest	*srcDestList;	/* pointer to src-dest spec */
175 } sBatchBitblt;
176 
177 typedef struct {
178 	unsigned char	func;		/* function code */
179 	char		transp;		/* transparency */
180 	int		fore_color;	/* foreground color */
181 	int		aux_color;	/* auxiliary color */
182 	int		planemask;	/* select plane */
183 	lBitmap		srcBitmap;	/* source bitmap */
184 	lBitmap		destBitmap;	/* destination bitmap */
185 	lRectangle	destClip;	/* clip rectangle */
186 	int		nSrcDest;	/* number of src-dest in list */
187 	lSrcDest	*srcDestList;	/* pointer to src-dest spec */
188 } lBatchBitblt;
189 
190 #define MAX_BATCHBITBLT	1024		/* max number in src-dest list */
191 
192 /*
193  * set screen mode
194  */
195 
196 #define BLACK_ON_WHITE	0	/* white - 0, black - 1 (default) */
197 #define WHITE_ON_BLACK	1	/* white - 1, black - 0 */
198 
199 /*
200  * graphic primitive drawing
201  */
202 
203 /* scan line array */
204 typedef struct {
205 	short	y;
206 	short	x0, x1;		/* x0 <= x1 */
207 } sScanl;
208 
209 typedef struct {
210 	int	y;
211 	int	x0, x1;		/* x0 <= x1 */
212 } lScanl;
213 
214 /* line */
215 typedef struct {
216 	unsigned int	lptn;		/* line pattern */
217 	short		np;		/* number of points */
218 	sPoint		*plist;		/* point list */
219 	int		fore_color;	/* foreground color */
220 	int		aux_color;	/* auxiliary color */
221 	int		planemask;	/* select plane */
222 	char		transp;		/* transparency */
223 	unsigned char	func;		/* rop function code */
224 	char		dlpf;		/* draw last point flag */
225 	sRectangle	clip;		/* clip rectangle */
226 	sBitmap		drawBM;		/* drawing bitmap */
227 } sPrimLine;
228 
229 typedef struct {
230 	unsigned int	lptn;		/* line pattern */
231 	short		np;		/* number of points */
232 	lPoint		*plist;		/* point list */
233 	int		fore_color;	/* foreground color */
234 	int		aux_color;	/* auxiliary color */
235 	int		planemask;	/* select plane */
236 	char		transp;		/* transparency */
237 	unsigned char	func;		/* rop function code */
238 	char		dlpf;		/* draw last point flag */
239 	lRectangle	clip;		/* clip rectangle */
240 	lBitmap		drawBM;		/* drawing bitmap */
241 } lPrimLine;
242 
243 /* rectangle filling */
244 typedef struct {
245 	sRectangle	rect;		/* rectangle */
246 	sPoint		refPoint;	/* fill reference point */
247 	sRectangle	ptnRect;	/* pattern rectangle */
248 	sBitmap		ptnBM;		/* pattern bitmap */
249 	int		fore_color;	/* foreground color */
250 	int		aux_color;	/* auxiliary color */
251 	int		planemask;	/* select plane */
252 	char		transp;		/* transparency */
253 	unsigned char	func;		/* rop function code */
254 	sRectangle	clip;		/* clip rectangle */
255 	sBitmap		drawBM;		/* drawing bitmap */
256 } sPrimRect;
257 
258 typedef struct {
259 	lRectangle	rect;		/* rectangle */
260 	lPoint		refPoint;	/* fill reference point */
261 	lRectangle	ptnRect;	/* pattern rectangle */
262 	lBitmap		ptnBM;		/* pattern bitmap */
263 	int		fore_color;	/* foreground color */
264 	int		aux_color;	/* auxiliary color */
265 	int		planemask;	/* select plane */
266 	char		transp;		/* transparency */
267 	unsigned char	func;		/* rop function code */
268 	lRectangle	clip;		/* clip rectangle */
269 	lBitmap		drawBM;		/* drawing bitmap */
270 } lPrimRect;
271 
272 /* pattern filling */
273 typedef struct {
274 	short		nscan;		/* number of scan element */
275 	sScanl		*scan;		/* scan line data */
276 	sPoint		refPoint;	/* fill reference point */
277 	sRectangle	ptnRect;	/* pattern rectangle */
278 	sBitmap		ptnBM;		/* pattern bitmap */
279 	int		fore_color;	/* foreground color */
280 	int		aux_color;	/* auxiliary color */
281 	int		planemask;	/* select plane */
282 	char		transp;		/* transparency */
283 	unsigned char	func;		/* rop function code */
284 	sRectangle	clip;		/* clip rectangle */
285 	sBitmap		drawBM;		/* drawing bitmap */
286 } sPrimFill;
287 
288 typedef struct {
289 	short		nscan;		/* number of scan element */
290 	lScanl		*scan;		/* scan line data */
291 	lPoint		refPoint;	/* fill reference point */
292 	lRectangle	ptnRect;	/* pattern rectangle */
293 	lBitmap		ptnBM;		/* pattern bitmap */
294 	int		fore_color;	/* foreground color */
295 	int		aux_color;	/* auxiliary color */
296 	int		planemask;	/* select plane */
297 	char		transp;		/* transparency */
298 	unsigned char	func;		/* rop function code */
299 	lRectangle	clip;		/* clip rectangle */
300 	lBitmap		drawBM;		/* drawing bitmap */
301 } lPrimFill;
302 
303 /* marker */
304 typedef struct {
305 	short		np;		/* number of points */
306 	sPoint		*plist;		/* point list */
307 	sRectangle	ptnRect;	/* pattern rectangle */
308 	sBitmap		ptnBM;		/* pattern bitmap */
309 	int		fore_color;	/* foreground color */
310 	int		aux_color;	/* auxiliary color */
311 	int		planemask;	/* select plane */
312 	char		transp;		/* transparency */
313 	unsigned char	func;		/* rop function code */
314 	sRectangle	clip;		/* clip rectangle */
315 	sBitmap		drawBM;		/* drawing bitmap */
316 } sPrimMarker;
317 
318 typedef struct {
319 	short		np;		/* number of points */
320 	lPoint		*plist;		/* point list */
321 	lRectangle	ptnRect;	/* pattern rectangle */
322 	lBitmap		ptnBM;		/* pattern bitmap */
323 	int		fore_color;	/* foreground color */
324 	int		aux_color;	/* auxiliary color */
325 	int		planemask;	/* select plane */
326 	char		transp;		/* transparency */
327 	unsigned char	func;		/* rop function code */
328 	lRectangle	clip;		/* clip rectangle */
329 	lBitmap		drawBM;		/* drawing bitmap */
330 } lPrimMarker;
331 
332 /* text */
333 #define MAX_STRING	1024
334 
335 typedef struct {
336 	char		type;		/* ROM-font, etc */
337 	short		len;		/* string length (byte) */
338 	unsigned char	*str;		/* string */
339 	sPoint		p;
340 	int		dx, dy;		/* vector (16bit left shifted) */
341 	char		ex_factor;	/* expansion factor */
342 	sPoint		fp;		/* bitmap font upper-left */
343 	short		width, height;	/* font width, font height */
344 	short		column;		/* number of characters in a row */
345 	unsigned short	first_chr;	/* first character code */
346 	unsigned short	last_chr;	/* last character code */
347 	sBitmap		fontBM;		/* font bitmap */
348 	int		fore_color;	/* foreground color */
349 	int		aux_color;	/* auxiliary color */
350 	int		planemask;	/* select plane */
351 	char		transp;		/* transparency */
352 	unsigned char	func;		/* rop function code */
353 	sRectangle	clip;		/* clip rectangle */
354 	sBitmap		drawBM;		/* drawing bitmap */
355 } sPrimText;
356 
357 typedef struct {
358 	int		dx, dy;		/* vector (16bit left shifted) */
359 	lPoint		fp;		/* bitmap font upper-left */
360 	short		width, height;	/* font width, font height */
361 	short		column;		/* number of characters in a row */
362 	unsigned short	first_chr;	/* first character code */
363 	unsigned short	last_chr;	/* last character code */
364 	lBitmap		fontBM;		/* font bitmap */
365 	int		fore_color;	/* foreground color */
366 	int		aux_color;	/* auxiliary color */
367 	int		planemask;	/* select plane */
368 	lBitmap		drawBM;		/* drawing bitmap */
369 	lRectangle	clip;		/* clip rectangle */
370 	lPoint		p;		/* output position */
371 	unsigned char	*str;		/* string */
372 	short		len;		/* string length (byte) */
373 	char		type;		/* ROM-font, etc */
374 	char		transp;		/* transparency */
375 	unsigned char	func;		/* rop function code */
376 	char		ex_factor;	/* expansion factor */
377 } lPrimText;
378 
379 /* dot */
380 typedef struct {
381 	short		np;		/* number of points */
382 	sPoint		*plist;		/* point list */
383 	int		fore_color;	/* foreground color */
384 	int		aux_color;	/* auxiliary color */
385 	int		planemask;	/* select plane */
386 	char		transp;		/* transparency */
387 	unsigned char	func;		/* rop function code */
388 	sRectangle	clip;		/* clip rectangle */
389 	sBitmap		drawBM;		/* drawing bitmap */
390 } sPrimDot;
391 
392 typedef struct {
393 	short		np;		/* number of points */
394 	lPoint		*plist;		/* point list */
395 	int		fore_color;	/* foreground color */
396 	int		aux_color;	/* auxiliary color */
397 	int		planemask;	/* select plane */
398 	char		transp;		/* transparency */
399 	unsigned char	func;		/* rop function code */
400 	lRectangle	clip;		/* clip rectangle */
401 	lBitmap		drawBM;		/* drawing bitmap */
402 } lPrimDot;
403 
404 /*
405  *	screen type
406  */
407 typedef struct {
408 	short		colorwidth;	/* palette color width */
409 	short		plane;		/* number of planes */
410 	sRectangle	bufferrect;	/* framebuffer region */
411 	sRectangle	visiblerect;	/* visible screen region */
412 } sScrType;
413 
414 typedef struct {
415 	short		colorwidth;	/* palette color width */
416 	short		plane;		/* number of planes */
417 	char		type;		/* device type */
418 	char		unit;		/* unit no */
419 	lRectangle	bufferrect;	/* framebuffer region */
420 	lRectangle	visiblerect;	/* visible screen region */
421 } lScrType;
422 
423 /* device type */
424 #define	FB_NWB512	1	/* fb is B/W bitmap display (816x1024) */
425 #define	FB_NWB225	2	/* fb is color bitmap display (1280x1024) */
426 #define	FB_POPM		3	/* fb is B/W bitmap display (816x1024) */
427 #define	FB_POPC		4	/* fb is color bitmap display (1024x768) */
428 #define FB_NWB514	5	/* fb is GrayScale bitmap display (1280x1280) */
429 #define FB_NWB251	6	/* fb is New color bitmap display (1280x1024) */
430 #define	FB_LCDM		7	/* fb is lcd bitmap (1120x780) */
431 #define	FB_LCDC		8	/* fb is LCD color bitmap display (?) */
432 #define	FB_NWB518	9	/* fb is B/W bitmap display (1024x768) */
433 #define	FB_NWB252	10	/* fb is color bitmap display (1024x768) */
434 #define	FB_NWB253	11	/* fb is B/W bitmap display (816x1024) */
435 #define	FB_NWB254	12	/* fb is color bitmap display (1024x768) */
436 #define	FB_NWB255	13	/* fb is B/W bitmap display (1280x1280) */
437 #define	FB_SLB101	14	/* fb is color bitmap display (1920x1035) */
438 #define FB_NWB256	15	/* fb is 3D-Rendaring Board (1280x1024) */
439 #define	FB_NWB257	16	/* fb is color bitmap display (1280x1024) */
440 
441 #define FB_NWB240	200	/* fb is A3 LPB/IR interface (3136x4516) */
442 #define FB_NWB241	201	/* fb is A4 LBP/IR interface (3904x5600) */
443 #define FB_NWB242	202	/* fb is A3 Image Processor (3136x4516) */
444 
445 #define FB_FB2015	254	/* fb is full color big display (2048x1536) */
446 #define FB_FB2020	255	/* fb is full color big display (2048x2048) */
447 
448 #define FB_MONO0	1	/* fb is B/W (compat-3.0) */
449 #define FB_COLOR0	2	/* fb is color (compat-3.0) */
450 
451 /*
452  *	color
453  */
454 typedef struct {
455 	short	index;		/* palette number */
456 	struct {
457 		short	r, g, b;
458 	} rgb;
459 } sPalette;
460 
461 typedef struct {
462 	int		count;
463 	sPalette	*palette;
464 } lPalette;
465 
466 /*
467  *	cursor
468  */
469 typedef struct {
470 	unsigned char	func;
471 	char		cursor_color;
472 	char		mask_color;
473 	sPoint		hot;
474 	sPoint		size;
475 	sRectangle	cursorRect;	/* Cursor Pattern rea */
476 	sRectangle	maskRect;	/* Mask Pattern Area */
477 	sRectangle	saveRect;	/* Save Pattern Area */
478 	sRectangle	moveArea;
479 } sCursor;
480 
481 typedef struct {
482 	unsigned char	func;
483 	char		cursor_color;
484 	char		mask_color;
485 	lPoint		hot;
486 	lPoint		size;
487 	lRectangle	cursorRect;	/* Cursor Pattern Area */
488 	lRectangle	maskRect;	/* Mask Pattern Area */
489 	lRectangle	saveRect;	/* Save Pattern Area */
490 	lRectangle	moveArea;
491 } lCursor;
492 
493 typedef struct {
494 	unsigned char	func;
495 	int		cursor_color;
496 	int		mask_color;
497 	lPoint		hot;
498 	lPoint		size;
499 	lRectangle	cursorRect;	/* Cursor Pattern Area */
500 	lRectangle	maskRect;	/* Mask Pattern Area */
501 	lRectangle	saveRect;	/* Save Pattern Area */
502 	lRectangle	moveArea;
503 } lCursor2;
504 
505 typedef struct {
506 	int request;
507 	lPoint sp;
508 	lPoint dp;
509 	lPoint size;
510 	int refresh_rate;
511 	int func;
512 	int planemask;
513 } lVideoCtl;
514 
515 typedef struct {
516 	int request;
517 	int mode;
518 	int status;
519 	lRectangle vframe;
520 	int refresh_rate;
521 	int func;
522 	int planemask;
523 } lVideoStatus;
524 
525 /* Video Control Request */
526 #define VIDEO_RESET     0x01
527 #define VIDEO_RUN       0x02
528 #define VIDEO_STOP      0x04
529 #define VIDEO_CONT      0x08
530 #define VIDEO_FRAME     0x10
531 #define VIDEO_ROP       0x20
532 
533 /* Video Status */
534 #define VIDEO_STATUS    0x01
535 
536 #define VIDEO_SIG_NTSC  0x01
537 #define VIDEO_SIG_PAL   0x02
538 
539 #define VIDEO_STATUS_RUN        1
540 #define VIDEO_STATUS_STOP       2
541 #define VIDEO_STATUS_ERROR      4
542 
543 #define VIDEO_ERROR_SIZE        0x100
544 #define VIDEO_ERROR_POINT       0x200
545 #define VIDEO_ERROR_PARAM       0x400
546 
547 typedef struct {
548 	int	request;
549 	int	param[8];
550 } lFbIoctl;
551 
552 
553 /* func */
554 #define BF_0	0x0	/* 0 */
555 #define BF_SDA	0x1	/* Src & Dest */
556 #define BF_SDIA	0x2	/* Src & ~Dest */
557 #define BF_S	0x3	/* Src */
558 #define BF_SIDA	0x4	/* ~Src & Dest */
559 #define BF_D	0x5	/* Dest */
560 #define BF_SDX	0x6	/* Src ^ Dest */
561 #define BF_SDO	0x7	/* Src | Dest */
562 #define BF_SDOI	0x8	/* ~(Src | Dest) */
563 #define BF_SDXI	0x9	/* ~(Src ^ Dest) */
564 #define BF_DI	0xa	/* ~Dest */
565 #define BF_SDIO	0xb	/* Src | ~Dest */
566 #define BF_SI	0xc	/* ~Src */
567 #define BF_SIDO	0xd	/* ~Src | Dest */
568 #define BF_SDAI	0xe	/* ~(Src & Dest) */
569 #define BF_1	0xf	/* 1 */
570 
571 #define BF_NOP(f)	((f) == BF_D)
572 #define BF_INV(f)	((f) == BF_DI)
573 #define BF_CON(f)	((f) == BF_0 || (f) == BF_1)
574 #define BF_SRC(f)	(!BF_NOP(f)&&!BF_INV(f)&&!BF_CON(f))
575 
576 /* Bitmap Font Type */
577 #define ROM_ASCII	0
578 #define ROM_KANJI	1
579 #define ASCII		2
580 #define ROM_CONS	3
581 
582 /* Plane Mask */
583 #define FB_PLANEALL	0xffffff
584 #define FB_PLANE0	0x000001
585 #define FB_PLANE1	0x000002
586 #define FB_PLANE2	0x000004
587 #define FB_PLANE3	0x000008
588 #define FB_PLANE4	0x000010
589 #define FB_PLANE5	0x000020
590 #define FB_PLANE6	0x000040
591 #define FB_PLANE7	0x000080
592 #define FB_PLANE8	0x000100
593 #define FB_PLANE9	0x000200
594 #define FB_PLANE10	0x000400
595 #define FB_PLANE11	0x000800
596 #define FB_PLANE12	0x001000
597 #define FB_PLANE13	0x002000
598 #define FB_PLANE14	0x004000
599 #define FB_PLANE15	0x008000
600 #define FB_PLANE16	0x010000
601 #define FB_PLANE17	0x020000
602 #define FB_PLANE18	0x040000
603 #define FB_PLANE19	0x080000
604 #define FB_PLANE20	0x100000
605 #define FB_PLANE21	0x200000
606 #define FB_PLANE22	0x400000
607 #define FB_PLANE23	0x800000
608 
609 /* Line Pattern */
610 #define LINE_SLD	(unsigned)0xffffffff	/* solid */
611 #define LINE_DSH	(unsigned)0xfcfcfcfc	/* dash */
612 #define LINE_DOT	(unsigned)0xcccccccc	/* dot */
613 #define LINE_DSHDOT	(unsigned)0xfff18fff	/* dash dot */
614 #define LINE_DSHDOTDOT	(unsigned)0xff8c63ff	/* dash dot dot */
615 
616 /*
617  * FB IOCTL
618  */
619 #include <sys/ioctl.h>
620 
621 #define FBIOCSETSCR		_IOW('F', 0, int)
622 #define FBIOCGETSCR		_IOR('F', 1, int)
623 #define FBIOCSETDIM		_IOW('F', 2, int)
624 #define FBIOCGETDIM		_IOR('F', 3, int)
625 #define FBIOCSETSCRMODE		_IOW('F', 4, int)
626 #define FBIOCGETSCRMODE		_IOR('F', 5, int)
627 #define FBIOCAUTODIM		_IOW('F', 6, int)
628 
629 #define FBIOCBITBLT 		_IOW('F', 10, sBitblt)
630 #define FBIOCBATCHBITBLT	_IOW('F', 11, sBatchBitblt)
631 #define FBIOCTILEBITBLT		_IOW('F', 12, sTileBitblt)
632 #define FBIOCBITBLT3		_IOW('F', 13, sBitblt3)
633 
634 #define FBIOCPOLYLINE		_IOW('F', 20, sPrimLine)
635 #define FBIOCDJPOLYLINE		_IOW('F', 21, sPrimLine)
636 #define FBIOCPOLYMARKER		_IOW('F', 22, sPrimMarker)
637 #define FBIOCRECTANGLE		_IOW('F', 23, sPrimRect)
638 #define FBIOCFILLSCAN		_IOW('F', 24, sPrimFill)
639 #define FBIOCTEXT		_IOW('F', 25, sPrimText)
640 #define FBIOCPOLYDOT		_IOW('F', 26, sPrimDot)
641 
642 #define FBIOCGETSCRTYPE		_IOR('F', 30, sScrType)
643 
644 /* for color display */
645 #define FBIOCSETPALETTE		_IOW('F', 31, sPalette)
646 #define FBIOCGETPALETTE		_IOWR('F', 32, sPalette)
647 #define FBIOCSETDADDR		_IOW('F', 33, int)
648 
649 #define FBIOCENABLE		_IO('F', 40)
650 #define FBIOCDISABLE		_IO('F', 41)
651 
652 #define FBIOCSETCURSOR		_IOW('F', 42, sCursor)
653 #define FBIOCUNSETCURSOR	_IO('F', 43)
654 #define FBIOCSHOWCURSOR		_IO('F', 44)
655 #define FBIOCHIDECURSOR		_IO('F', 45)
656 #define FBIOCSETXY		_IOW('F', 46, sPoint)
657 
658 #define FBIOCNBITBLT 		_IOW('F', 50, lBitblt)
659 #define FBIOCNBATCHBITBLT	_IOW('F', 51, lBatchBitblt)
660 #define FBIOCNTILEBITBLT	_IOW('F', 52, lTileBitblt)
661 #define FBIOCNBITBLT3		_IOW('F', 53, lBitblt3)
662 
663 #define FBIOCNPOLYLINE		_IOW('F', 60, lPrimLine)
664 #define FBIOCNDJPOLYLINE	_IOW('F', 61, lPrimLine)
665 #define FBIOCNPOLYMARKER	_IOW('F', 62, lPrimMarker)
666 #define FBIOCNRECTANGLE		_IOW('F', 63, lPrimRect)
667 #define FBIOCNFILLSCAN		_IOW('F', 64, lPrimFill)
668 #define FBIOCNTEXT		_IOW('F', 65, lPrimText)
669 #define FBIOCNPOLYDOT		_IOW('F', 66, lPrimDot)
670 
671 #define FBIOCNGETSCRTYPE	_IOR('F', 70, lScrType)
672 #define FBIOCNSETPALETTE	_IOW('F', 71, lPalette)
673 #define FBIOCNGETPALETTE	_IOWR('F', 72, lPalette)
674 #define FBIOCNSETPALETTEMODE	_IOW('F', 73, int)
675 #define FBIOCNGETPALETTEMODE	_IOR('F', 74, int)
676 
677 #define FBIOCNSETCURSOR		_IOW('F', 80, lCursor)
678 #define FBIOCNUNSETCURSOR	_IO('F', 81)
679 #define FBIOCNSHOWCURSOR	_IO('F', 82)
680 #define FBIOCNHIDECURSOR	_IO('F', 83)
681 #define FBIOCNSETXY		_IOW('F', 84, lPoint)
682 #define FBIOCNSETCURSOR2	_IOW('F', 85, lCursor2)
683 
684 #define FBIOCNSETVIDEO		_IOW('F', 90, lVideoCtl)
685 #define FBIOCNGETVIDEO		_IOR('F', 91, lVideoStatus)
686 
687 #define FBIOCNIOCTL		_IOWR('F', 100, lFbIoctl)
688 
689 #endif /* !__FRAMEBUF__ */
690