All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Cancel reset preparations on failed resets
Date: Wed, 30 May 2018 16:59:32 +0100	[thread overview]
Message-ID: <152769597275.8336.6723754948189613785@mail.alporthouse.com> (raw)
In-Reply-To: <20180530150206.7798-1-mika.kuoppala@linux.intel.com>

Quoting Mika Kuoppala (2018-05-30 16:02:05)
> Our reset handling has a retry layer further up in the
> chain. As we have told the engine to prepare for reset,
> and failed it, make sure to remove that preparation so
> that the next attempted reset has a clean slate by triggering
> another full prepare cycle for the engines. Note that with
> successful reset, there is nothing to cleanup.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_uncore.c | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index b36a3b5736a0..68fe4c16acfb 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -2092,22 +2092,26 @@ static int gen8_reset_engines(struct drm_i915_private *dev_priv,
>                               unsigned engine_mask)
>  {
>         struct intel_engine_cs *engine;
> -       unsigned int tmp;
> +       unsigned int tmp, ret;

int ret; Might as well keep the types clean.

> -       for_each_engine_masked(engine, dev_priv, engine_mask, tmp)
> -               if (gen8_reset_engine_start(engine))
> +       for_each_engine_masked(engine, dev_priv, engine_mask, tmp) {
> +               if (gen8_reset_engine_start(engine)) {
> +                       ret = -EIO;
>                         goto not_ready;
> +               }
> +       }
>  
>         if (INTEL_GEN(dev_priv) >= 11)
> -               return gen11_reset_engines(dev_priv, engine_mask);
> +               ret = gen11_reset_engines(dev_priv, engine_mask);
>         else
> -               return gen6_reset_engines(dev_priv, engine_mask);
> +               ret = gen6_reset_engines(dev_priv, engine_mask);
>  
>  not_ready:
> -       for_each_engine_masked(engine, dev_priv, engine_mask, tmp)
> -               gen8_reset_engine_cancel(engine);
> +       if (ret)

Or we just always clear the bit here. On the success path, it will be
just a nop. On the not_ready path we're already clearing untouched
engines, so might as well go whole hog and overkill everything?

Might as well throw in a
References: https://bugs.freedesktop.org/show_bug.cgi?id=106684
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-05-30 15:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30 15:02 [PATCH 1/2] drm/i915: Cancel reset preparations on failed resets Mika Kuoppala
2018-05-30 15:02 ` [PATCH 2/2] drm/i915: Add WaKBLVECSSemaphoreWaitPoll Mika Kuoppala
2018-05-30 20:19   ` Chris Wilson
2018-06-05 14:54     ` Mika Kuoppala
2018-06-05 16:01     ` Mika Kuoppala
2018-05-30 15:59 ` Chris Wilson [this message]
2018-05-30 17:29 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Cancel reset preparations on failed resets Patchwork
2018-05-30 17:48 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-30 18:37 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-05 16:03 [PATCH 1/2] " Mika Kuoppala
2018-06-05 16:12 ` Chris Wilson

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=152769597275.8336.6723754948189613785@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.