]> Git Repo - linux.git/commitdiff
drm/i915: Remove assertion from raw __i915_vma_unpin()
authorChris Wilson <[email protected]>
Fri, 21 Jul 2017 14:50:34 +0000 (15:50 +0100)
committerDaniel Vetter <[email protected]>
Thu, 27 Jul 2017 07:38:59 +0000 (09:38 +0200)
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: 20dfbde463c8 ("drm/i915: Wrap vma->pin_count accessors with small inline helpers")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
drivers/gpu/drm/i915/i915_vma.h

index 4a673fc1a4320f957595dffe5ff8c7c53fa20adf..20cf272c97b1f8e16328a0304d25539797f07631 100644 (file)
@@ -284,12 +284,12 @@ static inline void __i915_vma_pin(struct i915_vma *vma)
 
 static inline void __i915_vma_unpin(struct i915_vma *vma)
 {
-       GEM_BUG_ON(!i915_vma_is_pinned(vma));
        vma->flags--;
 }
 
 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));
        __i915_vma_unpin(vma);
 }
This page took 0.05756 seconds and 4 git commands to generate.