public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib: Restore i915.reset before testing it in igt_allow_hang()
Date: Mon, 28 Oct 2019 12:45:42 +0200	[thread overview]
Message-ID: <20191028104542.GK1208@intel.com> (raw)
In-Reply-To: <20191024153416.13665-1-chris@chris-wilson.co.uk>

On Thu, Oct 24, 2019 at 04:34:16PM +0100, Chris Wilson wrote:
> igt_allow_hang() checks that the GPU can be reset before allowing the
> test to cause a GPU hang (which would need the reset to recover).
> However, our checking for allowing a hang depends on i915.reset which we
> later restore. Do that restoration before the check so that this test is
> not affected by earlier fails.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Looks sensible.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  lib/igt_gt.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_gt.c b/lib/igt_gt.c
> index 5ca77471c..256c7cbc0 100644
> --- a/lib/igt_gt.c
> +++ b/lib/igt_gt.c
> @@ -175,8 +175,6 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
>  	if (!igt_check_boolean_env_var("IGT_HANG", true))
>  		igt_skip("hang injection disabled by user");
>  	gem_context_require_bannable(fd);
> -	if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false))
> -		igt_require(has_gpu_reset(fd));
>  
>  	allow_reset = 1;
>  	if ((flags & HANG_ALLOW_CAPTURE) == 0) {
> @@ -191,6 +189,9 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
>  	}
>  	igt_require(igt_sysfs_set_parameter(fd, "reset", "%d", allow_reset));
>  
> +	if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false))
> +		igt_require(has_gpu_reset(fd));
> +
>  	ban = context_get_ban(fd, ctx);
>  	if ((flags & HANG_ALLOW_BAN) == 0)
>  		context_set_ban(fd, ctx, 0);
> -- 
> 2.24.0.rc0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2019-10-28 10:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 15:34 [igt-dev] [PATCH i-g-t] lib: Restore i915.reset before testing it in igt_allow_hang() Chris Wilson
2019-10-24 16:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-10-26  0:03 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-10-28 10:45 ` Ville Syrjälä [this message]

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=20191028104542.GK1208@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --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