aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_drv.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 13:15:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 13:15:30 -0400
commit43813f399c72aa22e01a680559c1cb5274bf2140 (patch)
tree933c0e7c445b9c3478b5a0db06a162d0d39f00f2 /drivers/gpu/drm/drm_drv.c
parenta552f0af753eb4b5bbbe9eff205fe874b04c4583 (diff)
parent0b7af262aba912f52bc6ef76f1bc0960b01b8502 (diff)
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (24 commits) agp/intel: Make intel_i965_mask_memory use dma_addr_t for physical addresses agp: add user mapping support to ATI AGP bridge. drm/i915: enable GEM on PAE. drm/radeon: fix unused variables warning agp: switch AGP to use page array instead of unsigned long array agpgart: detected ALi M???? chipset with M1621 drm/radeon: command stream checker for r3xx-r5xx hardware drm/radeon: Fully initialize LVDS info also when we can't get it from the ROM. radeon: Fix CP byte order on big endian architectures with KMS. agp/uninorth: Handle user memory types. drm/ttm: Add some powerpc cache flush code. radeon: Enable modesetting on non-x86. drm/radeon: Respect AGP cant_use_aperture flag. drm: EDID endianness fixes. drm/radeon: this VRAM vs aperture test is wrong, just remove it. drm/ttm: fix an error path to exit function correctly drm: Apply "Memory fragmentation from lost alignment blocks" ttm: Return -ERESTART when a signal interrupts bo eviction. drm: Remove memory debugging infrastructure. drm/i915: Clear fence register on tiling stride change. ...
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;