diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-20 01:28:46 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-20 01:28:46 +0000 |
commit | d5500d36a0181d72b896403311ff144ddf639ae0 (patch) | |
tree | fddb6f174c7deed1cdc511d580c419839c941b35 /sys/dev/pci/agpvar.h | |
parent | 8c6f93358f3f400eb044a708e4fef86d4d2e61f0 (diff) |
Don't map all agp memory we allocate.
If we're just going to be making it available to userland (the X
server), just use load_raw and make sure it's zeroed with BUS_DMA_ZERO.
Should save $AMOUNT_BOUND_TO_GART kva. Most kernel users also write
through the gart, so no mapping there either.
tested by sthen and todd a while back.
Diffstat (limited to 'sys/dev/pci/agpvar.h')
-rw-r--r-- | sys/dev/pci/agpvar.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/pci/agpvar.h b/sys/dev/pci/agpvar.h index bd14c5ee33d..4e810649b23 100644 --- a/sys/dev/pci/agpvar.h +++ b/sys/dev/pci/agpvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: agpvar.h,v 1.15 2008/11/09 15:11:19 oga Exp $ */ +/* $OpenBSD: agpvar.h,v 1.16 2009/04/20 01:28:45 oga Exp $ */ /* $NetBSD: agpvar.h,v 1.4 2001/10/01 21:54:48 fvdl Exp $ */ /*- @@ -74,7 +74,6 @@ struct agp_memory { off_t am_offset; /* page offset if bound */ int am_is_bound; /* non-zero if bound */ bus_addr_t am_physical; - caddr_t am_virtual; bus_dmamap_t am_dmamap; int am_nseg; bus_dma_segment_t *am_dmaseg; @@ -162,10 +161,10 @@ void agp_flush_cache(void); int agp_generic_bind_memory(struct agp_softc *, struct agp_memory *, off_t); int agp_generic_unbind_memory(struct agp_softc *, struct agp_memory *); -int agp_alloc_dmamem(bus_dma_tag_t, size_t, int, bus_dmamap_t *, - caddr_t *, bus_addr_t *, bus_dma_segment_t *, int, int *); +int agp_alloc_dmamem(bus_dma_tag_t, size_t, bus_dmamap_t *, + bus_addr_t *, bus_dma_segment_t *); void agp_free_dmamem(bus_dma_tag_t, size_t, bus_dmamap_t, - caddr_t, bus_dma_segment_t *, int nseg) ; + bus_dma_segment_t *); int agpdev_print(void *, const char *); int agpbus_probe(struct agp_attach_args *aa); |