summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-10-02 11:11:31 -0700
committerEric Anholt <eric@anholt.net>2009-10-02 11:11:31 -0700
commit12d9b7cc8550c1999e5c39a38b1b14e654f49065 (patch)
tree86244817405e76db60bb76ef5dc240f27855b7e0 /libdrm
parent769b10578083aa7bbee0052246d8ea6000435ae8 (diff)
intel: Don't free the reloc list when putting a freed BO in the cache.
This takes firefox-talos-gfx from 74 seconds to 70 seconds on my GM965.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/intel/intel_bufmgr_gem.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
index d4fa1598..44d096ff 100644
--- a/libdrm/intel/intel_bufmgr_gem.c
+++ b/libdrm/intel/intel_bufmgr_gem.c
@@ -514,6 +514,9 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
if (bo_gem->gtt_virtual)
munmap (bo_gem->gtt_virtual, bo_gem->bo.size);
+ free(bo_gem->reloc_target_bo);
+ free(bo_gem->relocs);
+
/* Close this object */
memset(&close, 0, sizeof(close));
close.handle = bo_gem->gem_handle;
@@ -566,8 +569,6 @@ drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo)
/* Unreference all the target buffers */
for (i = 0; i < bo_gem->reloc_count; i++)
drm_intel_gem_bo_unreference_locked(bo_gem->reloc_target_bo[i]);
- free(bo_gem->reloc_target_bo);
- free(bo_gem->relocs);
}
DBG("bo_unreference final: %d (%s)\n",
@@ -586,8 +587,6 @@ drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo)
bo_gem->name = NULL;
bo_gem->validate_index = -1;
- bo_gem->relocs = NULL;
- bo_gem->reloc_target_bo = NULL;
bo_gem->reloc_count = 0;
DRMLISTADDTAIL(&bo_gem->head, &bucket->head);