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