1*62990Sbostic.\" Copyright (c) 1990, 1991, 1993 2*62990Sbostic.\" The Regents of the University of California. 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*62990Sbostic.\" @(#)rb.4 8.1 (Berkeley) 06/09/93 1144681Sbostic.\" 1247672Scael.Dd 1347672Scael.Dt RB 4 hp300 1447672Scael.Os 1547672Scael.Sh NAME 1647672Scael.Nm rb 1747672Scael.Nd 1847672Scael.Tn HP98720 1947672Scael``Renaissance'' device interface 2047672Scael.Sh DESCRIPTION 2147672ScaelThis driver is for the 2247672Scael.Tn HP98720 2347672Scaeland 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. 2847672Scael.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 3447672Scael.Xr cons 4 ) . 3544681SbosticThe hardware installation manual describes the procedure for 3644681Sbosticsetting these values. 3747672Scael.Pp 3844681SbosticA user process communicates to the device initially by means of 3947672Scael.Xr ioctl 2 4047672Scaelcalls. For the 4147672Scael.Tn HP-UX 4247672Scael.Xr ioctl 2 4347672Scaelcalls supported, refer to 4447672Scael.Tn HP-UX 4547672Scaelmanuals. 4647672ScaelThe 4747672Scael.Tn BSD 4847672Scaelcalls supported are: 4947672Scael.Bl -tag -width indent 5047672Scael.It Dv GRFIOCGINFO 5144681SbosticGet Graphics Info 5247672Scael.Pp 5344681SbosticGet info about device, setting the entries in the 5447672Scael.Ar grfinfo 5547672Scaelstructure, as defined in 5647672Scael.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. 6247672Scael.It Dv GRFIOCON 6344681SbosticGraphics On 6447672Scael.Pp 6547672ScaelTurn graphics on by enabling 6647672Scael.Tn CRT 6747672Scaeloutput. The screen will come on, displaying 6844681Sbosticwhatever is in the frame buffer, using whatever colormap is in place. 6947672Scael.It Dv GRFIOCOFF 7044681SbosticGraphics Off 7147672Scael.Pp 7247672ScaelTurn graphics off by disabling output to the 7347672Scael.Tn CRT . 7447672ScaelThe frame buffer contents 7544681Sbosticare not affected. 7647672Scael.It Dv GRFIOCMAP 7744681SbosticMap Device to user space 7847672Scael.Pp 7944681SbosticMap in control registers and framebuffer space. Once the device file is 8044681Sbosticmapped, the frame buffer structure is accessible. The structure describing 8147672Scaelthe 98720 is defined in 8247672Scael.Pa hpdev/grf_rbreg.h . 8347672Scael.El 8447672Scael.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: 8747672Scael.Bd -literal 8847672Scaelstruct rboxfb *rbox; 8947672Scaelu_char *Addr, frame_buffer; 9047672Scaelstruct grfinfo gi; 9147672Scaelint disp_fd; 9244681Sbostic 9347672Scaeldisp_fd = open("/dev/grf0",1); 9444681Sbostic 9547672Scaelif (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; 9644681Sbostic 9747672Scael(void) ioctl (disp_fd, GRFIOCON, 0); 9844681Sbostic 9947672ScaelAddr = (u_char *) 0; 10047672Scaelif (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { 10147672Scael (void) ioctl (disp_fd, GRFIOCOFF, 0); 10247672Scael return -1; 10344681Sbostic} 10447672Scaelrbox = (rboxfb *) Addr; /* Control Registers */ 10547672Scaelframe_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ 10647672Scael.Ed 10747672Scael.Sh FILES 10847672Scael.Bl -tag -width /dev/MAKEDEV.hpux -compact 10947672Scael.It Pa /dev/grf? 11047672Scael.Bx 11147672Scaelspecial file 11247672Scael.It Pa /dev/crt98720 11347672Scael.It Pa /dev/ocrt98720 11447672Scael.Tn HP-UX 11547672Scael.Em starbase 11647672Scaelspecial files 11747672Scael.It Pa /dev/MAKEDEV.hpux 11847672Scaelscript for creating 11947672Scael.Tn HP-UX 12047672Scaelspecial files 12147672Scael.El 12247672Scael.Sh DIAGNOSTICS 12347672ScaelNone under 12447672Scael.Bx . 12547672ScaelThe 12647672Scael.Tn HP-UX 12747672Scael.Tn CE.utilities 12847672Scaelmust be used. 12947672Scael.Sh ERRORS 13047672Scael.Bl -tag -width [EINVAL] 13147672Scael.It Bq Er ENODEV 13244681Sbosticno such device. 13347672Scael.It Bq Er EBUSY 13444681SbosticAnother process has the device open. 13547672Scael.It Bq Er EINVAL 13644681SbosticInvalid ioctl specification. 13747672Scael.El 13847672Scael.Sh SEE ALSO 13947672Scael.Xr ioctl 2 , 14047672Scael.Xr grf 4 . 14147672Scael.Pp 14247672ScaelFor extensive code examples using the 14347672ScaelRenaissance, see the X device dependent source. 14447672Scael.Sh BUGS 14544681SbosticNot tested for all configurations of scan board and frame buffer memory boards. 146