[Intel-gfx] [PATCH 11/22] drm/i915: Wrap vma->pin_count accessors with small inline helpers

Chris Wilson chris at chris-wilson.co.uk
Fri Jul 29 07:23:04 UTC 2016


On Fri, Jul 29, 2016 at 09:59:31AM +0300, Joonas Lahtinen wrote:
> On ke, 2016-07-27 at 12:14 +0100, Chris Wilson wrote:
> > @@ -3810,10 +3810,11 @@ i915_gem_object_ggtt_unpin_view(struct drm_i915_gem_object *obj,
> >  {
> >  	struct i915_vma *vma = i915_gem_obj_to_ggtt_view(obj, view);
> >  
> > -	WARN_ON(vma->pin_count == 0);
> > +	GEM_BUG_ON(!vma);
> > +	WARN_ON(i915_vma_is_pinned(vma));
> 
> Shouldn't this be !i915_vma_is_pinned() ?

The joy of inventing steps afterwards. The WARN gets removed in a couple
of patches time which explains why it was never encountered.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list