xref: /original-bsd/sys/hp/dev/grfioctl.h (revision c8089215)
1 /*
2  * Copyright (c) 1988 University of Utah.
3  * Copyright (c) 1990 The Regents of the University of California.
4  * All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * %sccs.include.redist.c%
11  *
12  * from: Utah $Hdr: grfioctl.h 1.1 90/07/09$
13  *
14  *	@(#)grfioctl.h	7.2 (Berkeley) 11/04/90
15  */
16 
17 struct	grfinfo {
18 	int	gd_id;			/* HPUX identifier */
19 	caddr_t	gd_regaddr;		/* control registers physaddr */
20 	int	gd_regsize;		/* control registers size */
21 	caddr_t	gd_fbaddr;		/* frame buffer physaddr */
22 	int	gd_fbsize;		/* frame buffer size */
23 	short	gd_colors;		/* number of colors */
24 	short	gd_planes;		/* number of planes */
25 /* new stuff */
26 	int	gd_fbwidth;		/* frame buffer width */
27 	int	gd_fbheight;		/* frame buffer height */
28 	int	gd_dwidth;		/* displayed part width */
29 	int	gd_dheight;		/* displayed part height */
30 	int	gd_pad[6];		/* for future expansion */
31 };
32 
33 /* types */
34 #define GRFGATOR	8
35 #define GRFBOBCAT	9
36 #define	GRFCATSEYE	9
37 #define GRFRBOX		10
38 #define GRFDAVINCI	14
39 
40 /*
41  * HPUX ioctls (here for the benefit of the driver)
42  */
43 struct	grf_slot {
44 	int	slot;
45 	u_char	*addr;
46 };
47 
48 #ifndef _IOH
49 #define _IOH(x,y)	(IOC_IN|((x)<<8)|y)	/* IOC_IN is IOC_VOID */
50 
51 #define	GCID		_IOR('G', 0, int)
52 #define	GCON		_IOH('G', 1)
53 #define	GCOFF		_IOH('G', 2)
54 #define	GCAON		_IOH('G', 3)
55 #define	GCAOFF		_IOH('G', 4)
56 #define	GCMAP		_IOWR('G', 5, int)
57 #define	GCUNMAP		_IOWR('G', 6, int)
58 #define	GCLOCK		_IOH('G', 7)
59 #define	GCUNLOCK	_IOH('G', 8)
60 #define	GCLOCK_MINIMUM	_IOH('G', 9)
61 #define	GCUNLOCK_MINIMUM _IOH('G', 10)
62 #define	GCSTATIC_CMAP	_IOH('G', 11)
63 #define	GCVARIABLE_CMAP _IOH('G', 12)
64 #define GCSLOT		_IOWR('G', 13, struct grf_slot)
65 
66 /* XXX: for now */
67 #define	IOMAPID		_IOR('M',0,int)	/* ??? */
68 #define	IOMAPMAP	_IOWR('M',1,int)
69 #define	IOMAPUNMAP	_IOWR('M',2,int)
70 #endif
71 
72 /*
73  * BSD ioctls
74  */
75 #define	GRFIOCGINFO	_IOR('G', 0, struct grfinfo) /* get info on device */
76 #define	GRFIOCON	_IO('G', 1)		/* turn graphics on */
77 #define	GRFIOCOFF	_IO('G', 2)		/* turn graphics off */
78 #define GRFIOCMAP	_IOWR('G', 5, int)	/* map in regs+framebuffer */
79 #define GRFIOCUNMAP	_IOW('G', 6, int)	/* unmap regs+framebuffer */
80 
81 /* compat - for old grfinfo structure */
82 struct ogrfinfo { char	oinfo[24]; };
83 #define	OGRFIOCGINFO	_IOR('G', 0, struct ogrfinfo)
84