1 /* $NetBSD: grfioctl.h,v 1.8 2007/03/04 05:59:48 christos Exp $ */
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
8 * the Systems Programming Group of the University of Utah Computer
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * from: Utah $Hdr: grfioctl.h 1.17 93/08/13$
37 * @(#)grfioctl.h 8.2 (Berkeley) 9/9/93
40 * Copyright (c) 1988 University of Utah.
42 * This code is derived from software contributed to Berkeley by
43 * the Systems Programming Group of the University of Utah Computer
46 * Redistribution and use in source and binary forms, with or without
47 * modification, are permitted provided that the following conditions
49 * 1. Redistributions of source code must retain the above copyright
50 * notice, this list of conditions and the following disclaimer.
51 * 2. Redistributions in binary form must reproduce the above copyright
52 * notice, this list of conditions and the following disclaimer in the
53 * documentation and/or other materials provided with the distribution.
54 * 3. All advertising materials mentioning features or use of this software
55 * must display the following acknowledgement:
56 * This product includes software developed by the University of
57 * California, Berkeley and its contributors.
58 * 4. Neither the name of the University nor the names of its contributors
59 * may be used to endorse or promote products derived from this software
60 * without specific prior written permission.
62 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
63 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
65 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
66 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
68 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
69 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
70 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
71 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
74 * from: Utah $Hdr: grfioctl.h 1.17 93/08/13$
76 * @(#)grfioctl.h 8.2 (Berkeley) 9/9/93
80 int gd_id
; /* HPUX identifier */
81 uint8_t *gd_regaddr
; /* control registers physaddr */
82 int gd_regsize
; /* control registers size */
83 uint8_t *gd_fbaddr
; /* frame buffer physaddr */
84 int gd_fbsize
; /* frame buffer size */
85 short gd_colors
; /* number of colors */
86 short gd_planes
; /* number of planes */
88 int gd_fbwidth
; /* frame buffer width */
89 int gd_fbheight
; /* frame buffer height */
90 int gd_dwidth
; /* displayed part width */
91 int gd_dheight
; /* displayed part height */
92 int gd_pad
[6]; /* for future expansion */
100 #define GRFFIREEYE 11
101 #define GRFHYPERION 12
102 #define GRFDAVINCI 14
105 * HPUX ioctls (here for the benefit of the driver)
122 uint8_t *fbbase
, *regbase
;
127 #define _IOH(x,y) (IOC_IN|((x)<<8)|y) /* IOC_IN is IOC_VOID */
129 #define GCID _IOR('G', 0, int)
130 #define GCON _IOH('G', 1)
131 #define GCOFF _IOH('G', 2)
132 #define GCAON _IOH('G', 3)
133 #define GCAOFF _IOH('G', 4)
134 #define GCMAP _IOWR('G', 5, int)
135 #define GCUNMAP _IOWR('G', 6, int)
136 #define GCLOCK _IOH('G', 7)
137 #define GCUNLOCK _IOH('G', 8)
138 #define GCLOCK_MINIMUM _IOH('G', 9)
139 #define GCUNLOCK_MINIMUM _IOH('G', 10)
140 #define GCSTATIC_CMAP _IOH('G', 11)
141 #define GCVARIABLE_CMAP _IOH('G', 12)
142 #define GCSLOT _IOWR('G', 13, struct grf_slot)
143 #define GCDESCRIBE _IOR('G', 21, struct grf_fbinfo)
146 #define IOMAPID _IOR('M',0,int) /* ??? */
147 #define IOMAPMAP _IOWR('M',1,int)
148 #define IOMAPUNMAP _IOWR('M',2,int)
154 #define GRFIOCGINFO _IOR('G', 0, struct grfinfo) /* get info on device */
155 #define GRFIOCON _IO('G', 1) /* turn graphics on */
156 #define GRFIOCOFF _IO('G', 2) /* turn graphics off */
157 #define GRFIOCMAP _IOWR('G', 5, int) /* map in regs+framebuffer */
158 #define GRFIOCUNMAP _IOW('G', 6, int) /* unmap regs+framebuffer */