Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/selftests: Flush GPU activity before completing live_contexts
Date: Tue, 08 May 2018 14:38:40 +0300	[thread overview]
Message-ID: <87zi1awf5r.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20180505091014.26126-2-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> igt_ctx_exec() expects that we retire all active requests/objects before
> completing, so that when we clean up the files afterwards they are ready
> to be freed. Before we do so, it is then prudent to ensure that we have
> indeed retired the GPU activity, raising an error if it fails. If we do
> not, we run the risk of triggering an assertion when freeing the object:
>
>   __i915_gem_free_objects:4793 GEM_BUG_ON(i915_gem_object_is_active(obj))
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/selftests/i915_gem_context.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 7ecaed50d0b9..ddb03f009232 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -23,6 +23,7 @@
>   */
>  
>  #include "../i915_selftest.h"
> +#include "igt_flush_test.h"
>  
>  #include "mock_drm.h"
>  #include "huge_gem_object.h"
> @@ -411,6 +412,8 @@ static int igt_ctx_exec(void *arg)
>  	}
>  
>  out_unlock:
> +	if (igt_flush_test(i915, I915_WAIT_LOCKED))
> +		err = -EIO;
>  	mutex_unlock(&i915->drm.struct_mutex);
>  
>  	mock_file_free(i915, file);
> -- 
> 2.17.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-05-08 11:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05  9:10 [PATCH 1/2] drm/i915/selftests: Refactor common flush_test() Chris Wilson
2018-05-05  9:10 ` [PATCH 2/2] drm/i915/selftests: Flush GPU activity before completing live_contexts Chris Wilson
2018-05-08 10:46   ` Chris Wilson
2018-05-08 11:38   ` Mika Kuoppala [this message]
2018-05-08 11:45     ` Chris Wilson
2018-05-05  9:28 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915/selftests: Refactor common flush_test() Patchwork
2018-05-05  9:43 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-05 10:31 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-08 11:39 ` [PATCH 1/2] " Mika Kuoppala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zi1awf5r.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox