grfioctl.h revision 1.7
11.7Sdholland/*	$NetBSD: grfioctl.h,v 1.7 2015/09/07 03:49:45 dholland Exp $	*/
21.1Stsubai
31.1Stsubai/*
41.6Srmind * Copyright (c) 1988 University of Utah.
51.1Stsubai * Copyright (c) 1990 The Regents of the University of California.
61.1Stsubai * All rights reserved.
71.2Sagc *
81.2Sagc * This code is derived from software contributed to Berkeley by
91.2Sagc * the Systems Programming Group of the University of Utah Computer
101.2Sagc * Science Department.
111.2Sagc *
121.2Sagc * Redistribution and use in source and binary forms, with or without
131.2Sagc * modification, are permitted provided that the following conditions
141.2Sagc * are met:
151.2Sagc * 1. Redistributions of source code must retain the above copyright
161.2Sagc *    notice, this list of conditions and the following disclaimer.
171.2Sagc * 2. Redistributions in binary form must reproduce the above copyright
181.2Sagc *    notice, this list of conditions and the following disclaimer in the
191.2Sagc *    documentation and/or other materials provided with the distribution.
201.2Sagc * 3. Neither the name of the University nor the names of its contributors
211.2Sagc *    may be used to endorse or promote products derived from this software
221.2Sagc *    without specific prior written permission.
231.2Sagc *
241.2Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
251.2Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
261.2Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
271.2Sagc * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
281.2Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
291.2Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
301.2Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
311.2Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
321.2Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
331.2Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
341.2Sagc * SUCH DAMAGE.
351.2Sagc *
361.2Sagc * from: Utah $Hdr: grfioctl.h 1.1 90/07/09$
371.2Sagc *
381.2Sagc *	@(#)grfioctl.h	7.2 (Berkeley) 11/4/90
391.2Sagc */
401.1Stsubai
411.3Sfair#ifndef _MACPPC_GRFIOCTL_H_
421.3Sfair#define _MACPPC_GRFIOCTL_H_
431.3Sfair
441.7Sdholland#include <sys/ioccom.h>
451.7Sdholland
461.1Stsubaistruct	grfinfo {
471.5Schristos	void *	gd_regaddr;		/* control registers physaddr */
481.1Stsubai	int	gd_regsize;		/* control registers size */
491.5Schristos	void *	gd_fbaddr;		/* frame buffer physaddr */
501.1Stsubai	int	gd_fbsize;		/* frame buffer size */
511.1Stsubai	short	gd_colors;		/* number of colors */
521.1Stsubai	short	gd_planes;		/* number of planes */
531.1Stsubai	int	gd_fbwidth;		/* frame buffer width */
541.1Stsubai	int	gd_fbheight;		/* frame buffer height */
551.1Stsubai	int	gd_fbrowbytes;		/* frame buffer rowbytes */
561.1Stsubai	int	gd_dwidth;		/* displayed part width */
571.1Stsubai	int	gd_dheight;		/* displayed part height */
581.5Schristos	void *	gd_devaddr;		/* physaddr of the device */
591.1Stsubai	int	gd_devsize;		/* size of the device */
601.1Stsubai	int	gd_pad[4];		/* for future expansion */
611.1Stsubai};
621.1Stsubai
631.1Stsubai/*
641.1Stsubai * BSD ioctls
651.1Stsubai */
661.1Stsubai#define	GRFIOCGINFO	_IOR('G', 0, struct grfinfo) /* get info on device */
671.1Stsubai#define	GRFIOCON	_IO('G', 1)		/* turn graphics on */
681.1Stsubai#define	GRFIOCOFF	_IO('G', 2)		/* turn graphics off */
691.3Sfair
701.3Sfair#endif /* _MACPPC_GRFIOCTL_H_ */
71