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

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Jul 29 06:59:31 UTC 2016


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() ?

Otherwise a fine mechanical change, with that fixed;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list