diff options
Diffstat (limited to 'linux-core/drm_agpsupport.c')
-rw-r--r-- | linux-core/drm_agpsupport.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c index 7d2f7125..8165c835 100644 --- a/linux-core/drm_agpsupport.c +++ b/linux-core/drm_agpsupport.c @@ -56,7 +56,7 @@ static const drm_agp_t *drm_agp = NULL; * Verifies the AGP device has been initialized and acquired and fills in the * drm_agp_info structure with the information in drm_agp_head::agp_info. */ -int DRM(agp_info)(struct inode *inode, struct file *filp, +int drm_agp_info(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -95,7 +95,7 @@ int DRM(agp_info)(struct inode *inode, struct file *filp, * Verifies the AGP device hasn't been acquired before and calls * drm_agp->acquire(). */ -int DRM(agp_acquire)(struct inode *inode, struct file *filp, +int drm_agp_acquire(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -129,7 +129,7 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp, * * Verifies the AGP device has been acquired and calls drm_agp->release(). */ -int DRM(agp_release)(struct inode *inode, struct file *filp, +int drm_agp_release(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -148,7 +148,7 @@ int DRM(agp_release)(struct inode *inode, struct file *filp, * * Calls drm_agp->release(). */ -void DRM(agp_do_release)(void) +void drm_agp_do_release(void) { if (drm_agp->release) drm_agp->release(); @@ -166,7 +166,7 @@ void DRM(agp_do_release)(void) * Verifies the AGP device has been acquired but not enabled, and calls * drm_agp->enable(). */ -int DRM(agp_enable)(struct inode *inode, struct file *filp, +int drm_agp_enable(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -198,7 +198,7 @@ int DRM(agp_enable)(struct inode *inode, struct file *filp, * Verifies the AGP device is present and has been acquired, allocates the * memory via alloc_agp() and creates a drm_agp_mem entry for it. */ -int DRM(agp_alloc)(struct inode *inode, struct file *filp, +int drm_agp_alloc(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -214,7 +214,7 @@ int DRM(agp_alloc)(struct inode *inode, struct file *filp, return -EINVAL; if (copy_from_user(&request, argp, sizeof(request))) return -EFAULT; - if (!(entry = DRM(alloc)(sizeof(*entry), DRM_MEM_AGPLISTS))) + if (!(entry = drm_alloc(sizeof(*entry), DRM_MEM_AGPLISTS))) return -ENOMEM; memset(entry, 0, sizeof(*entry)); @@ -222,8 +222,8 @@ int DRM(agp_alloc)(struct inode *inode, struct file *filp, pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request.type; - if (!(memory = DRM(alloc_agp)(pages, type))) { - DRM(free)(entry, sizeof(*entry), DRM_MEM_AGPLISTS); + if (!(memory = drm_alloc_agp(pages, type))) { + drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); return -ENOMEM; } @@ -243,8 +243,8 @@ int DRM(agp_alloc)(struct inode *inode, struct file *filp, if (copy_to_user(argp, &request, sizeof(request))) { dev->agp->memory = entry->next; dev->agp->memory->prev = NULL; - DRM(free_agp)(memory, pages); - DRM(free)(entry, sizeof(*entry), DRM_MEM_AGPLISTS); + drm_free_agp(memory, pages); + drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); return -EFAULT; } return 0; @@ -259,7 +259,7 @@ int DRM(agp_alloc)(struct inode *inode, struct file *filp, * * Walks through drm_agp_head::memory until finding a matching handle. */ -static drm_agp_mem_t *DRM(agp_lookup_entry)(drm_device_t *dev, +static drm_agp_mem_t *drm_agp_lookup_entry(drm_device_t *dev, unsigned long handle) { drm_agp_mem_t *entry; @@ -283,7 +283,7 @@ static drm_agp_mem_t *DRM(agp_lookup_entry)(drm_device_t *dev, * Verifies the AGP device is present and acquired, looks-up the AGP memory * entry and passes it to the unbind_agp() function. */ -int DRM(agp_unbind)(struct inode *inode, struct file *filp, +int drm_agp_unbind(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -296,11 +296,11 @@ int DRM(agp_unbind)(struct inode *inode, struct file *filp, return -EINVAL; if (copy_from_user(&request, (drm_agp_binding_t __user *)arg, sizeof(request))) return -EFAULT; - if (!(entry = DRM(agp_lookup_entry)(dev, request.handle))) + if (!(entry = drm_agp_lookup_entry(dev, request.handle))) return -EINVAL; if (!entry->bound) return -EINVAL; - ret = DRM(unbind_agp)(entry->memory); + ret = drm_unbind_agp(entry->memory); if (ret == 0) entry->bound = 0; return ret; @@ -319,7 +319,7 @@ int DRM(agp_unbind)(struct inode *inode, struct file *filp, * is currently bound into the GATT. Looks-up the AGP memory entry and passes * it to bind_agp() function. */ -int DRM(agp_bind)(struct inode *inode, struct file *filp, +int drm_agp_bind(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -333,12 +333,12 @@ int DRM(agp_bind)(struct inode *inode, struct file *filp, return -EINVAL; if (copy_from_user(&request, (drm_agp_binding_t __user *)arg, sizeof(request))) return -EFAULT; - if (!(entry = DRM(agp_lookup_entry)(dev, request.handle))) + if (!(entry = drm_agp_lookup_entry(dev, request.handle))) return -EINVAL; if (entry->bound) return -EINVAL; page = (request.offset + PAGE_SIZE - 1) / PAGE_SIZE; - if ((retcode = DRM(bind_agp)(entry->memory, page))) + if ((retcode = drm_bind_agp(entry->memory, page))) return retcode; entry->bound = dev->agp->base + (page << PAGE_SHIFT); DRM_DEBUG("base = 0x%lx entry->bound = 0x%lx\n", @@ -360,7 +360,7 @@ int DRM(agp_bind)(struct inode *inode, struct file *filp, * unbind_agp(). Frees it via free_agp() as well as the entry itself * and unlinks from the doubly linked list it's inserted in. */ -int DRM(agp_free)(struct inode *inode, struct file *filp, +int drm_agp_free(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -372,10 +372,10 @@ int DRM(agp_free)(struct inode *inode, struct file *filp, return -EINVAL; if (copy_from_user(&request, (drm_agp_buffer_t __user *)arg, sizeof(request))) return -EFAULT; - if (!(entry = DRM(agp_lookup_entry)(dev, request.handle))) + if (!(entry = drm_agp_lookup_entry(dev, request.handle))) return -EINVAL; if (entry->bound) - DRM(unbind_agp)(entry->memory); + drm_unbind_agp(entry->memory); if (entry->prev) entry->prev->next = entry->next; @@ -385,8 +385,8 @@ int DRM(agp_free)(struct inode *inode, struct file *filp, if (entry->next) entry->next->prev = entry->prev; - DRM(free_agp)(entry->memory, entry->pages); - DRM(free)(entry, sizeof(*entry), DRM_MEM_AGPLISTS); + drm_free_agp(entry->memory, entry->pages); + drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); return 0; } @@ -399,18 +399,18 @@ int DRM(agp_free)(struct inode *inode, struct file *filp, * via the inter_module_* functions. Creates and initializes a drm_agp_head * structure. */ -drm_agp_head_t *DRM(agp_init)(void) +drm_agp_head_t *drm_agp_init(void) { drm_agp_head_t *head = NULL; drm_agp = DRM_AGP_GET; if (drm_agp) { - if (!(head = DRM(alloc)(sizeof(*head), DRM_MEM_AGPLISTS))) + if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) return NULL; memset((void *)head, 0, sizeof(*head)); drm_agp->copy_info(&head->agp_info); if (head->agp_info.chipset == NOT_SUPPORTED) { - DRM(free)(head, sizeof(*head), DRM_MEM_AGPLISTS); + drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); return NULL; } head->memory = NULL; @@ -430,14 +430,14 @@ drm_agp_head_t *DRM(agp_init)(void) * * Releases the pointer in ::drm_agp. */ -void DRM(agp_uninit)(void) +void drm_agp_uninit(void) { DRM_AGP_PUT; drm_agp = NULL; } /** Calls drm_agp->allocate_memory() */ -DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type) +DRM_AGP_MEM *drm_agp_allocate_memory(size_t pages, u32 type) { if (!drm_agp->allocate_memory) return NULL; @@ -445,7 +445,7 @@ DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type) } /** Calls drm_agp->free_memory() */ -int DRM(agp_free_memory)(DRM_AGP_MEM *handle) +int drm_agp_free_memory(DRM_AGP_MEM *handle) { if (!handle || !drm_agp->free_memory) return 0; @@ -454,7 +454,7 @@ int DRM(agp_free_memory)(DRM_AGP_MEM *handle) } /** Calls drm_agp->bind_memory() */ -int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start) +int drm_agp_bind_memory(DRM_AGP_MEM *handle, off_t start) { if (!handle || !drm_agp->bind_memory) return -EINVAL; @@ -462,7 +462,7 @@ int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start) } /** Calls drm_agp->unbind_memory() */ -int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle) +int drm_agp_unbind_memory(DRM_AGP_MEM *handle) { if (!handle || !drm_agp->unbind_memory) return -EINVAL; |