- Provide the reasonable size that can/may be mmap-ed. This might differ
from the current frame buffer size. - The et-driver now allows for a 16Kb io-region (was 8Kb) that can be mapped. The XFree server uses this.
This commit is contained in:
parent
d5733f126e
commit
7c2c0c846c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grf.c,v 1.19 1997/02/26 12:28:40 leo Exp $ */
|
||||
/* $NetBSD: grf.c,v 1.20 1997/04/25 19:25:38 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -390,7 +390,7 @@ struct grf_softc *gp;
|
||||
gp->g_data = (caddr_t) 0xDeadBeaf; /* not particularly clean.. */
|
||||
|
||||
gi->gd_fbaddr = bm.hw_address;
|
||||
gi->gd_fbsize = bm.depth*bm.bytes_per_row*bm.rows;
|
||||
gi->gd_fbsize = bm.phys_mappable;
|
||||
gi->gd_regaddr = bm.hw_regs;
|
||||
gi->gd_regsize = bm.reg_size;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grfabs_et.c,v 1.6 1997/01/10 20:59:27 leo Exp $ */
|
||||
/* $NetBSD: grfabs_et.c,v 1.7 1997/04/25 19:25:39 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Leo Weppelman.
|
||||
@ -68,6 +68,13 @@
|
||||
|
||||
#define SAVEBUF_SIZE (32*1024 + sizeof(save_area_t))
|
||||
|
||||
/*
|
||||
* Allow a 16Kb io-region and a 4MB frame buffer to be mapped. This
|
||||
* is more or less required by the XFree server.
|
||||
*/
|
||||
#define REG_MAPPABLE (16 * 1024)
|
||||
#define FRAME_MAPPABLE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Function decls
|
||||
*/
|
||||
@ -309,7 +316,8 @@ u_char depth;
|
||||
bm->hw_address = (caddr_t)kvtop(et_priv.memkva);
|
||||
bm->regs = et_priv.regkva;
|
||||
bm->hw_regs = (caddr_t)kvtop(et_priv.regkva);
|
||||
bm->reg_size = et_priv.regsz;
|
||||
bm->reg_size = REG_MAPPABLE;
|
||||
bm->phys_mappable = FRAME_MAPPABLE;
|
||||
|
||||
bm->bytes_per_row = (mode->size.width * depth) / NBBY;
|
||||
bm->rows = mode->size.height;
|
||||
@ -419,8 +427,8 @@ et_probe_card()
|
||||
*/
|
||||
et_priv.regkva = (volatile caddr_t)pci_io_addr;
|
||||
et_priv.memkva = (volatile caddr_t)pci_mem_addr;
|
||||
et_priv.memsz = 4 * NBPG;
|
||||
et_priv.regsz = NBPG;
|
||||
et_priv.memsz = PCI_MEM_SIZE;
|
||||
et_priv.regsz = PCI_IO_SIZE;
|
||||
|
||||
if (found && !atari_realconfig) {
|
||||
et_boardinit();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grfabs_fal.c,v 1.7 1996/10/04 07:27:55 leo Exp $ */
|
||||
/* $NetBSD: grfabs_fal.c,v 1.8 1997/04/25 19:25:39 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Thomas Gerner.
|
||||
@ -547,6 +547,7 @@ u_char depth;
|
||||
bm->bytes_per_row = (width * depth) / NBBY;
|
||||
bm->rows = height;
|
||||
bm->depth = depth;
|
||||
bm->phys_mappable = (depth * width * height) / NBBY;
|
||||
bm->regs = bm->hw_regs = NULL;
|
||||
bm->reg_size = 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grfabs_tt.c,v 1.6 1996/10/04 07:27:56 leo Exp $ */
|
||||
/* $NetBSD: grfabs_tt.c,v 1.7 1997/04/25 19:25:40 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
@ -365,6 +365,7 @@ u_char depth;
|
||||
bm->regs = NULL;
|
||||
bm->hw_regs = NULL;
|
||||
bm->reg_size = 0;
|
||||
bm->phys_mappable = (depth * width * height) / NBBY;
|
||||
|
||||
bzero(bm->plane, bm_size);
|
||||
return (bm);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: view.c,v 1.14 1997/01/10 21:00:37 leo Exp $ */
|
||||
/* $NetBSD: view.c,v 1.15 1997/04/25 19:25:41 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -411,7 +411,7 @@ int off, prot;
|
||||
vu = &views[minor(dev)];
|
||||
bm = vu->view->bitmap;
|
||||
bmd_start = bm->hw_address;
|
||||
bmd_size = bm->bytes_per_row*bm->rows*bm->depth;
|
||||
bmd_size = bm->phys_mappable;
|
||||
|
||||
/*
|
||||
* control registers
|
||||
|
Loading…
Reference in New Issue
Block a user