xref: /csrg-svn/share/man/man4/man4.hp300/dv.4 (revision 62976)
1*62976Sbostic.\" Copyright (c) 1990, 1991, 1993
2*62976Sbostic.\"	The Regents of the University of California.  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*62976Sbostic.\"     @(#)dv.4	8.1 (Berkeley) 06/09/93
1144675Sbostic.\"
1247672Scael.Dd
1347672Scael.Dt DV 4 hp300
1447672Scael.Os
1547672Scael.Sh NAME
1647672Scael.Nm dv
1747672Scael.Nd
1847672Scael.Tn HP98730
1947672Scael``DaVinci'' device interface
2047672Scael.Sh DESCRIPTION
2147672ScaelThis driver is for the
2247672Scael.Tn HP98730
2347672Scaeland 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.
2847672Scael.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
3447672Scael.Xr cons 4 ) .
3544675SbosticThe hardware installation manual describes the procedure for
3644675Sbosticsetting these values.
3747672Scael.Pp
3844675SbosticA user process communicates to the device initially by means of
3947672Scael.Xr ioctl 2
4047672Scaelcalls.  For the
4147672Scael.Tn HP-UX
4247672Scael.Xr ioctl
4347672Scaelcalls supported, refer to
4447672Scael.Tn HP-UX
4547672Scaelmanuals.
4647672ScaelThe
4747672Scael.Bx
4847672Scaelcalls supported are:
4947672Scael.Bl -tag -width indent
5047672Scael.It Dv GRFIOCGINFO
5144675SbosticGet Graphics Info
5247672Scael.Pp
5344675SbosticGet info about device, setting the entries in the
5447672Scael.Ar grfinfo
5547672Scaelstructure, as defined in
5647672Scael.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.
6247672Scael.It Dv GRFIOCON
6344675SbosticGraphics On
6447672Scael.Pp
6547672ScaelTurn graphics on by enabling
6647672Scael.Tn CRT
6747672Scaeloutput.  The screen will come on, displaying
6844675Sbosticwhatever is in the frame buffer, using whatever colormap is in place.
6947672Scael.It Dv GRFIOCOFF
7044675SbosticGraphics Off
7147672Scael.Pp
7247672ScaelTurn graphics off by disabling output to the
7347672Scael.Tn CRT .
7447672ScaelThe frame buffer contents
7544675Sbosticare not affected.
7647672Scael.It Dv GRFIOCMAP
7744675SbosticMap Device to user space
7847672Scael.Pp
7947672ScaelMap in control registers and frame buffer space. Once the device file is
8044675Sbosticmapped, the frame buffer structure is accessible.  The structure describing
8147672Scaelthe 98730 is defined in
8247672Scael.Aq Pa hpdev/grf_dvreg.h .
8347672Scael.El
8447672Scael.Sh EXAMPLE
8544675SbosticThis is a short segment of code showing how the device is opened and mapped
8647672Scaelinto user process address space assuming that it is
8747672Scael.Ql grf0 :
8847672Scael.Bd -literal -offset indent
8947672Scaelstruct dvboxfb *dvbox;
9047672Scaelu_char *Addr, frame_buffer;
9147672Scaelstruct grfinfo gi;
9247672Scaelint disp_fd;
9344675Sbostic
9447672Scaeldisp_fd = open("/dev/grf0",1);
9544675Sbostic
9647672Scaelif (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1;
9744675Sbostic
9847672Scael(void) ioctl (disp_fd, GRFIOCON, 0);
9944675Sbostic
10047672ScaelAddr = (u_char *) 0;
10147672Scaelif (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) {
10247672Scael(void) ioctl (disp_fd, GRFIOCOFF, 0);
10347672Scaelreturn -1;
10444675Sbostic}
10547672Scaeldvbox = (dvboxfb *) Addr;                  /* Control Registers   */
10647672Scaelframe_buffer=(u_char *)Addr+gi.gd_regsize; /* Frame buffer memory */
10747672Scael.Ed
10847672Scael.Sh FILES
10947672Scael.Bl -tag -width /dev/MAKEDEV.hpux -compact
11047672Scael.It Pa /dev/grf?
11147672Scael.Bx
11247672Scaelspecial file
11347672Scael.It Pa /dev/crt98730
11447672Scael.It Pa /dev/ocrt98730
11547672Scael.Tn HP-UX
11647672Scael.Em starbase
11747672Scaelspecial files
11847672Scael.It Pa /dev/MAKEDEV.hpux
11947672Scaelscript for creating
12047672Scael.Tn HP-UX
12147672Scaelspecial files
12247672Scael.El
12347672Scael.Sh DIAGNOSTICS
12447672ScaelNone under
12547672Scael.Bx .
12647672Scael.Tn HP-UX
12747672Scael.Tn CE.utilities
12847672Scaelmust be used.
12947672Scael.Sh ERRORS
13047672Scael.Bl -tag -width [EINVAL]
13147672Scael.It Bq Er ENODEV
13244675Sbosticno such device.
13347672Scael.It Bq Er EBUSY
13444675SbosticAnother process has the device open.
13547672Scael.It Bq Er EINVAL
13644675SbosticInvalid ioctl specification.
13747672Scael.El
13847672Scael.Sh SEE ALSO
13947672Scael.Xr ioctl 2 ,
14047672Scael.Xr grf 4 .
14147672Scael.Sh BUGS
14244675SbosticNot tested for all configurations of scan board and frame buffer memory boards.
143