|
|
1.1 root 1: /*
2: * Copyright (c) 1988 University of Utah.
3: * Copyright (c) 1990 The Regents of the University of California.
4: * All rights reserved.
5: *
6: * This code is derived from software contributed to Berkeley by
7: * the Systems Programming Group of the University of Utah Computer
8: * Science Department.
9: *
10: * Redistribution and use in source and binary forms, with or without
11: * modification, are permitted provided that the following conditions
12: * are met:
13: * 1. Redistributions of source code must retain the above copyright
14: * notice, this list of conditions and the following disclaimer.
15: * 2. Redistributions in binary form must reproduce the above copyright
16: * notice, this list of conditions and the following disclaimer in the
17: * documentation and/or other materials provided with the distribution.
18: * 3. All advertising materials mentioning features or use of this software
19: * must display the following acknowledgement:
20: * This product includes software developed by the University of
21: * California, Berkeley and its contributors.
22: * 4. Neither the name of the University nor the names of its contributors
23: * may be used to endorse or promote products derived from this software
24: * without specific prior written permission.
25: *
26: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36: * SUCH DAMAGE.
37: *
38: * from: Utah $Hdr: grfioctl.h 1.1 90/07/09$
39: *
1.1.1.2 ! root 40: * from: @(#)grfioctl.h 7.2 (Berkeley) 11/4/90
! 41: * grfioctl.h,v 1.2 1993/05/22 07:56:14 cgd Exp
1.1 root 42: */
43:
44: struct grfinfo {
45: int gd_id; /* HPUX identifier */
46: caddr_t gd_regaddr; /* control registers physaddr */
47: int gd_regsize; /* control registers size */
48: caddr_t gd_fbaddr; /* frame buffer physaddr */
49: int gd_fbsize; /* frame buffer size */
50: short gd_colors; /* number of colors */
51: short gd_planes; /* number of planes */
52: /* new stuff */
53: int gd_fbwidth; /* frame buffer width */
54: int gd_fbheight; /* frame buffer height */
55: int gd_dwidth; /* displayed part width */
56: int gd_dheight; /* displayed part height */
57: int gd_pad[6]; /* for future expansion */
58: };
59:
60: /* types */
61: #define GRFGATOR 8
62: #define GRFBOBCAT 9
63: #define GRFCATSEYE 9
64: #define GRFRBOX 10
65: #define GRFDAVINCI 14
66:
67: /*
68: * HPUX ioctls (here for the benefit of the driver)
69: */
70: struct grf_slot {
71: int slot;
72: u_char *addr;
73: };
74:
75: #ifndef _IOH
76: #define _IOH(x,y) (IOC_IN|((x)<<8)|y) /* IOC_IN is IOC_VOID */
77:
78: #define GCID _IOR('G', 0, int)
79: #define GCON _IOH('G', 1)
80: #define GCOFF _IOH('G', 2)
81: #define GCAON _IOH('G', 3)
82: #define GCAOFF _IOH('G', 4)
83: #define GCMAP _IOWR('G', 5, int)
84: #define GCUNMAP _IOWR('G', 6, int)
85: #define GCLOCK _IOH('G', 7)
86: #define GCUNLOCK _IOH('G', 8)
87: #define GCLOCK_MINIMUM _IOH('G', 9)
88: #define GCUNLOCK_MINIMUM _IOH('G', 10)
89: #define GCSTATIC_CMAP _IOH('G', 11)
90: #define GCVARIABLE_CMAP _IOH('G', 12)
91: #define GCSLOT _IOWR('G', 13, struct grf_slot)
92:
93: /* XXX: for now */
94: #define IOMAPID _IOR('M',0,int) /* ??? */
95: #define IOMAPMAP _IOWR('M',1,int)
96: #define IOMAPUNMAP _IOWR('M',2,int)
97: #endif
98:
99: /*
100: * BSD ioctls
101: */
102: #define GRFIOCGINFO _IOR('G', 0, struct grfinfo) /* get info on device */
103: #define GRFIOCON _IO('G', 1) /* turn graphics on */
104: #define GRFIOCOFF _IO('G', 2) /* turn graphics off */
105: #define GRFIOCMAP _IOWR('G', 5, int) /* map in regs+framebuffer */
106: #define GRFIOCUNMAP _IOW('G', 6, int) /* unmap regs+framebuffer */
107:
108: /* compat - for old grfinfo structure */
109: struct ogrfinfo { char oinfo[24]; };
110: #define OGRFIOCGINFO _IOR('G', 0, struct ogrfinfo)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.