All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Siluvery, Arun" <arun.siluvery@linux.intel.com>
Cc: 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:34:04 +0100	[thread overview]
Message-ID: <20140826103404.GE5458@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <53FC5E7D.5090602@linux.intel.com>

On Tue, Aug 26, 2014 at 11:16:29AM +0100, Siluvery, Arun wrote:
> 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.

Except for init_workarounds is quite useless as a function name and we
already have a structure that is already customised per-engine and
per-gen that you could hook into.
engine->ring_init_context() ?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2014-08-26 10:34 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
2014-08-26 10:34       ` Chris Wilson [this message]
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=20140826103404.GE5458@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=arun.siluvery@linux.intel.com \
    --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.