aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/savage/savage_state.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-03-24 12:23:04 -0700
committerEric Anholt <eric@anholt.net>2009-06-18 13:00:33 -0700
commit9a298b2acd771d8a5c0004d8f8e4156c65b11f6b (patch)
treef8bf6cfe675492cb881abb50d9aa9aa8f38733d6 /drivers/gpu/drm/savage/savage_state.c
parent52dc7d32b88156248167864f77a9026abe27b432 (diff)
drm: Remove memory debugging infrastructure.
It hasn't been used in ages, and having the user tell your how much memory is being freed at free time is a recipe for disaster even if it was ever used. Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/savage/savage_state.c')
-rw-r--r--drivers/gpu/drm/savage/savage_state.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/savage/savage_state.c b/drivers/gpu/drm/savage/savage_state.c
index 5f6238fdf1f..8a3e31599c9 100644
--- a/drivers/gpu/drm/savage/savage_state.c
+++ b/drivers/gpu/drm/savage/savage_state.c
@@ -988,20 +988,20 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
* for locking on FreeBSD.
*/
if (cmdbuf->size) {
- kcmd_addr = drm_alloc(cmdbuf->size * 8, DRM_MEM_DRIVER);
+ kcmd_addr = kmalloc(cmdbuf->size * 8, GFP_KERNEL);
if (kcmd_addr == NULL)
return -ENOMEM;
if (DRM_COPY_FROM_USER(kcmd_addr, cmdbuf->cmd_addr,
cmdbuf->size * 8))
{
- drm_free(kcmd_addr, cmdbuf->size * 8, DRM_MEM_DRIVER);
+ kfree(kcmd_addr);
return -EFAULT;
}
cmdbuf->cmd_addr = kcmd_addr;
}
if (cmdbuf->vb_size) {
- kvb_addr = drm_alloc(cmdbuf->vb_size, DRM_MEM_DRIVER);
+ kvb_addr = kmalloc(cmdbuf->vb_size, GFP_KERNEL);
if (kvb_addr == NULL) {
ret = -ENOMEM;
goto done;
@@ -1015,8 +1015,8 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
cmdbuf->vb_addr = kvb_addr;
}
if (cmdbuf->nbox) {
- kbox_addr = drm_alloc(cmdbuf->nbox * sizeof(struct drm_clip_rect),
- DRM_MEM_DRIVER);
+ kbox_addr = kmalloc(cmdbuf->nbox * sizeof(struct drm_clip_rect),
+ GFP_KERNEL);
if (kbox_addr == NULL) {
ret = -ENOMEM;
goto done;
@@ -1154,10 +1154,9 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
done:
/* If we didn't need to allocate them, these'll be NULL */
- drm_free(kcmd_addr, cmdbuf->size * 8, DRM_MEM_DRIVER);
- drm_free(kvb_addr, cmdbuf->vb_size, DRM_MEM_DRIVER);
- drm_free(kbox_addr, cmdbuf->nbox * sizeof(struct drm_clip_rect),
- DRM_MEM_DRIVER);
+ kfree(kcmd_addr);
+ kfree(kvb_addr);
+ kfree(kbox_addr);
return ret;
}