summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_drv.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/drm_drv.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/drm_drv.c')
-rw-r--r--drivers/gpu/drm/drm_drv.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 1bf7efd8d33..b39d7bfc0c9 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -189,7 +189,7 @@ int drm_lastclose(struct drm_device * dev)
if (entry->bound)
drm_unbind_agp(entry->memory);
drm_free_agp(entry->memory, entry->pages);
- drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS);
+ kfree(entry);
}
INIT_LIST_HEAD(&dev->agp->memory);
@@ -208,21 +208,15 @@ int drm_lastclose(struct drm_device * dev)
/* Clear vma list (only built for debugging) */
list_for_each_entry_safe(vma, vma_temp, &dev->vmalist, head) {
list_del(&vma->head);
- drm_free(vma, sizeof(*vma), DRM_MEM_VMAS);
+ kfree(vma);
}
if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist) {
for (i = 0; i < dev->queue_count; i++) {
- if (dev->queuelist[i]) {
- drm_free(dev->queuelist[i],
- sizeof(*dev->queuelist[0]),
- DRM_MEM_QUEUES);
- dev->queuelist[i] = NULL;
- }
+ kfree(dev->queuelist[i]);
+ dev->queuelist[i] = NULL;
}
- drm_free(dev->queuelist,
- dev->queue_slots * sizeof(*dev->queuelist),
- DRM_MEM_QUEUES);
+ kfree(dev->queuelist);
dev->queuelist = NULL;
}
dev->queue_count = 0;
@@ -344,8 +338,6 @@ static int __init drm_core_init(void)
goto err_p3;
}
- drm_mem_init();
-
DRM_INFO("Initialized %s %d.%d.%d %s\n",
CORE_NAME, CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE);
return 0;