From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Request for resets under forcewake
Date: Wed, 04 Nov 2015 12:13:47 +0200 [thread overview]
Message-ID: <87k2pyoyw4.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20151104094520.GG669@nuc-i3427.alporthouse.com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> On Wed, Nov 04, 2015 at 11:33:04AM +0200, Mika Kuoppala wrote:
>> We have a timed release of a forcewake when using
>> I915_READ/WRITE macros. wait_for() macro will go to quite
>> long sleep if the first read doesn't satisfy the condition for
>> successful exit. With these two interacting, it is possible that
>> we lose the forcewake during the wait_for() and the subsequent read
>> will reaquire forcewake.
>>
>> Further experiments with skl shows that when we lose forcewake,
>> we lose the reset request we submitted. So this register
>> is not power context saved.
>>
>> Grab forcewakes for all engines before starting to request for
>> resets so that all requests stay valid for the duration of reset
>> requisition across all the engines.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92774
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Tested-by: Tomi Sarvela <tomix.p.sarvela@intel.com>
>> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_uncore.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
>> index f0f97b2..5a6e7f1b 100644
>> --- a/drivers/gpu/drm/i915/intel_uncore.c
>> +++ b/drivers/gpu/drm/i915/intel_uncore.c
>> @@ -1483,6 +1483,8 @@ static int gen8_do_reset(struct drm_device *dev)
>> struct intel_engine_cs *engine;
>> int i;
>>
> /* If the power well sleeps during the reset, the reset
> * request may be dropped and never completes (causing -EIO).
> */
>> + intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
>
> I wonder if this would be more useful in intel_gpu_reset(), it won't
> hurt any other platforms and may prevent similar snafu in future?
I had similar thoughts but chickened out due to forcewake_reset ending
up inside the call chain on such setup.
Now with a refreshing my memory, the forcewake_reset should handle the 'restore'
case.
-Mika
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-11-04 10:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 9:33 [PATCH] drm/i915: Request for resets under forcewake Mika Kuoppala
2015-11-04 9:45 ` Chris Wilson
2015-11-04 10:13 ` Mika Kuoppala [this message]
2015-11-05 11:11 ` [PATCH] drm/i915: Do graphics device reset " Mika Kuoppala
2015-11-05 11:30 ` Chris Wilson
2015-11-05 13:33 ` Jani Nikula
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=87k2pyoyw4.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 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.