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 | .\" | |
8 | .\" %sccs.include.redist.man% | |
9 | .\" | |
9903e566 | 10 | .\" @(#)dv.4 5.2 (Berkeley) %G% |
3ad356c1 | 11 | .\" |
9903e566 CL |
12 | .Dd |
13 | .Dt DV 4 hp300 | |
14 | .Os | |
15 | .Sh NAME | |
16 | .Nm dv | |
17 | .Nd | |
18 | .Tn HP98730 | |
19 | ``DaVinci'' device interface | |
20 | .Sh DESCRIPTION | |
21 | This driver is for the | |
22 | .Tn HP98730 | |
23 | and 98731 graphics device, also known as | |
3ad356c1 KB |
24 | the DaVinci. This driver has not been tested with all possible |
25 | combinations of frame buffer boards and scan boards installed in the device. | |
26 | The driver merely checks for the existence of the device and does minimal set | |
27 | up. | |
9903e566 | 28 | .Pp |
3ad356c1 KB |
29 | The DaVinci can be configured at either the ``internal'' address |
30 | (frame buffer address 0x200000, control register space address 0x560000) | |
31 | or at an external select code less than 32. | |
32 | At the internal address it will be the ``preferred'' console device | |
33 | (see | |
9903e566 | 34 | .Xr cons 4 ) . |
3ad356c1 KB |
35 | The hardware installation manual describes the procedure for |
36 | setting these values. | |
9903e566 | 37 | .Pp |
3ad356c1 | 38 | A user process communicates to the device initially by means of |
9903e566 CL |
39 | .Xr ioctl 2 |
40 | calls. For the | |
41 | .Tn HP-UX | |
42 | .Xr ioctl | |
43 | calls supported, refer to | |
44 | .Tn HP-UX | |
45 | manuals. | |
46 | The | |
47 | .Bx | |
48 | calls supported are: | |
49 | .Bl -tag -width indent | |
50 | .It Dv GRFIOCGINFO | |
3ad356c1 | 51 | Get Graphics Info |
9903e566 | 52 | .Pp |
3ad356c1 | 53 | Get info about device, setting the entries in the |
9903e566 CL |
54 | .Ar grfinfo |
55 | structure, as defined in | |
56 | .Aq Pa hpdev/grfioctl.h . | |
3ad356c1 KB |
57 | For the standard 98730, the number of planes should be 4. The number of |
58 | colors would therefore be 15, excluding black. If one 98732A frame buffer | |
59 | board is installed, there will still be 4 planes, with the 4 planes on the | |
60 | colormap board becoming overlay planes. With each additional 98732 frame | |
61 | buffer board 4 planes will be added up to a maximum of 32 planes total. | |
9903e566 | 62 | .It Dv GRFIOCON |
3ad356c1 | 63 | Graphics On |
9903e566 CL |
64 | .Pp |
65 | Turn graphics on by enabling | |
66 | .Tn CRT | |
67 | output. The screen will come on, displaying | |
3ad356c1 | 68 | whatever is in the frame buffer, using whatever colormap is in place. |
9903e566 | 69 | .It Dv GRFIOCOFF |
3ad356c1 | 70 | Graphics Off |
9903e566 CL |
71 | .Pp |
72 | Turn graphics off by disabling output to the | |
73 | .Tn CRT . | |
74 | The frame buffer contents | |
3ad356c1 | 75 | are not affected. |
9903e566 | 76 | .It Dv GRFIOCMAP |
3ad356c1 | 77 | Map Device to user space |
9903e566 CL |
78 | .Pp |
79 | Map in control registers and frame buffer space. Once the device file is | |
3ad356c1 | 80 | mapped, the frame buffer structure is accessible. The structure describing |
9903e566 CL |
81 | the 98730 is defined in |
82 | .Aq Pa hpdev/grf_dvreg.h . | |
83 | .El | |
84 | .Sh EXAMPLE | |
3ad356c1 | 85 | This is a short segment of code showing how the device is opened and mapped |
9903e566 CL |
86 | into user process address space assuming that it is |
87 | .Ql grf0 : | |
88 | .Bd -literal -offset indent | |
89 | struct dvboxfb *dvbox; | |
90 | u_char *Addr, frame_buffer; | |
91 | struct grfinfo gi; | |
92 | int disp_fd; | |
3ad356c1 | 93 | |
9903e566 | 94 | disp_fd = open("/dev/grf0",1); |
3ad356c1 | 95 | |
9903e566 | 96 | if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; |
3ad356c1 | 97 | |
9903e566 | 98 | (void) ioctl (disp_fd, GRFIOCON, 0); |
3ad356c1 | 99 | |
9903e566 CL |
100 | Addr = (u_char *) 0; |
101 | if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { | |
102 | (void) ioctl (disp_fd, GRFIOCOFF, 0); | |
103 | return -1; | |
3ad356c1 | 104 | } |
9903e566 CL |
105 | dvbox = (dvboxfb *) Addr; /* Control Registers */ |
106 | frame_buffer=(u_char *)Addr+gi.gd_regsize; /* Frame buffer memory */ | |
107 | .Ed | |
108 | .Sh FILES | |
109 | .Bl -tag -width /dev/MAKEDEV.hpux -compact | |
110 | .It Pa /dev/grf? | |
111 | .Bx | |
112 | special file | |
113 | .It Pa /dev/crt98730 | |
114 | .It Pa /dev/ocrt98730 | |
115 | .Tn HP-UX | |
116 | .Em starbase | |
117 | special files | |
118 | .It Pa /dev/MAKEDEV.hpux | |
119 | script for creating | |
120 | .Tn HP-UX | |
121 | special files | |
122 | .El | |
123 | .Sh DIAGNOSTICS | |
124 | None under | |
125 | .Bx . | |
126 | .Tn HP-UX | |
127 | .Tn CE.utilities | |
128 | must be used. | |
129 | .Sh ERRORS | |
130 | .Bl -tag -width [EINVAL] | |
131 | .It Bq Er ENODEV | |
3ad356c1 | 132 | no such device. |
9903e566 | 133 | .It Bq Er EBUSY |
3ad356c1 | 134 | Another process has the device open. |
9903e566 | 135 | .It Bq Er EINVAL |
3ad356c1 | 136 | Invalid ioctl specification. |
9903e566 CL |
137 | .El |
138 | .Sh SEE ALSO | |
139 | .Xr ioctl 2 , | |
140 | .Xr grf 4 . | |
141 | .Sh HISTORY | |
142 | The | |
143 | .Nm | |
144 | driver | |
145 | .Ud | |
146 | .Sh BUGS | |
3ad356c1 | 147 | Not tested for all configurations of scan board and frame buffer memory boards. |