Commit | Line | Data |
---|---|---|
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 | |
47 | This driver is for the | |
48 | .Tn HP98730 | |
49 | and 98731 graphics device, also known as | |
3ad356c1 KB |
50 | the DaVinci. This driver has not been tested with all possible |
51 | combinations of frame buffer boards and scan boards installed in the device. | |
52 | The driver merely checks for the existence of the device and does minimal set | |
53 | up. | |
9903e566 | 54 | .Pp |
3ad356c1 KB |
55 | The DaVinci can be configured at either the ``internal'' address |
56 | (frame buffer address 0x200000, control register space address 0x560000) | |
57 | or at an external select code less than 32. | |
58 | At the internal address it will be the ``preferred'' console device | |
59 | (see | |
9903e566 | 60 | .Xr cons 4 ) . |
3ad356c1 KB |
61 | The hardware installation manual describes the procedure for |
62 | setting these values. | |
9903e566 | 63 | .Pp |
3ad356c1 | 64 | A user process communicates to the device initially by means of |
9903e566 CL |
65 | .Xr ioctl 2 |
66 | calls. For the | |
67 | .Tn HP-UX | |
68 | .Xr ioctl | |
69 | calls supported, refer to | |
70 | .Tn HP-UX | |
71 | manuals. | |
72 | The | |
73 | .Bx | |
74 | calls supported are: | |
75 | .Bl -tag -width indent | |
76 | .It Dv GRFIOCGINFO | |
3ad356c1 | 77 | Get Graphics Info |
9903e566 | 78 | .Pp |
3ad356c1 | 79 | Get info about device, setting the entries in the |
9903e566 CL |
80 | .Ar grfinfo |
81 | structure, as defined in | |
82 | .Aq Pa hpdev/grfioctl.h . | |
3ad356c1 KB |
83 | For the standard 98730, the number of planes should be 4. The number of |
84 | colors would therefore be 15, excluding black. If one 98732A frame buffer | |
85 | board is installed, there will still be 4 planes, with the 4 planes on the | |
86 | colormap board becoming overlay planes. With each additional 98732 frame | |
87 | buffer board 4 planes will be added up to a maximum of 32 planes total. | |
9903e566 | 88 | .It Dv GRFIOCON |
3ad356c1 | 89 | Graphics On |
9903e566 CL |
90 | .Pp |
91 | Turn graphics on by enabling | |
92 | .Tn CRT | |
93 | output. The screen will come on, displaying | |
3ad356c1 | 94 | whatever is in the frame buffer, using whatever colormap is in place. |
9903e566 | 95 | .It Dv GRFIOCOFF |
3ad356c1 | 96 | Graphics Off |
9903e566 CL |
97 | .Pp |
98 | Turn graphics off by disabling output to the | |
99 | .Tn CRT . | |
100 | The frame buffer contents | |
3ad356c1 | 101 | are not affected. |
9903e566 | 102 | .It Dv GRFIOCMAP |
3ad356c1 | 103 | Map Device to user space |
9903e566 CL |
104 | .Pp |
105 | Map in control registers and frame buffer space. Once the device file is | |
3ad356c1 | 106 | mapped, the frame buffer structure is accessible. The structure describing |
9903e566 CL |
107 | the 98730 is defined in |
108 | .Aq Pa hpdev/grf_dvreg.h . | |
109 | .El | |
110 | .Sh EXAMPLE | |
3ad356c1 | 111 | This is a short segment of code showing how the device is opened and mapped |
9903e566 CL |
112 | into user process address space assuming that it is |
113 | .Ql grf0 : | |
114 | .Bd -literal -offset indent | |
115 | struct dvboxfb *dvbox; | |
116 | u_char *Addr, frame_buffer; | |
117 | struct grfinfo gi; | |
118 | int disp_fd; | |
3ad356c1 | 119 | |
9903e566 | 120 | disp_fd = open("/dev/grf0",1); |
3ad356c1 | 121 | |
9903e566 | 122 | if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; |
3ad356c1 | 123 | |
9903e566 | 124 | (void) ioctl (disp_fd, GRFIOCON, 0); |
3ad356c1 | 125 | |
9903e566 CL |
126 | Addr = (u_char *) 0; |
127 | if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { | |
128 | (void) ioctl (disp_fd, GRFIOCOFF, 0); | |
129 | return -1; | |
3ad356c1 | 130 | } |
9903e566 CL |
131 | dvbox = (dvboxfb *) Addr; /* Control Registers */ |
132 | frame_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 | |
138 | special file | |
139 | .It Pa /dev/crt98730 | |
140 | .It Pa /dev/ocrt98730 | |
141 | .Tn HP-UX | |
142 | .Em starbase | |
143 | special files | |
144 | .It Pa /dev/MAKEDEV.hpux | |
145 | script for creating | |
146 | .Tn HP-UX | |
147 | special files | |
148 | .El | |
149 | .Sh DIAGNOSTICS | |
150 | None under | |
151 | .Bx . | |
152 | .Tn HP-UX | |
153 | .Tn CE.utilities | |
154 | must be used. | |
155 | .Sh ERRORS | |
156 | .Bl -tag -width [EINVAL] | |
157 | .It Bq Er ENODEV | |
3ad356c1 | 158 | no such device. |
9903e566 | 159 | .It Bq Er EBUSY |
3ad356c1 | 160 | Another process has the device open. |
9903e566 | 161 | .It Bq Er EINVAL |
3ad356c1 | 162 | Invalid ioctl specification. |
9903e566 CL |
163 | .El |
164 | .Sh SEE ALSO | |
165 | .Xr ioctl 2 , | |
166 | .Xr grf 4 . | |
167 | .Sh HISTORY | |
168 | The | |
169 | .Nm | |
170 | driver | |
171 | .Ud | |
172 | .Sh BUGS | |
3ad356c1 | 173 | Not tested for all configurations of scan board and frame buffer memory boards. |