diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-04-26 05:19:11 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-04-26 05:19:11 +0000 |
commit | ec111d70fee0647c4c68a02c723d4a3729c93b56 (patch) | |
tree | 114a3257310a979d3dea484af62322ba007bf1e0 /linux-core/drmP.h | |
parent | 31a06d0baca9e378a773ca8bd350860546dd8a79 (diff) |
Convert BSD code to mostly use bus_dma, the dma abstraction for dealing
with IOMMUs and such. There is one usage of the forbidden vtophys()
left in drm_scatter.c which will be fixed up soon. This required a KPI
change for drm_pci_alloc/free() to return/use a drm_dma_handle_t that
keeps track of os-specific bits, rather than just passing around the
vaddr/busaddr/size.
Submitted by: Tonnerre Lombard (partially) Tested on: FreeBSD: Rage128
AGP/PCI Linux: Savage4 AGP/PCI
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r-- | linux-core/drmP.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index cdf7e76f..b7f4640f 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -482,6 +482,12 @@ typedef struct drm_sigdata { drm_hw_lock_t *lock; } drm_sigdata_t; +typedef struct drm_dma_handle { + dma_addr_t busaddr; + void *vaddr; + size_t size; +} drm_dma_handle_t; + /** * Mappings list */ @@ -959,11 +965,9 @@ extern int drm_ati_pcigart_init(drm_device_t * dev, extern int drm_ati_pcigart_cleanup(drm_device_t * dev, unsigned long addr, dma_addr_t bus_addr); -extern void *drm_pci_alloc(drm_device_t * dev, size_t size, - size_t align, dma_addr_t maxaddr, - dma_addr_t * busaddr); -extern void drm_pci_free(drm_device_t * dev, size_t size, - void *vaddr, dma_addr_t busaddr); +extern drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, + size_t align, dma_addr_t maxaddr); +extern void drm_pci_free(drm_device_t * dev, drm_dma_handle_t *dmah); /* sysfs support (drm_sysfs.c) */ struct drm_sysfs_class; |