Allow the control registers to be mapped too.
This commit is contained in:
parent
1f4324fd52
commit
2fa61d9691
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf.c,v 1.17 1996/12/20 12:49:36 leo Exp $ */
|
||||
/* $NetBSD: grf.c,v 1.18 1997/01/10 21:00:36 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
|
@ -293,6 +293,12 @@ int off, prot;
|
|||
gp = grfsp[GRFUNIT(dev)];
|
||||
gi = &gp->g_display;
|
||||
|
||||
/*
|
||||
* control registers
|
||||
*/
|
||||
if (off >= 0 && off < gi->gd_regsize)
|
||||
return(((u_int)gi->gd_regaddr + off) >> PGSHIFT);
|
||||
|
||||
/*
|
||||
* frame buffer
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: view.c,v 1.13 1996/10/13 04:11:12 christos Exp $ */
|
||||
/* $NetBSD: view.c,v 1.14 1997/01/10 21:00:37 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
|
@ -413,6 +413,12 @@ int off, prot;
|
|||
bmd_start = bm->hw_address;
|
||||
bmd_size = bm->bytes_per_row*bm->rows*bm->depth;
|
||||
|
||||
/*
|
||||
* control registers
|
||||
*/
|
||||
if (off >= 0 && off < bm->reg_size)
|
||||
return(((u_int)bm->hw_regs + off) >> PGSHIFT);
|
||||
|
||||
if (off >= 0 && off < bmd_size)
|
||||
return(((u_int)bmd_start + off) >> PGSHIFT);
|
||||
|
||||
|
|
Loading…
Reference in New Issue