diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-02-14 14:06:07 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-05-14 18:39:54 +0200 |
commit | 8b1bc9b4f189a9c483f73907f409b66b10fb926c (patch) | |
tree | 847ecfc96d740b0fb624b9da225c6fe74f216e67 /drivers | |
parent | aff10b30a1d3edd1e31f536648772da85e33f655 (diff) | |
download | blackbird-op-linux-8b1bc9b4f189a9c483f73907f409b66b10fb926c.tar.gz blackbird-op-linux-8b1bc9b4f189a9c483f73907f409b66b10fb926c.zip |
drm/i915: Only do gtt cleanup in vma_unbind for the global vma
Otherwise we end up tearing down fences when e.g. the client quits
way too early. Might or might not fix a fence pin_count BUG Ville has
reported.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index ec774d95cf99..034ba2c6064a 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2761,12 +2761,14 @@ int i915_vma_unbind(struct i915_vma *vma) * cause memory corruption through use-after-free. */ - i915_gem_object_finish_gtt(obj); + if (i915_is_ggtt(vma->vm)) { + i915_gem_object_finish_gtt(obj); - /* release the fence reg _after_ flushing */ - ret = i915_gem_object_put_fence(obj); - if (ret) - return ret; + /* release the fence reg _after_ flushing */ + ret = i915_gem_object_put_fence(obj); + if (ret) + return ret; + } trace_i915_vma_unbind(vma); |