From: "Siluvery, Arun" <arun.siluvery@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/bdw: Apply workarounds in render ring init function
Date: Tue, 26 Aug 2014 11:16:29 +0100 [thread overview]
Message-ID: <53FC5E7D.5090602@linux.intel.com> (raw)
In-Reply-To: <20140826100908.GC5458@nuc-i3427.alporthouse.com>
On 26/08/2014 11:09, Chris Wilson wrote:
> On Tue, Aug 26, 2014 at 10:33:16AM +0100, Arun Siluvery wrote:
>> For BDW workarounds are currently initialized in init_clock_gating() but
>> they are lost during reset, suspend/resume etc; this patch moves the WAs
>> that are part of register state context to render ring init fn otherwise
>> default context ends up with incorrect values as they don't get initialized
>> until init_clock_gating fn.
>>
>> v2: Add workarounds to golden render state
>> This method has its own issues, first of all this is different for
>> each gen and it is generated using a tool so adding new workaround
>> and mainitaining them across gens is not a straightforward process.
>>
>> v3: Use LRIs to emit these workarounds (Ville)
>> Instead of modifying the golden render state the same LRIs are
>> emitted from within the driver.
>>
>> For: VIZ-4092
>> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_gem_context.c | 6 +++
>> drivers/gpu/drm/i915/intel_pm.c | 48 --------------------
>> drivers/gpu/drm/i915/intel_ringbuffer.c | 78 +++++++++++++++++++++++++++++++++
>> drivers/gpu/drm/i915/intel_ringbuffer.h | 1 +
>> 4 files changed, 85 insertions(+), 48 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
>> index 9683e62..2debce4 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_context.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
>> @@ -631,20 +631,26 @@ static int do_switch(struct intel_engine_cs *ring,
>> }
>>
>> uninitialized = !to->legacy_hw_ctx.initialized && from == NULL;
>> to->legacy_hw_ctx.initialized = true;
>>
>> done:
>> i915_gem_context_reference(to);
>> ring->last_context = to;
>>
>> if (uninitialized) {
>> + if (IS_BROADWELL(ring->dev)) {
>> + ret = bdw_init_workarounds(ring);
>> + if (ret)
>> + DRM_ERROR("init workarounds: %d\n", ret);
>
> A good rule of thumb is that if you are exporting gen specific routines,
> the layering and abstraction is fishy.
> -Chris
>
ok, so something like i915_init_workarounds() is ok? with a check for
bdw/gen8 done inside that function.
regards
Arun
next prev parent reply other threads:[~2014-08-26 10:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 9:33 [PATCH 0/2] Apply BDW workarounds using LRIs in render init fn Arun Siluvery
2014-08-26 9:33 ` [PATCH 1/2] drm/i915/bdw: Apply workarounds in render ring init function Arun Siluvery
2014-08-26 10:09 ` Chris Wilson
2014-08-26 10:16 ` Siluvery, Arun [this message]
2014-08-26 10:34 ` Chris Wilson
2014-08-26 11:42 ` Siluvery, Arun
2014-08-26 9:33 ` [PATCH 2/2] drm/i915/bdw: Export workaround data to debugfs Arun Siluvery
-- strict thread matches above, loose matches on Subject: below --
2014-08-26 13:44 [PATCH 0/2] Apply BDW workarounds using LRIs in render init fn Arun Siluvery
2014-08-26 13:44 ` [PATCH 1/2] drm/i915/bdw: Apply workarounds in render ring init function Arun Siluvery
2014-08-26 14:37 ` Ville Syrjälä
2014-08-26 14:47 ` Siluvery, Arun
2014-08-26 15:32 ` Ville Syrjälä
2014-08-26 16:06 ` Chris Wilson
2014-08-22 19:39 [PATCH 0/2] Apply BDW workarounds using LRIs in render init fn Arun Siluvery
2014-08-22 19:39 ` [PATCH 1/2] drm/i915/bdw: Apply workarounds in render ring init function Arun Siluvery
2014-08-25 12:18 ` Ville Syrjälä
2014-08-26 9:27 ` Siluvery, Arun
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=53FC5E7D.5090602@linux.intel.com \
--to=arun.siluvery@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox