xref: /netbsd/share/man/man4/man4.hp300/dvbox.4 (revision 6550d01e)
1.\"	$NetBSD: dvbox.4,v 1.5 2010/03/22 18:58:31 joerg Exp $
2.\"
3.\" Copyright (c) 1990, 1991, 1993
4.\"	The Regents of the University of California.  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. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"     from: @(#)dv.4	8.1 (Berkeley) 6/9/93
35.\"
36.Dd June 9, 1993
37.Dt DVBOX 4 hp300
38.Os
39.Sh NAME
40.Nm dvbox
41.Nd
42.Tn HP98730
43``DaVinci'' graphics device interface
44.Sh DESCRIPTION
45This driver is for the
46.Tn HP98730
47and 98731 graphics device, also known as
48the DaVinci.  This driver has not been tested with all possible
49combinations of frame buffer boards and scan boards installed in the device.
50The driver merely checks for the existence of the device and does minimal set
51up.
52.Pp
53The DaVinci can be configured at either the ``internal'' address
54(frame buffer address 0x200000, control register space address 0x560000)
55or at an external select code less than 32.
56At the internal address it will be the ``preferred'' console device.
57The hardware installation manual describes the procedure for
58setting these values.
59.Pp
60A user process communicates to the device initially by means of
61.Xr ioctl 2
62calls.  For the
63.Tn HP-UX
64.Xr ioctl 2
65calls supported, refer to
66.Tn HP-UX
67manuals.
68The
69.Bx
70calls supported are:
71.Bl -tag -width indent
72.It Dv GRFIOCGINFO
73Get Graphics Info
74.Pp
75Get info about device, setting the entries in the
76.Ar grfinfo
77structure, as defined in
78.In hpdev/grfioctl.h .
79For the standard 98730, the number of planes should be 4.  The number of
80colors would therefore be 15, excluding black.  If one 98732A frame buffer
81board is installed, there will still be 4 planes, with the 4 planes on the
82colormap board becoming overlay planes.  With each additional 98732 frame
83buffer board 4 planes will be added up to a maximum of 32 planes total.
84.It Dv GRFIOCON
85Graphics On
86.Pp
87Turn graphics on by enabling
88.Tn CRT
89output.  The screen will come on, displaying
90whatever is in the frame buffer, using whatever colormap is in place.
91.It Dv GRFIOCOFF
92Graphics Off
93.Pp
94Turn graphics off by disabling output to the
95.Tn CRT .
96The frame buffer contents
97are not affected.
98.It Dv GRFIOCMAP
99Map Device to user space
100.Pp
101Map in control registers and frame buffer space. Once the device file is
102mapped, the frame buffer structure is accessible.  The structure describing
103the 98730 is defined in
104.In hpdev/grf_dvreg.h .
105.El
106.Sh FILES
107.Bl -tag -width /dev/MAKEDEV.hpux -compact
108.It Pa /dev/grf?
109.Bx
110special file
111.It Pa /dev/crt98730
112.It Pa /dev/ocrt98730
113.Tn HP-UX
114.Em starbase
115special files
116.It Pa /dev/MAKEDEV.hpux
117script for creating
118.Tn HP-UX
119special files
120.El
121.Sh EXAMPLES
122This is a short segment of code showing how the device is opened and mapped
123into user process address space assuming that it is
124.Ql grf0 :
125.Bd -literal -offset indent
126struct dvboxfb *dvbox;
127u_char *Addr, frame_buffer;
128struct grfinfo gi;
129int disp_fd;
130
131disp_fd = open("/dev/grf0",1);
132
133if (ioctl (disp_fd, GRFIOCGINFO, \*[Am]gi) \*[Lt] 0) return -1;
134
135(void) ioctl (disp_fd, GRFIOCON, 0);
136
137Addr = (u_char *) 0;
138if (ioctl (disp_fd, GRFIOCMAP, \*[Am]Addr) \*[Lt] 0) {
139(void) ioctl (disp_fd, GRFIOCOFF, 0);
140return -1;
141}
142dvbox = (dvboxfb *) Addr;                  /* Control Registers   */
143frame_buffer=(u_char *)Addr+gi.gd_regsize; /* Frame buffer memory */
144.Ed
145.Sh DIAGNOSTICS
146None under
147.Bx .
148.Tn HP-UX
149.Tn CE.utilities
150must be used.
151.Sh ERRORS
152.Bl -tag -width [EINVAL]
153.It Bq Er ENODEV
154no such device.
155.It Bq Er EBUSY
156Another process has the device open.
157.It Bq Er EINVAL
158Invalid ioctl specification.
159.El
160.Sh SEE ALSO
161.Xr ioctl 2 ,
162.Xr grf 4
163.Sh BUGS
164Not tested for all configurations of scan board and frame buffer memory boards.
165