Commit a6c00779 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Remove assertion from raw __i915_vma_unpin()

After we detect a i915_vma pin overflow, we call __i915_vma_unpin to
cleanup. However, on an overflow the pin_count bitfield will be zero,
triggering an assertion, even though we the intention is to merely warn
and report the error back to the user (as historically the culprit has
be a leak in the display code).

Fixes: 20dfbde4 ("drm/i915: Wrap vma->pin_count accessors with small inline helpers")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170721145037.25105-2-chris@chris-wilson.co.ukReviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 67fddd90)
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 5846a73f
...@@ -284,12 +284,12 @@ static inline void __i915_vma_pin(struct i915_vma *vma) ...@@ -284,12 +284,12 @@ static inline void __i915_vma_pin(struct i915_vma *vma)
static inline void __i915_vma_unpin(struct i915_vma *vma) static inline void __i915_vma_unpin(struct i915_vma *vma)
{ {
GEM_BUG_ON(!i915_vma_is_pinned(vma));
vma->flags--; vma->flags--;
} }
static inline void i915_vma_unpin(struct i915_vma *vma) static inline void i915_vma_unpin(struct i915_vma *vma)
{ {
GEM_BUG_ON(!i915_vma_is_pinned(vma));
GEM_BUG_ON(!drm_mm_node_allocated(&vma->node)); GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
__i915_vma_unpin(vma); __i915_vma_unpin(vma);
} }
......
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