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