1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 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.\" 10.\" @(#)dv.4 5.2 (Berkeley) 03/27/91 11.\" 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 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. 28.Pp 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 34.Xr cons 4 ) . 35The hardware installation manual describes the procedure for 36setting these values. 37.Pp 38A user process communicates to the device initially by means of 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 51Get Graphics Info 52.Pp 53Get info about device, setting the entries in the 54.Ar grfinfo 55structure, as defined in 56.Aq Pa hpdev/grfioctl.h . 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. 62.It Dv GRFIOCON 63Graphics On 64.Pp 65Turn graphics on by enabling 66.Tn CRT 67output. The screen will come on, displaying 68whatever is in the frame buffer, using whatever colormap is in place. 69.It Dv GRFIOCOFF 70Graphics Off 71.Pp 72Turn graphics off by disabling output to the 73.Tn CRT . 74The frame buffer contents 75are not affected. 76.It Dv GRFIOCMAP 77Map Device to user space 78.Pp 79Map in control registers and frame buffer space. Once the device file is 80mapped, the frame buffer structure is accessible. The structure describing 81the 98730 is defined in 82.Aq Pa hpdev/grf_dvreg.h . 83.El 84.Sh EXAMPLE 85This is a short segment of code showing how the device is opened and mapped 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; 93 94disp_fd = open("/dev/grf0",1); 95 96if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; 97 98(void) ioctl (disp_fd, GRFIOCON, 0); 99 100Addr = (u_char *) 0; 101if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { 102(void) ioctl (disp_fd, GRFIOCOFF, 0); 103return -1; 104} 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 132no such device. 133.It Bq Er EBUSY 134Another process has the device open. 135.It Bq Er EINVAL 136Invalid ioctl specification. 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 147Not tested for all configurations of scan board and frame buffer memory boards. 148