summaryrefslogtreecommitdiff
path: root/bsd-core/ati_pcigart.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-11-06 01:41:47 +0000
committerEric Anholt <anholt@freebsd.org>2004-11-06 01:41:47 +0000
commitc9202c89653b8dac2ac322c3d3a7389945e1c94c (patch)
treeda57c01384977ea6a2962cfaac9c7c426da2c0f8 /bsd-core/ati_pcigart.c
parent39a23640b2de9e59e99d48e6de8c9edae0231856 (diff)
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.
Diffstat (limited to 'bsd-core/ati_pcigart.c')
-rw-r--r--bsd-core/ati_pcigart.c16
1 files changed, 8 insertions, 8 deletions
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;
}