From c9202c89653b8dac2ac322c3d3a7389945e1c94c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 6 Nov 2004 01:41:47 +0000 Subject: Commit WIP of BSD conversion to core model. Compiles for r128, radeon, but doesn't run yet. Moves the ioctl definitions for these two drivers back to the shared code -- they aren't OS-specific. --- bsd-core/ati_pcigart.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'bsd-core/ati_pcigart.c') diff --git a/bsd-core/ati_pcigart.c b/bsd-core/ati_pcigart.c index 9aa2192f..4d8a03f5 100644 --- a/bsd-core/ati_pcigart.c +++ b/bsd-core/ati_pcigart.c @@ -43,9 +43,8 @@ # define ATI_MAX_PCIGART_PAGES 8192 /* 32 MB aperture, 4K pages */ # define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */ -int DRM(ati_pcigart_init)( drm_device_t *dev, - unsigned long *addr, - dma_addr_t *bus_addr) +int drm_ati_pcigart_init(drm_device_t *dev, unsigned long *addr, + dma_addr_t *bus_addr) { drm_sg_mem_t *entry = dev->sg; unsigned long address = 0; @@ -59,7 +58,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev, } address = (long)contigmalloc((1 << ATI_PCIGART_TABLE_ORDER) * PAGE_SIZE, - DRM(M_DRM), M_NOWAIT, 0ul, 0xfffffffful, PAGE_SIZE, 0); + M_DRM, M_NOWAIT, 0ul, 0xfffffffful, PAGE_SIZE, 0); if ( !address ) { DRM_ERROR( "cannot allocate PCI GART page!\n" ); goto done; @@ -95,9 +94,8 @@ done: return ret; } -int DRM(ati_pcigart_cleanup)( drm_device_t *dev, - unsigned long addr, - dma_addr_t bus_addr) +int drm_ati_pcigart_cleanup(drm_device_t *dev, unsigned long addr, + dma_addr_t bus_addr) { drm_sg_mem_t *entry = dev->sg; @@ -108,7 +106,9 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev, } #if __FreeBSD_version > 500000 - contigfree( (void *)addr, (1 << ATI_PCIGART_TABLE_ORDER) * PAGE_SIZE, DRM(M_DRM)); /* Not available on 4.x */ + /* Not available on 4.x */ + contigfree((void *)addr, (1 << ATI_PCIGART_TABLE_ORDER) * PAGE_SIZE, + M_DRM); #endif return 1; } -- cgit v1.2.3