diff options
Diffstat (limited to 'sys/dev/pci/drm/drm_memory.c')
-rw-r--r-- | sys/dev/pci/drm/drm_memory.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/pci/drm/drm_memory.c b/sys/dev/pci/drm/drm_memory.c index f018402f189..8d3ae1d4a5f 100644 --- a/sys/dev/pci/drm/drm_memory.c +++ b/sys/dev/pci/drm/drm_memory.c @@ -42,7 +42,8 @@ MALLOC_DEFINE(M_DRM, "drm", "DRM Data Structures"); #endif -void drm_mem_init(void) +void +drm_mem_init(void) { #if defined(__NetBSD__) /* @@ -51,22 +52,26 @@ void drm_mem_init(void) #endif } -void drm_mem_uninit(void) +void +drm_mem_uninit(void) { } -void *drm_alloc(size_t size, int area) +void* +drm_alloc(size_t size, int area) { return malloc(size, M_DRM, M_NOWAIT); } -void *drm_calloc(size_t nmemb, size_t size, int area) +void * +drm_calloc(size_t nmemb, size_t size, int area) { /* XXX overflow checking */ return malloc(size * nmemb, M_DRM, M_NOWAIT | M_ZERO); } -void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area) +void * +drm_realloc(void *oldpt, size_t oldsize, size_t size, int area) { void *pt; @@ -80,12 +85,14 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area) return pt; } -void drm_free(void *pt, size_t size, int area) +void +drm_free(void *pt, size_t size, int area) { free(pt, M_DRM); } -void *drm_ioremap(drm_device_t *dev, drm_local_map_t *map) +void * +drm_ioremap(drm_device_t *dev, drm_local_map_t *map) { #ifdef __FreeBSD__ return pmap_mapdev(map->offset, map->size); @@ -95,17 +102,14 @@ void *drm_ioremap(drm_device_t *dev, drm_local_map_t *map) map->bst = dev->pa.pa_memt; if ((ret = bus_space_map(map->bst, map->offset, map->size, BUS_SPACE_MAP_LINEAR, &map->bsh))) { - DRM_ERROR("Failed to map offset = 0x%08lx, size = 0x%08lx, type = %d, ret = %d\n", map->offset, - map->size, map->type, ret); return NULL; } - DRM_INFO("mapped offset = 0x%08lx, size = 0x%08lx, type = %d\n", map->offset, - map->offset, map->size); return bus_space_vaddr(map->bst, map->bsh); #endif } -void drm_ioremapfree(drm_local_map_t *map) +void +drm_ioremapfree(drm_local_map_t *map) { #ifdef __FreeBSD__ pmap_unmapdev((vm_offset_t) map->handle, map->size); @@ -134,11 +138,7 @@ drm_mtrr_add(unsigned long offset, size_t size, int flags) } int -#if defined(__OpenBSD__) -drm_mtrr_del(int handle, unsigned long offset, size_t size, int flags) -#else drm_mtrr_del(int __unused handle, unsigned long offset, size_t size, int flags) -#endif { #ifndef DRM_NO_MTRR int act; |