xref: /csrg-svn/share/man/man4/man4.hp300/dv.4 (revision 47672)
1*47672Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California.
244675Sbostic.\" All rights reserved.
344675Sbostic.\"
444675Sbostic.\" This code is derived from software contributed to Berkeley by
544675Sbostic.\" the Systems Programming Group of the University of Utah Computer
644675Sbostic.\" Science Department.
744675Sbostic.\"
844675Sbostic.\" %sccs.include.redist.man%
944675Sbostic.\"
10*47672Scael.\"     @(#)dv.4	5.2 (Berkeley) 03/27/91
1144675Sbostic.\"
12*47672Scael.Dd
13*47672Scael.Dt DV 4 hp300
14*47672Scael.Os
15*47672Scael.Sh NAME
16*47672Scael.Nm dv
17*47672Scael.Nd
18*47672Scael.Tn HP98730
19*47672Scael``DaVinci'' device interface
20*47672Scael.Sh DESCRIPTION
21*47672ScaelThis driver is for the
22*47672Scael.Tn HP98730
23*47672Scaeland 98731 graphics device, also known as
2444675Sbosticthe DaVinci.  This driver has not been tested with all possible
2544675Sbosticcombinations of frame buffer boards and scan boards installed in the device.
2644675SbosticThe driver merely checks for the existence of the device and does minimal set
2744675Sbosticup.
28*47672Scael.Pp
2944675SbosticThe DaVinci can be configured at either the ``internal'' address
3044675Sbostic(frame buffer address 0x200000, control register space address 0x560000)
3144675Sbosticor at an external select code less than 32.
3244675SbosticAt the internal address it will be the ``preferred'' console device
3344675Sbostic(see
34*47672Scael.Xr cons 4 ) .
3544675SbosticThe hardware installation manual describes the procedure for
3644675Sbosticsetting these values.
37*47672Scael.Pp
3844675SbosticA user process communicates to the device initially by means of
39*47672Scael.Xr ioctl 2
40*47672Scaelcalls.  For the
41*47672Scael.Tn HP-UX
42*47672Scael.Xr ioctl
43*47672Scaelcalls supported, refer to
44*47672Scael.Tn HP-UX
45*47672Scaelmanuals.
46*47672ScaelThe
47*47672Scael.Bx
48*47672Scaelcalls supported are:
49*47672Scael.Bl -tag -width indent
50*47672Scael.It Dv GRFIOCGINFO
5144675SbosticGet Graphics Info
52*47672Scael.Pp
5344675SbosticGet info about device, setting the entries in the
54*47672Scael.Ar grfinfo
55*47672Scaelstructure, as defined in
56*47672Scael.Aq Pa hpdev/grfioctl.h .
5744675SbosticFor the standard 98730, the number of planes should be 4.  The number of
5844675Sbosticcolors would therefore be 15, excluding black.  If one 98732A frame buffer
5944675Sbosticboard is installed, there will still be 4 planes, with the 4 planes on the
6044675Sbosticcolormap board becoming overlay planes.  With each additional 98732 frame
6144675Sbosticbuffer board 4 planes will be added up to a maximum of 32 planes total.
62*47672Scael.It Dv GRFIOCON
6344675SbosticGraphics On
64*47672Scael.Pp
65*47672ScaelTurn graphics on by enabling
66*47672Scael.Tn CRT
67*47672Scaeloutput.  The screen will come on, displaying
6844675Sbosticwhatever is in the frame buffer, using whatever colormap is in place.
69*47672Scael.It Dv GRFIOCOFF
7044675SbosticGraphics Off
71*47672Scael.Pp
72*47672ScaelTurn graphics off by disabling output to the
73*47672Scael.Tn CRT .
74*47672ScaelThe frame buffer contents
7544675Sbosticare not affected.
76*47672Scael.It Dv GRFIOCMAP
7744675SbosticMap Device to user space
78*47672Scael.Pp
79*47672ScaelMap in control registers and frame buffer space. Once the device file is
8044675Sbosticmapped, the frame buffer structure is accessible.  The structure describing
81*47672Scaelthe 98730 is defined in
82*47672Scael.Aq Pa hpdev/grf_dvreg.h .
83*47672Scael.El
84*47672Scael.Sh EXAMPLE
8544675SbosticThis is a short segment of code showing how the device is opened and mapped
86*47672Scaelinto user process address space assuming that it is
87*47672Scael.Ql grf0 :
88*47672Scael.Bd -literal -offset indent
89*47672Scaelstruct dvboxfb *dvbox;
90*47672Scaelu_char *Addr, frame_buffer;
91*47672Scaelstruct grfinfo gi;
92*47672Scaelint disp_fd;
9344675Sbostic
94*47672Scaeldisp_fd = open("/dev/grf0",1);
9544675Sbostic
96*47672Scaelif (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1;
9744675Sbostic
98*47672Scael(void) ioctl (disp_fd, GRFIOCON, 0);
9944675Sbostic
100*47672ScaelAddr = (u_char *) 0;
101*47672Scaelif (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) {
102*47672Scael(void) ioctl (disp_fd, GRFIOCOFF, 0);
103*47672Scaelreturn -1;
10444675Sbostic}
105*47672Scaeldvbox = (dvboxfb *) Addr;                  /* Control Registers   */
106*47672Scaelframe_buffer=(u_char *)Addr+gi.gd_regsize; /* Frame buffer memory */
107*47672Scael.Ed
108*47672Scael.Sh FILES
109*47672Scael.Bl -tag -width /dev/MAKEDEV.hpux -compact
110*47672Scael.It Pa /dev/grf?
111*47672Scael.Bx
112*47672Scaelspecial file
113*47672Scael.It Pa /dev/crt98730
114*47672Scael.It Pa /dev/ocrt98730
115*47672Scael.Tn HP-UX
116*47672Scael.Em starbase
117*47672Scaelspecial files
118*47672Scael.It Pa /dev/MAKEDEV.hpux
119*47672Scaelscript for creating
120*47672Scael.Tn HP-UX
121*47672Scaelspecial files
122*47672Scael.El
123*47672Scael.Sh DIAGNOSTICS
124*47672ScaelNone under
125*47672Scael.Bx .
126*47672Scael.Tn HP-UX
127*47672Scael.Tn CE.utilities
128*47672Scaelmust be used.
129*47672Scael.Sh ERRORS
130*47672Scael.Bl -tag -width [EINVAL]
131*47672Scael.It Bq Er ENODEV
13244675Sbosticno such device.
133*47672Scael.It Bq Er EBUSY
13444675SbosticAnother process has the device open.
135*47672Scael.It Bq Er EINVAL
13644675SbosticInvalid ioctl specification.
137*47672Scael.El
138*47672Scael.Sh SEE ALSO
139*47672Scael.Xr ioctl 2 ,
140*47672Scael.Xr grf 4 .
141*47672Scael.Sh HISTORY
142*47672ScaelThe
143*47672Scael.Nm
144*47672Scaeldriver
145*47672Scael.Ud
146*47672Scael.Sh BUGS
14744675SbosticNot tested for all configurations of scan board and frame buffer memory boards.
148