summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1dbd873)
raw | patch | inline | side by side (parent: 1dbd873)
author | Chris Wilson <chris@chris-wilson.co.uk> | |
Fri, 11 Jan 2013 00:55:12 +0000 (00:55 +0000) | ||
committer | Chris Wilson <chris@chris-wilson.co.uk> | |
Sun, 13 Jan 2013 10:29:44 +0000 (10:29 +0000) |
As we clear the relocs from the bo, we also need to clear the
contribution of the reloc_target_bo from the fence count. Otherwise they
are leaked and prevent any further relocations being added to the bo.
contribution of the reloc_target_bo from the fence count. Otherwise they
are leaked and prevent any further relocations being added to the bo.
intel/intel_bufmgr_gem.c | patch | blob | history |
index 512bc6fff34871d37c124ac362c0f7e08cacadd6..294e575ecd0fd16fabfd75ef44debf7a69dc35f4 100644 (file)
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
assert(bo_gem->reloc_count >= start);
/* Unreference the cleared target buffers */
for (i = start; i < bo_gem->reloc_count; i++) {
- if (bo_gem->reloc_target_info[i].bo != bo) {
- drm_intel_gem_bo_unreference_locked_timed(bo_gem->
- reloc_target_info[i].bo,
+ drm_intel_bo_gem *target_bo_gem = (drm_intel_bo_gem *) bo_gem->reloc_target_info[i].bo;
+ if (&target_bo_gem->bo != bo) {
+ bo_gem->reloc_tree_fences -= target_bo_gem->reloc_tree_fences;
+ drm_intel_gem_bo_unreference_locked_timed(&target_bo_gem->bo,
time.tv_sec);
}
}