diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-06-06 06:02:45 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-06-06 06:02:45 +0000 |
commit | ec5925b89b62e83010dd33bc1ad8c5ab48d6afd5 (patch) | |
tree | 179ac9a6745a8c827f87317b737aa98131af64cf /sys/dev/pci/agpvar.h | |
parent | 8d0733a46ab21b9a74bb53e474cab34e0e458771 (diff) |
add an interface to agp to create a bus_dma_tag over a range of the
aperture, which will take your memory, bind it to agp, and return you the
aperture address. It's essentially the same as iommu on amd64 in the way it
works.
This will be used by the upcoming (works but is slow and will not be
enabled at first) drm memory management code for intel igp chipsets.
Right now the sync function for intagp is really slow (doing a wbinvd()
on every sync), this is in the process of getting fixed, but the size of
the diffs in my trees was getting silly.
Diffstat (limited to 'sys/dev/pci/agpvar.h')
-rw-r--r-- | sys/dev/pci/agpvar.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/agpvar.h b/sys/dev/pci/agpvar.h index 9ea6d3ed386..5bc6a6ee5fe 100644 --- a/sys/dev/pci/agpvar.h +++ b/sys/dev/pci/agpvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: agpvar.h,v 1.19 2009/05/10 16:57:44 oga Exp $ */ +/* $OpenBSD: agpvar.h,v 1.20 2009/06/06 06:02:44 oga Exp $ */ /* $NetBSD: agpvar.h,v 1.4 2001/10/01 21:54:48 fvdl Exp $ */ /*- @@ -102,6 +102,8 @@ struct agp_methods { void (*bind_page)(void *, bus_addr_t, paddr_t, int); void (*unbind_page)(void *, bus_addr_t); void (*flush_tlb)(void *); + void (*dma_sync)(bus_dma_tag_t, bus_dmamap_t, bus_addr_t, + bus_size_t, int); int (*enable)(void *, u_int32_t mode); struct agp_memory * (*alloc_memory)(void *, int, vsize_t); @@ -168,6 +170,11 @@ int agpdev_print(void *, const char *); int agpbus_probe(struct agp_attach_args *aa); +int agp_bus_dma_init(struct agp_softc *, bus_addr_t, bus_addr_t, + bus_dma_tag_t *); +void agp_bus_dma_destroy(struct agp_softc *, bus_dma_tag_t); +void agp_bus_dma_set_alignment(bus_dma_tag_t, bus_dmamap_t, + u_long); /* * Kernel API */ |