xref: /netbsd-src/sys/arch/x68k/include/grfioctl.h (revision 25d3b9e7cbaca1403601fd183d24e28ebfab52f1)
1*25d3b9e7Sdholland /*	$NetBSD: grfioctl.h,v 1.7 2015/09/07 03:49:46 dholland Exp $	*/
2d082dd3dSminoura 
3d082dd3dSminoura /*
49b6bd2d9Srmind  * Copyright (c) 1988 University of Utah.
5d082dd3dSminoura  * Copyright (c) 1990, 1993
6d082dd3dSminoura  *	The Regents of the University of California.  All rights reserved.
7d082dd3dSminoura  *
8d082dd3dSminoura  * This code is derived from software contributed to Berkeley by
9d082dd3dSminoura  * the Systems Programming Group of the University of Utah Computer
10d082dd3dSminoura  * Science Department.
11d082dd3dSminoura  *
12d082dd3dSminoura  * Redistribution and use in source and binary forms, with or without
13d082dd3dSminoura  * modification, are permitted provided that the following conditions
14d082dd3dSminoura  * are met:
15d082dd3dSminoura  * 1. Redistributions of source code must retain the above copyright
16d082dd3dSminoura  *    notice, this list of conditions and the following disclaimer.
17d082dd3dSminoura  * 2. Redistributions in binary form must reproduce the above copyright
18d082dd3dSminoura  *    notice, this list of conditions and the following disclaimer in the
19d082dd3dSminoura  *    documentation and/or other materials provided with the distribution.
20aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
21aad01611Sagc  *    may be used to endorse or promote products derived from this software
22aad01611Sagc  *    without specific prior written permission.
23aad01611Sagc  *
24aad01611Sagc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25aad01611Sagc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26aad01611Sagc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27aad01611Sagc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28aad01611Sagc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29aad01611Sagc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30aad01611Sagc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31aad01611Sagc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32aad01611Sagc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33aad01611Sagc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34aad01611Sagc  * SUCH DAMAGE.
35aad01611Sagc  *
36aad01611Sagc  * from: Utah $Hdr: grfioctl.h 1.17 93/08/13$
37aad01611Sagc  *
38aad01611Sagc  *	@(#)grfioctl.h	8.2 (Berkeley) 9/9/93
39aad01611Sagc  */
40d082dd3dSminoura 
41873a493dSminoura #ifndef _X68K_GRFIOCTL_H_
42873a493dSminoura #define	_X68K_GRFIOCTL_H_
43873a493dSminoura 
44*25d3b9e7Sdholland #include <sys/ioccom.h>
45*25d3b9e7Sdholland 
46d082dd3dSminoura struct	grfinfo {
47d082dd3dSminoura 	int	gd_id;			/* HPUX identifier */
4853524e44Schristos 	void *	gd_regaddr;		/* control registers physaddr */
49d082dd3dSminoura 	int	gd_regsize;		/* control registers size */
5053524e44Schristos 	void *	gd_fbaddr;		/* frame buffer physaddr */
51d082dd3dSminoura 	int	gd_fbsize;		/* frame buffer size */
52d082dd3dSminoura 	short	gd_colors;		/* number of colors */
53d082dd3dSminoura 	short	gd_planes;		/* number of planes */
54d082dd3dSminoura /* new stuff */
55d082dd3dSminoura 	int	gd_fbwidth;		/* frame buffer width */
56d082dd3dSminoura 	int	gd_fbheight;		/* frame buffer height */
57d082dd3dSminoura 	int	gd_dwidth;		/* displayed part width */
58d082dd3dSminoura 	int	gd_dheight;		/* displayed part height */
59d082dd3dSminoura 	int	gd_pad[6];		/* for future expansion */
60d082dd3dSminoura };
61d082dd3dSminoura 
62d082dd3dSminoura /* types */
63d082dd3dSminoura #define GRFBUILTIN	8
64d082dd3dSminoura 
65d082dd3dSminoura /*
66873a493dSminoura  * ioctls
67d082dd3dSminoura  */
68d082dd3dSminoura #define	GRFIOCGINFO	_IOR('G', 0, struct grfinfo) /* get info on device */
69d082dd3dSminoura #define	GRFIOCON	_IO('G', 1)		/* turn graphics on */
70d082dd3dSminoura #define	GRFIOCOFF	_IO('G', 2)		/* turn graphics off */
71d082dd3dSminoura #define GRFIOCMAP	_IOWR('G', 5, int)	/* map in regs+framebuffer */
72d082dd3dSminoura #define GRFIOCUNMAP	_IOW('G', 6, int)	/* unmap regs+framebuffer */
73d082dd3dSminoura 
74d082dd3dSminoura #define GRFSETVMODE	_IOW('G', 42, int)
75873a493dSminoura 
76873a493dSminoura #endif /* _X68K_GRFIOCTL_H */
77