[Intel-gfx] [PATCH 2/3] drm/i915/selftests: Be engine agnostic

Matthew Auld matthew.william.auld at gmail.com
Thu Jul 4 21:11:25 UTC 2019


On Thu, 4 Jul 2019 at 21:05, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> When using MI operations, we do not care which engine we use, so use
> them all where possible, and where inconvenient double check we have the
> engine we selected at random.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<snip>

>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> index a23c6df9b9f4..ecb59f14ec01 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> @@ -1027,7 +1027,7 @@ __igt_ctx_sseu(struct drm_i915_private *i915,
>         struct drm_file *file;
>         int ret;
>
> -       if (INTEL_GEN(i915) < 9)
> +       if (INTEL_GEN(i915) < 9 || !engine)
>                 return 0;

We already dereferenced engine above.

Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the Intel-gfx mailing list