[Intel-gfx] [PATCH 4/6] drm/i915: Treat an error from i915_vma_instance() as unlikely

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Jan 20 12:34:46 UTC 2017

On to, 2017-01-19 at 19:26 +0000, Chris Wilson wrote:
> When pinning into the global GTT, an error from creating the VMA is
> unlikely, so mark it so.
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

>  	vma = i915_vma_instance(obj, vm, view);
> -	if (IS_ERR(vma))
> +	if (unlikely(IS_ERR(vma)))
>  		return vma;

I bet we have many spots similar to this, any ideas how we could get
some good code coverage testing data from the selftests? I think we
only now optimize when it appears during debugging some specific

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