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