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 1/2] drm/i915: Stop engines around GPU reset preparations
Date: Fri, 02 Mar 2018 14:17:19 +0200	[thread overview]
Message-ID: <87sh9ipt80.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <151999201234.32001.16481998991531678736@mail.alporthouse.com>

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

> Quoting Mika Kuoppala (2018-03-02 11:50:32)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>> > +static void i915_engines_set_mode(struct drm_i915_private *dev_priv,
>> > +                               unsigned engine_mask,
>> > +                               u32 mode)
>> > +{
>> > +     struct intel_engine_cs *engine;
>> > +     enum intel_engine_id id;
>> > +
>> > +     if (INTEL_GEN(dev_priv) < 3)
>> > +             return;
>> > +
>> > +     for_each_engine_masked(engine, dev_priv, engine_mask, id)
>> > +             I915_WRITE_FW(RING_MI_MODE(engine->mmio_base), mode);
>> 
>> Is there reason to not use gen3_stop_engine in this level?
>
> It clears HEAD/TAIL, so undoing it in the case of no reset is a bit more
> tricky.

With this we now have 3 different flavours of stopping an engine.

I would like to see early on prepare reset to call engine->stop(),
which would be unified way of bring engine to halt. And limit
any further restoration of state if we can't really manage to reset it,
leaving it as stopped and dormant as we possibly could get it.

Then only on successful reset and restoration of init state, we would
have an engine->start().

But as this does stop the engine early on it is an improvement,
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-02 12:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02 11:33 [PATCH 1/2] drm/i915: Stop engines around GPU reset preparations Chris Wilson
2018-03-02 11:33 ` [PATCH 2/2] drm/i915: Suspend submission tasklets around wedging Chris Wilson
2018-03-02 12:55   ` Chris Wilson
2018-03-02 13:39   ` Mika Kuoppala
2018-03-02 11:50 ` [PATCH 1/2] drm/i915: Stop engines around GPU reset preparations Mika Kuoppala
2018-03-02 12:00   ` Chris Wilson
2018-03-02 12:17     ` Mika Kuoppala [this message]
2018-03-02 12:31       ` Chris Wilson
2018-03-02 12:06 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2018-03-02 13:31 ` ✗ Fi.CI.IGT: failure " Patchwork

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=87sh9ipt80.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