From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Mika Kuoppala <mika.kuoppala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Consolidate forcewake resetting to a single function
Date: Thu, 13 Mar 2014 18:21:45 +0100 [thread overview]
Message-ID: <20140313172145.GS30571@phenom.ffwll.local> (raw)
In-Reply-To: <20140313131037.GC8998@nuc-i3427.alporthouse.com>
On Thu, Mar 13, 2014 at 01:10:37PM +0000, Chris Wilson wrote:
> On Thu, Mar 13, 2014 at 03:00:58PM +0200, Mika Kuoppala wrote:
> > Chris Wilson <chris@chris-wilson.co.uk> writes:
> > > @@ -957,13 +986,6 @@ static int gen6_do_reset(struct drm_device *dev)
> > > {
> > > struct drm_i915_private *dev_priv = dev->dev_private;
> > > int ret;
> > > - unsigned long irqflags;
> > > - u32 fw_engine = 0;
> > > -
> > > - /* Hold uncore.lock across reset to prevent any register access
> > > - * with forcewake not set correctly
> > > - */
> > > - spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
> > >
> > > /* Reset the chip */
> > >
> > > @@ -976,29 +998,8 @@ static int gen6_do_reset(struct drm_device *dev)
> > > /* Spin waiting for the device to ack the reset request */
> > > ret = wait_for((__raw_i915_read32(dev_priv, GEN6_GDRST) & GEN6_GRDOM_FULL) == 0, 500);
> >
> > We used to go through the reset with uncore lock held,
> > which is not the case anymore. Will it create problems?
>
> I don't think so. gen6_do_reset() is itself serialised and there should
> be no other access to GDRST anyway, so from that perspective we won't
> trigger hw errors. So the only thing that the uncore lock was protecting
> in this function is the forcewake dance.
Yes, protecting the forcewake dance was the only reason to hold the uncore
lock over gen6 reset. As long as we hold the uncore lock while restoring
any forcewake references after reset we're good, no need to shove the
entire reset under that spinlock.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-03-13 17:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 11:05 [PATCH] drm/i915: Reset forcewake before suspend Chris Wilson
2014-03-13 11:26 ` Daniel Vetter
2014-03-13 11:29 ` Ville Syrjälä
2014-03-13 11:57 ` Chris Wilson
2014-03-13 12:00 ` [PATCH] drm/i915: Consolidate forcewake resetting to a single function Chris Wilson
2014-03-13 13:00 ` Mika Kuoppala
2014-03-13 13:10 ` Chris Wilson
2014-03-13 17:21 ` Daniel Vetter [this message]
2014-03-13 13:24 ` Mika Kuoppala
2014-03-13 17:22 ` Daniel Vetter
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=20140313172145.GS30571@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=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.