xref: /csrg-svn/sys/hp/dev/grfioctl.h (revision 53923)
141480Smckusick /*
241480Smckusick  * Copyright (c) 1988 University of Utah.
341480Smckusick  * Copyright (c) 1990 The Regents of the University of California.
441480Smckusick  * All rights reserved.
541480Smckusick  *
641480Smckusick  * This code is derived from software contributed to Berkeley by
741480Smckusick  * the Systems Programming Group of the University of Utah Computer
841480Smckusick  * Science Department.
941480Smckusick  *
1041480Smckusick  * %sccs.include.redist.c%
1141480Smckusick  *
12*53923Shibler  * from: Utah $Hdr: grfioctl.h 1.15 92/01/22$
1341480Smckusick  *
14*53923Shibler  *	@(#)grfioctl.h	7.3 (Berkeley) 06/05/92
1541480Smckusick  */
1641480Smckusick 
1741480Smckusick struct	grfinfo {
1841480Smckusick 	int	gd_id;			/* HPUX identifier */
1941480Smckusick 	caddr_t	gd_regaddr;		/* control registers physaddr */
2041480Smckusick 	int	gd_regsize;		/* control registers size */
2141480Smckusick 	caddr_t	gd_fbaddr;		/* frame buffer physaddr */
2241480Smckusick 	int	gd_fbsize;		/* frame buffer size */
2341480Smckusick 	short	gd_colors;		/* number of colors */
2441480Smckusick 	short	gd_planes;		/* number of planes */
2541480Smckusick /* new stuff */
2641480Smckusick 	int	gd_fbwidth;		/* frame buffer width */
2741480Smckusick 	int	gd_fbheight;		/* frame buffer height */
2841480Smckusick 	int	gd_dwidth;		/* displayed part width */
2941480Smckusick 	int	gd_dheight;		/* displayed part height */
3041480Smckusick 	int	gd_pad[6];		/* for future expansion */
3141480Smckusick };
3241480Smckusick 
3341480Smckusick /* types */
3441480Smckusick #define GRFGATOR	8
3541480Smckusick #define GRFBOBCAT	9
3641480Smckusick #define	GRFCATSEYE	9
3741480Smckusick #define GRFRBOX		10
38*53923Shibler #define GRFFIREEYE	11
39*53923Shibler #define GRFHYPERION	12
4041480Smckusick #define GRFDAVINCI	14
4141480Smckusick 
4241480Smckusick /*
4341480Smckusick  * HPUX ioctls (here for the benefit of the driver)
4441480Smckusick  */
4541480Smckusick struct	grf_slot {
4641480Smckusick 	int	slot;
4741480Smckusick 	u_char	*addr;
4841480Smckusick };
4941480Smckusick 
5041480Smckusick #ifndef _IOH
5141480Smckusick #define _IOH(x,y)	(IOC_IN|((x)<<8)|y)	/* IOC_IN is IOC_VOID */
5241480Smckusick 
5341480Smckusick #define	GCID		_IOR('G', 0, int)
5441480Smckusick #define	GCON		_IOH('G', 1)
5541480Smckusick #define	GCOFF		_IOH('G', 2)
5641480Smckusick #define	GCAON		_IOH('G', 3)
5741480Smckusick #define	GCAOFF		_IOH('G', 4)
5841480Smckusick #define	GCMAP		_IOWR('G', 5, int)
5941480Smckusick #define	GCUNMAP		_IOWR('G', 6, int)
6041480Smckusick #define	GCLOCK		_IOH('G', 7)
6141480Smckusick #define	GCUNLOCK	_IOH('G', 8)
6241480Smckusick #define	GCLOCK_MINIMUM	_IOH('G', 9)
6341480Smckusick #define	GCUNLOCK_MINIMUM _IOH('G', 10)
6441480Smckusick #define	GCSTATIC_CMAP	_IOH('G', 11)
6541480Smckusick #define	GCVARIABLE_CMAP _IOH('G', 12)
6641480Smckusick #define GCSLOT		_IOWR('G', 13, struct grf_slot)
6741480Smckusick 
6841480Smckusick /* XXX: for now */
6941480Smckusick #define	IOMAPID		_IOR('M',0,int)	/* ??? */
7041480Smckusick #define	IOMAPMAP	_IOWR('M',1,int)
7141480Smckusick #define	IOMAPUNMAP	_IOWR('M',2,int)
7241480Smckusick #endif
7341480Smckusick 
7441480Smckusick /*
7541480Smckusick  * BSD ioctls
7641480Smckusick  */
7741480Smckusick #define	GRFIOCGINFO	_IOR('G', 0, struct grfinfo) /* get info on device */
7841480Smckusick #define	GRFIOCON	_IO('G', 1)		/* turn graphics on */
7941480Smckusick #define	GRFIOCOFF	_IO('G', 2)		/* turn graphics off */
8041480Smckusick #define GRFIOCMAP	_IOWR('G', 5, int)	/* map in regs+framebuffer */
8141480Smckusick #define GRFIOCUNMAP	_IOW('G', 6, int)	/* unmap regs+framebuffer */
82