[Intel-gfx] [PATCH 2/2] drm/i915: Force an aliasing_ppgtt test for context execution
Chris Wilson
chris at chris-wilson.co.uk
Thu Feb 9 11:29:58 UTC 2017
On Thu, Feb 09, 2017 at 10:02:49AM +0000, Chris Wilson wrote:
> Ensure that we minimally exercise the aliasing_ppgtt, even on a
> full-ppgtt, by allocating one and similarly creating a context to use
> it.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/selftests/i915_gem_context.c | 27 ++++++++++++++++++++---
> 1 file changed, 24 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 00257949e195..6d3eca8c0c09 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -325,6 +325,7 @@ static int igt_ctx_exec(void *arg)
> IGT_TIMEOUT(end_time);
> LIST_HEAD(objects);
> unsigned int count, dw;
> + bool first = true;
> int err;
>
> /* Create a few different contexts (with different mm) and write
> @@ -344,9 +345,16 @@ static int igt_ctx_exec(void *arg)
> while (!time_after(jiffies, end_time)) {
> struct intel_engine_cs *engine;
> struct i915_gem_context *ctx;
> + struct drm_i915_file_private *fpriv;
> unsigned int id;
>
> - ctx = i915_gem_create_context(i915, file->driver_priv);
> + fpriv = file->driver_priv;
> + if (first) {
> + fpriv = NULL;
> + first = false;
> + }
> +
> + ctx = i915_gem_create_context(i915, fpriv);
Hmm, I need a couple more tricks here :|
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list