From ce514e08aa8fdbdf52da2ac2cbdace68e0b25210 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 26 Apr 2003 22:52:39 +0000 Subject: 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. --- bsd/drmP.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bsd/drmP.h') diff --git a/bsd/drmP.h b/bsd/drmP.h index d40bcdaa..e8720395 100644 --- a/bsd/drmP.h +++ b/bsd/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_ */ -- cgit v1.2.3