1*47672Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California. 244681Sbostic.\" All rights reserved. 344681Sbostic.\" 444681Sbostic.\" This code is derived from software contributed to Berkeley by 544681Sbostic.\" the Systems Programming Group of the University of Utah Computer 644681Sbostic.\" Science Department. 744681Sbostic.\" 844681Sbostic.\" %sccs.include.redist.man% 944681Sbostic.\" 10*47672Scael.\" @(#)rb.4 5.2 (Berkeley) 03/27/91 1144681Sbostic.\" 12*47672Scael.Dd 13*47672Scael.Dt RB 4 hp300 14*47672Scael.Os 15*47672Scael.Sh NAME 16*47672Scael.Nm rb 17*47672Scael.Nd 18*47672Scael.Tn HP98720 19*47672Scael``Renaissance'' device interface 20*47672Scael.Sh DESCRIPTION 21*47672ScaelThis driver is for the 22*47672Scael.Tn HP98720 23*47672Scaeland 98721 graphics device, also known as 2444681Sbosticthe Renaissance. This driver has not been tested with all possible 2544681Sbosticcombinations of frame buffer boards and scan boards installed in the device. 2644681SbosticThe driver merely checks for the existence of the device and does minimal set 2744681Sbosticup. 28*47672Scael.Pp 2944681SbosticThe Renaissance can be configured at either the ``internal'' address 3044681Sbostic(frame buffer address 0x200000, control register space address 0x560000) 3144681Sbosticor at an external select code less than 32. 3244681SbosticAt the internal address it will be the ``preferred'' console device 3344681Sbostic(see 34*47672Scael.Xr cons 4 ) . 3544681SbosticThe hardware installation manual describes the procedure for 3644681Sbosticsetting these values. 37*47672Scael.Pp 3844681SbosticA 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 2 43*47672Scaelcalls supported, refer to 44*47672Scael.Tn HP-UX 45*47672Scaelmanuals. 46*47672ScaelThe 47*47672Scael.Tn BSD 48*47672Scaelcalls supported are: 49*47672Scael.Bl -tag -width indent 50*47672Scael.It Dv GRFIOCGINFO 5144681SbosticGet Graphics Info 52*47672Scael.Pp 5344681SbosticGet info about device, setting the entries in the 54*47672Scael.Ar grfinfo 55*47672Scaelstructure, as defined in 56*47672Scael.Aq Pa hpdev/grfioctl.h . 5744681SbosticFor the standard 98720, the number of planes should be 4. The number of 5844681Sbosticcolors would therefore be 15, excluding black. If one 98722A frame buffer 5944681Sbosticboard is installed, there will still be 4 planes, with the 4 planes on the 6044681Sbosticcolormap board becoming overlay planes. With each additional 98722 frame 6144681Sbosticbuffer board 4 planes will be added up to a maximum of 32 planes total. 62*47672Scael.It Dv GRFIOCON 6344681SbosticGraphics On 64*47672Scael.Pp 65*47672ScaelTurn graphics on by enabling 66*47672Scael.Tn CRT 67*47672Scaeloutput. The screen will come on, displaying 6844681Sbosticwhatever is in the frame buffer, using whatever colormap is in place. 69*47672Scael.It Dv GRFIOCOFF 7044681SbosticGraphics Off 71*47672Scael.Pp 72*47672ScaelTurn graphics off by disabling output to the 73*47672Scael.Tn CRT . 74*47672ScaelThe frame buffer contents 7544681Sbosticare not affected. 76*47672Scael.It Dv GRFIOCMAP 7744681SbosticMap Device to user space 78*47672Scael.Pp 7944681SbosticMap in control registers and framebuffer space. Once the device file is 8044681Sbosticmapped, the frame buffer structure is accessible. The structure describing 81*47672Scaelthe 98720 is defined in 82*47672Scael.Pa hpdev/grf_rbreg.h . 83*47672Scael.El 84*47672Scael.Sh EXAMPLE 8544681SbosticThis is a short segment of code showing how the device is opened and mapped 8644681Sbosticinto user process address space assuming that it is grf0: 87*47672Scael.Bd -literal 88*47672Scaelstruct rboxfb *rbox; 89*47672Scaelu_char *Addr, frame_buffer; 90*47672Scaelstruct grfinfo gi; 91*47672Scaelint disp_fd; 9244681Sbostic 93*47672Scaeldisp_fd = open("/dev/grf0",1); 9444681Sbostic 95*47672Scaelif (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; 9644681Sbostic 97*47672Scael(void) ioctl (disp_fd, GRFIOCON, 0); 9844681Sbostic 99*47672ScaelAddr = (u_char *) 0; 100*47672Scaelif (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { 101*47672Scael (void) ioctl (disp_fd, GRFIOCOFF, 0); 102*47672Scael return -1; 10344681Sbostic} 104*47672Scaelrbox = (rboxfb *) Addr; /* Control Registers */ 105*47672Scaelframe_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ 106*47672Scael.Ed 107*47672Scael.Sh FILES 108*47672Scael.Bl -tag -width /dev/MAKEDEV.hpux -compact 109*47672Scael.It Pa /dev/grf? 110*47672Scael.Bx 111*47672Scaelspecial file 112*47672Scael.It Pa /dev/crt98720 113*47672Scael.It Pa /dev/ocrt98720 114*47672Scael.Tn HP-UX 115*47672Scael.Em starbase 116*47672Scaelspecial files 117*47672Scael.It Pa /dev/MAKEDEV.hpux 118*47672Scaelscript for creating 119*47672Scael.Tn HP-UX 120*47672Scaelspecial files 121*47672Scael.El 122*47672Scael.Sh DIAGNOSTICS 123*47672ScaelNone under 124*47672Scael.Bx . 125*47672ScaelThe 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 13244681Sbosticno such device. 133*47672Scael.It Bq Er EBUSY 13444681SbosticAnother process has the device open. 135*47672Scael.It Bq Er EINVAL 13644681SbosticInvalid ioctl specification. 137*47672Scael.El 138*47672Scael.Sh SEE ALSO 139*47672Scael.Xr ioctl 2 , 140*47672Scael.Xr grf 4 . 141*47672Scael.Pp 142*47672ScaelFor extensive code examples using the 143*47672ScaelRenaissance, see the X device dependent source. 144*47672Scael.Sh HISTORY 145*47672ScaelThe 146*47672Scael.Nm 147*47672Scaelinterface 148*47672Scael.Ud 149*47672Scael.Sh BUGS 15044681SbosticNot tested for all configurations of scan board and frame buffer memory boards. 151