1 .\" $NetBSD: dvbox.4,v 1.3 2002/02/13 08:17:56 ross Exp $
3 .\" Copyright (c) 1990, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
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.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
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.
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
34 .\" from: @(#)dv.4 8.1 (Berkeley) 6/9/93
43 ``DaVinci'' graphics device interface
45 This driver is for the
47 and 98731 graphics device, also known as
48 the DaVinci. This driver has not been tested with all possible
49 combinations of frame buffer boards and scan boards installed in the device.
50 The driver merely checks for the existence of the device and does minimal set
53 The DaVinci can be configured at either the ``internal'' address
54 (frame buffer address 0x200000, control register space address 0x560000)
55 or at an external select code less than 32.
56 At the internal address it will be the ``preferred'' console device.
57 The hardware installation manual describes the procedure for
60 A user process communicates to the device initially by means of
65 calls supported, refer to
71 .Bl -tag -width indent
75 Get info about device, setting the entries in the
77 structure, as defined in
78 .Aq Pa hpdev/grfioctl.h .
79 For the standard 98730, the number of planes should be 4. The number of
80 colors would therefore be 15, excluding black. If one 98732A frame buffer
81 board is installed, there will still be 4 planes, with the 4 planes on the
82 colormap board becoming overlay planes. With each additional 98732 frame
83 buffer board 4 planes will be added up to a maximum of 32 planes total.
87 Turn graphics on by enabling
89 output. The screen will come on, displaying
90 whatever is in the frame buffer, using whatever colormap is in place.
94 Turn graphics off by disabling output to the
96 The frame buffer contents
99 Map Device to user space
101 Map in control registers and frame buffer space. Once the device file is
102 mapped, the frame buffer structure is accessible. The structure describing
103 the 98730 is defined in
104 .Aq Pa hpdev/grf_dvreg.h .
107 .Bl -tag -width /dev/MAKEDEV.hpux -compact
112 .It Pa /dev/ocrt98730
116 .It Pa /dev/MAKEDEV.hpux
122 This is a short segment of code showing how the device is opened and mapped
123 into user process address space assuming that it is
125 .Bd -literal -offset indent
126 struct dvboxfb *dvbox;
127 u_char *Addr, frame_buffer;
131 disp_fd = open("/dev/grf0",1);
133 if (ioctl (disp_fd, GRFIOCGINFO, \*[Am]gi) \*[Lt] 0) return -1;
135 (void) ioctl (disp_fd, GRFIOCON, 0);
138 if (ioctl (disp_fd, GRFIOCMAP, \*[Am]Addr) \*[Lt] 0) {
139 (void) ioctl (disp_fd, GRFIOCOFF, 0);
142 dvbox = (dvboxfb *) Addr; /* Control Registers */
143 frame_buffer=(u_char *)Addr+gi.gd_regsize; /* Frame buffer memory */
152 .Bl -tag -width [EINVAL]
156 Another process has the device open.
158 Invalid ioctl specification.
164 Not tested for all configurations of scan board and frame buffer memory boards.