* Copyright (c) 1988 University of Utah.
* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Redistribution is only permitted until one year after the first shipment
* of 4.4BSD by the Regents. Otherwise, redistribution and use in source and
* binary forms are permitted provided that: (1) source distributions retain
* this entire copyright notice and comment, and (2) distributions including
* binaries display the following acknowledgement: This product includes
* software developed by the University of California, Berkeley and its
* contributors'' in the documentation or other materials provided with the
* distribution and in all advertising materials mentioning features or use
* of this software. Neither the name of the University nor the names of
* its contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* from: Utah $Hdr: grf_rb.c 1.10 89/04/11$
* @(#)grf_rb.c 7.2 (Berkeley) 5/25/90
* Graphics routines for the Renaissance, HP98720 Graphics system.
* Must point g_display at a grfinfo structure describing the hardware.
* Returns 0 if hardware not present, non-zero ow.
register struct rboxfb
*rbp
;
struct grfinfo
*gi
= &gp
->g_display
;
rbp
= (struct rboxfb
*) addr
;
gi
->gd_regaddr
= (caddr_t
) UNIOV(addr
);
gi
->gd_regsize
= 0x20000;
gi
->gd_fbwidth
= (rbp
->fbwmsb
<< 8) | rbp
->fbwlsb
;
gi
->gd_fbheight
= (rbp
->fbhmsb
<< 8) | rbp
->fbhlsb
;
fboff
= (rbp
->fbomsb
<< 8) | rbp
->fbolsb
;
gi
->gd_fbaddr
= (caddr_t
) (*(addr
+ fboff
) << 16);
gi
->gd_fbsize
= gi
->gd_fbwidth
* gi
->gd_fbheight
;
gi
->gd_dwidth
= (rbp
->dwmsb
<< 8) | rbp
->dwlsb
;
gi
->gd_dheight
= (rbp
->dwmsb
<< 8) | rbp
->dwlsb
;
gi
->gd_planes
= 0; /* ?? */
* Change the mode of the display.
* Right now all we can do is grfon/grfoff.
* Return a UNIX error number or 0 for success.
register struct grf_softc
*gp
;
register struct rboxfb
*rbp
;
rbp
= (struct rboxfb
*) IOV(gp
->g_display
.gd_regaddr
);
* The minimal register info here is from the Renaissance X driver.
rbp
->write_enable
= 0xffffffff;