diff options
author | Eric Anholt <anholt@freebsd.org> | 2003-04-26 22:52:39 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2003-04-26 22:52:39 +0000 |
commit | ce514e08aa8fdbdf52da2ac2cbdace68e0b25210 (patch) | |
tree | 4c7101a5f73d5fcface6aeee9b4f599d6a3be9ce /bsd-core/drmP.h | |
parent | f2a0c5438dc83171de1007a68e4f98e35b5a8fbe (diff) |
Add PCI DMA memory functions and make addbufs_pci and associated code use
it. To do this we need to save the bus address along with the virtual
address in the seglist. Also fix some error handling and a few bits of
whitespace.
Diffstat (limited to 'bsd-core/drmP.h')
-rw-r--r-- | bsd-core/drmP.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h index d40bcdaa..e8720395 100644 --- a/bsd-core/drmP.h +++ b/bsd-core/drmP.h @@ -196,7 +196,8 @@ typedef struct drm_buf_entry { drm_buf_t *buflist; int seg_count; int page_order; - unsigned long *seglist; + vm_offset_t *seglist; + dma_addr_t *seglist_bus; drm_freelist_t freelist; } drm_buf_entry_t; @@ -562,6 +563,12 @@ extern int DRM(sg_alloc)(DRM_IOCTL_ARGS); extern int DRM(sg_free)(DRM_IOCTL_ARGS); #endif +/* consistent PCI memory functions (drm_pci.h) */ +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); #endif /* __KERNEL__ */ #endif /* _DRM_P_H_ */ |