From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Arun Siluvery" <arun.siluvery@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/bdw: Apply workarounds using the golden render state
Date: Fri, 22 Aug 2014 14:06:18 +0300 [thread overview]
Message-ID: <87ppfspyvp.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20140820145254.GI4193@intel.com>
Ville Syrjälä <ville.syrjala@linux.intel.com> writes:
> On Wed, Aug 20, 2014 at 03:19:17PM +0100, Arun Siluvery wrote:
>> Workarounds for bdw are currently applied in init_clock_gating() but they
>> are lost following a gpu reset. Some of the WA registers are part of register
>> state context and they are restored with every context switch so initializing
>> them in golden render state ensures that they are applied even when we start
>> with an uninitialized context or during hw initlialization followed by a reset.
>>
>> v2: Add comments corresponding to WAs in golden render state (Chris).
>>
>> The generation of render state is not a straighforward process, it would
>> be ideal to augment WA values from during the setup state as opposed to
>> using a tool but that would be a follow up patch.
>
> I'd still prefer just emitting the LRIs from code rather tha mucking
> about with null batch. Less hoops to jump through when adding a new w/a.
I agree with this. We should aim to keep null state as per
gen. Workaround set is different for gtX inside particular
gen so we would need then multiple null states per gen.
After brief chat with Ville, I think that the correct
spot to init the context specific workarounds is after MI_SET_CONTEXT
to default and right before null batch is run. If we do these
with emitting LRIs to ring, we should be safe as they are then saved
with default ctx.
The default ctx is then used as a 'parent' for newly created
contexts. Ofcource if registers get globbered, then we inherit
crap.
If we have the per gen null state and the ring is initializing
workarounds for the default context, then in future we can
save this state as 'read only golden context'. And use it as the
initial state for all newly created contexts.
Then the full plan how to init would look like this:
#1 reset the gpu (on driver load, on resume or on hang recovery)
#2 if we have 'read only golden context', copy it to default ctx
#3 switch to default context
#4 if we had 'read only golden context' we are done with the init.
---
#5 if this is driver load thus there is no 'read only golden context' yet.
#6 init workarounds through ring LRIs
#7 run null/golden state batch
#8 save this state as a 'read only golden context'
---
#9 for each new context, initialize ctx obj with 'read only golden
context' (either by memcpy or restoring from it when switching to new)
-Mika
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-08-22 11:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 14:19 [PATCH 0/2] Add BDW workarounds using golden render state Arun Siluvery
2014-08-20 14:19 ` [PATCH 1/2] drm/i915/bdw: Apply workarounds using the " Arun Siluvery
2014-08-20 14:24 ` Chris Wilson
2014-08-20 14:52 ` Ville Syrjälä
2014-08-22 11:06 ` Mika Kuoppala [this message]
2014-08-22 12:10 ` Siluvery, Arun
2014-08-26 12:53 ` Daniel Vetter
2014-08-26 12:57 ` Siluvery, Arun
2014-08-26 13:37 ` Daniel Vetter
2014-08-20 14:19 ` [PATCH 2/2] drm/i915/bdw: Extract workaround registers data from " Arun Siluvery
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=87ppfspyvp.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=arun.siluvery@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox