From: Kenneth Graunke <kenneth@whitecape.org>
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: Tue, 10 Jan 2012 21:41:53 -0800 [thread overview]
Message-ID: <4F0D2121.6050302@whitecape.org> (raw)
In-Reply-To: <20120110122006.GD3979@phenom.ffwll.local>
On 01/10/2012 04:20 AM, Daniel Vetter wrote:
> On Wed, Jan 04, 2012 at 07:40:45PM +0100, Daniel Vetter wrote:
>> Two things seem to do the trick on my ivb machine here:
>> - prevent the gt from powering down while waiting for seqno
>> notification interrupts by grabbing the force_wake in get_irq (and
>> dropping it in put_irq again).
>> - ordering writes from the ring's CS by reading a CS register, ACTHD
>> seems to work.
>>
>> Only the blt&bsd ring on ivb seem to be massively affected by this,
>> but for paranoia do this dance also on the render ring and on snb
>> (i.e. all gpus with forcewake).
>>
>> Tested with Eric's glCopyPixels loop which without this patch scores a
>> missed irq every few seconds.
>>
>> This patch needs my forcewake rework to use a spinlock instead of
>> dev->struct_mutex.
>>
>> v2: Improve the comment per Eugeni Dodonov's suggestion.
>>
>> Cc: stable@kernel.org
>> Cc: Eric Anholt<eric@anholt.net>
>> Cc: Kenneth Graunke<kenneth@whitecape.org>
>> Cc: Eugeni Dodonov<eugeni.dodonov@intel.com>
>> Tested-by: Eugeni Dodonov<eugeni.dodonov@intel.com>
>> Reviewed-by: Eugeni Dodonov<eugeni.dodonov@intel.com>
>> Signed-Off-by: Daniel Vetter<daniel.vetter@ffwll.ch>
>
> From the internal doc "SNB GT PM Programming Guide", Section 4.3.1:
>
> "GT does not generate interrupts while in RC6 (by design)"
>
> It talks about the PM interrupt but I think this might also apply to
> interrupts in general. So I think we should apply the voodoo patch also to
> snb.
>
> My current working theory is hw engineers changed the way hwstam writes
> are generated wrt to the read/write/irq pipeline on ivb and we've only
> been lucky that it syncs out everything on snb before the gpu goes into
> deep sleep states.
> -Daniel
Daniel,
This is a good find! Your patch looked good to me in the first place,
but with this extra bit of information, I believe it all the more. It's
simple and it makes a lot of sense.
FWIW,
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
I'm in favor of applying this for Gen7, and I'd be fine with applying it
on Gen6 too. At the very least we should experiment with it on
Gen6---as Keith said, it might help with some of the mysterious issues
we've seen. Worth a try at least.
Thanks for your great work here!
--Kenneth
next prev parent reply other threads:[~2012-01-11 5:41 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 [this message]
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
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=4F0D2121.6050302@whitecape.org \
--to=kenneth@whitecape.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox