aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_drv.c
diff options
context:
space:
mode:
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 1bf7efd8d334..b39d7bfc0c9c 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)
189 if (entry->bound) 189 if (entry->bound)
190 drm_unbind_agp(entry->memory); 190 drm_unbind_agp(entry->memory);
191 drm_free_agp(entry->memory, entry->pages); 191 drm_free_agp(entry->memory, entry->pages);
192 drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); 192 kfree(entry);
193 } 193 }
194 INIT_LIST_HEAD(&dev->agp->memory); 194 INIT_LIST_HEAD(&dev->agp->memory);
195 195
@@ -208,21 +208,15 @@ int drm_lastclose(struct drm_device * dev)
208 /* Clear vma list (only built for debugging) */ 208 /* Clear vma list (only built for debugging) */
209 list_for_each_entry_safe(vma, vma_temp, &dev->vmalist, head) { 209 list_for_each_entry_safe(vma, vma_temp, &dev->vmalist, head) {
210 list_del(&vma->head); 210 list_del(&vma->head);
211 drm_free(vma, sizeof(*vma), DRM_MEM_VMAS); 211 kfree(vma);
212 } 212 }
213 213
214 if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist) { 214 if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist) {
215 for (i = 0; i < dev->queue_count; i++) { 215 for (i = 0; i < dev->queue_count; i++) {
216 if (dev->queuelist[i]) { 216 kfree(dev->queuelist[i]);
217 drm_free(dev->queuelist[i], 217 dev->queuelist[i] = NULL;
218 sizeof(*dev->queuelist[0]),
219 DRM_MEM_QUEUES);
220 dev->queuelist[i] = NULL;
221 }
222 } 218 }
223 drm_free(dev->queuelist, 219 kfree(dev->queuelist);
224 dev->queue_slots * sizeof(*dev->queuelist),
225 DRM_MEM_QUEUES);
226 dev->queuelist = NULL; 220 dev->queuelist = NULL;
227 } 221 }
228 dev->queue_count = 0; 222 dev->queue_count = 0;
@@ -344,8 +338,6 @@ static int __init drm_core_init(void)
344 goto err_p3; 338 goto err_p3;
345 } 339 }
346 340
347 drm_mem_init();
348
349 DRM_INFO("Initialized %s %d.%d.%d %s\n", 341 DRM_INFO("Initialized %s %d.%d.%d %s\n",
350 CORE_NAME, CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE); 342 CORE_NAME, CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE);
351 return 0; 343 return 0;