All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Eugeni Dodonov <eugeni.dodonov@intel.com>,
	stable@kernel.org
Subject: Re: [PATCH] drm/i915: paper over missed irq issues with force wake vodoo
Date: Fri, 13 Jan 2012 16:50:39 -0800	[thread overview]
Message-ID: <86boq73y5c.fsf@sumi.keithp.com> (raw)
In-Reply-To: <20120114003140.GG3843@phenom.ffwll.local>


[-- Attachment #1.1: Type: text/plain, Size: 1427 bytes --]

On Sat, 14 Jan 2012 01:31:40 +0100, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Fri, Jan 13, 2012 at 04:11:43PM -0800, Keith Packard wrote:
> > On Sat, 14 Jan 2012 00:52:31 +0100, Daniel Vetter <daniel@ffwll.ch> wrote:
> > > acc101d drm/i915: Hold gt_lock across forcewake register reads
> > > 
> > > Imo this is a simple cleanup (reading forcewake-protected registers isn't
> > > really a fast-path for us), so material for -next.
> > 
> > The 'optimization' is just a side benefit. The fix is to prevent reads
> > From happening without forcewake being set.
> 
> I still fail to see how you can sneak a read in there without forcewake
> being asserted. And assuming I haven't understood you the last time around
> we've discussed this, you've agreed.

Yes, except during reset, where forcewake is cleared even if the lock
count is non-zero. Any reads happening while reset is going on will
return garbage. None of this is 'required' given the structure of the
code today, it just makes it all evident without having to go through
yet another long sequence of explanations.

I had patches to hold the spinlock across register writes too, as using
different locking for reading and writing seems like a bad plan, but I
didn't put those in because writes involve spinning to wait for the fifo
to drain, and that seemed like a bad thing to do while holding the
spinlock.

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2012-01-14  0:50 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 16:52 [PATCH] drm/i915: paper over missed irq issues with force wake vodoo Daniel Vetter
2012-01-04 18:15 ` Eugeni Dodonov
2012-01-04 18:40   ` Daniel Vetter
2012-01-05  2:27     ` Keith Packard
2012-01-05 11:13       ` Daniel Vetter
2012-01-05 11:23         ` Eugeni Dodonov
2012-01-05 22:11     ` [PATCH] drm/i915: rip out the HWSTAM missed irq workaround Daniel Vetter
2012-01-05 23:29       ` Ben Widawsky
2012-01-06 16:03       ` Eugeni Dodonov
2012-01-09 22:00       ` Keith Packard
2012-01-09 23:39         ` Daniel Vetter
2012-01-10  2:09           ` Keith Packard
2012-01-10  7:58             ` Daniel Vetter
2012-01-18  0:24       ` Ben Widawsky
2012-01-10 12:20     ` [PATCH] drm/i915: paper over missed irq issues with force wake vodoo Daniel Vetter
2012-01-11  0:51       ` Eric Anholt
2012-01-11  4:44         ` Keith Packard
2012-01-11  6:21           ` Ben Widawsky
2012-01-11  9:59           ` Daniel Vetter
2012-01-11  5:41       ` Kenneth Graunke
2012-01-13 16:42     ` Keith Packard
2012-01-13 23:52       ` Daniel Vetter
2012-01-13 23:55         ` Daniel Vetter
2012-01-14  0:11         ` Keith Packard
2012-01-14  0:31           ` Daniel Vetter
2012-01-14  0:50             ` Keith Packard [this message]
2012-01-14 12:12               ` Daniel Vetter
2012-01-15  6:35                 ` Keith Packard
2012-01-15 15:03                   ` Daniel Vetter
2012-01-16  0:06                     ` Keith Packard
2012-01-05 23:29 ` Ben Widawsky
2012-01-08 13:01   ` Daniel Vetter
2012-01-09  5:09   ` Keith Packard
2012-01-06 20:56 ` Keith Packard

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=86boq73y5c.fsf@sumi.keithp.com \
    --to=keithp@keithp.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=eugeni.dodonov@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@kernel.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 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.