Commit 0de2cc0e authored by Tvrtko Ursulin's avatar Tvrtko Ursulin

drm/i915: Fix assert in i915_ggtt_pin

Use lockdep_assert_not_held to simplify and correct the code. Otherwise
false positive are hit if lock state is uknown like after a previous
taint.
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reported-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220429140757.651406-1-tvrtko.ursulin@linux.intel.com
parent 10dcf783
...@@ -1562,9 +1562,7 @@ int i915_ggtt_pin(struct i915_vma *vma, struct i915_gem_ww_ctx *ww, ...@@ -1562,9 +1562,7 @@ int i915_ggtt_pin(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
if (ww) if (ww)
return __i915_ggtt_pin(vma, ww, align, flags); return __i915_ggtt_pin(vma, ww, align, flags);
#ifdef CONFIG_LOCKDEP lockdep_assert_not_held(&vma->obj->base.resv->lock.base);
WARN_ON(dma_resv_held(vma->obj->base.resv));
#endif
for_i915_gem_ww(&_ww, err, true) { for_i915_gem_ww(&_ww, err, true) {
err = i915_gem_object_lock(vma->obj, &_ww); err = i915_gem_object_lock(vma->obj, &_ww);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment