public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Arun Siluvery <arun.siluvery@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 4/6] drm/i915/gen8: Add WaFlushCoherentL3CacheLinesAtContextSwitch workaround
Date: Fri, 26 Jun 2015 17:45:08 +0100	[thread overview]
Message-ID: <558D8194.9090302@intel.com> (raw)
In-Reply-To: <20150616203801.GD17842@nuc-i3427.alporthouse.com>

On 16/06/15 21:38, Chris Wilson wrote:
> On Tue, Jun 16, 2015 at 08:25:23PM +0100, Arun Siluvery wrote:
>> +	/* WaFlushCoherentL3CacheLinesAtContextSwitch:bdw */
>> +	if (IS_BROADWELL(ring->dev)) {
>> +		struct drm_i915_private *dev_priv = ring->dev->dev_private;
> 
> dev_priv = to_i915(ring->dev);
> 
>> +
>> +		cmd[index++] = MI_LOAD_REGISTER_IMM(1);
>> +		cmd[index++] = GEN8_L3SQCREG4;
>> +		cmd[index++] = I915_READ(GEN8_L3SQCREG4) |
>> +			GEN8_LQSC_FLUSH_COHERENT_LINES;
> 
> Read the reg once, it is clearer that way.
> 
>> +
>> +		cmd[index++] = GFX_OP_PIPE_CONTROL(6);
>> +		cmd[index++] = PIPE_CONTROL_CS_STALL |
>> +			PIPE_CONTROL_DC_FLUSH_ENABLE;
>> +		cmd[index++] = 0;
>> +		cmd[index++] = 0;
>> +		cmd[index++] = 0;
>> +		cmd[index++] = 0;
>> +
>> +		cmd[index++] = MI_LOAD_REGISTER_IMM(1);
>> +		cmd[index++] = GEN8_L3SQCREG4;
>> +		cmd[index++] = I915_READ(GEN8_L3SQCREG4) &
>> +			~GEN8_LQSC_FLUSH_COHERENT_LINES;
> -Chris

What Chris said. But also, is it even meaningful to read a h/w register
now (when?) and use its value as the basis for future LRI instructions?
How (and when) does this register get its initial value, and does it get
changed at any other time? If the value we put in the register is a
run-time constant, there's really no need to read it back even once.

.Dave.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-26 16:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 19:25 [PATCH v4 0/6] Add Per-context WA using WA batch buffers Arun Siluvery
2015-06-16 19:25 ` [PATCH v4 1/6] drm/i915/gen8: Add infrastructure to initialize " Arun Siluvery
2015-06-16 20:25   ` Chris Wilson
2015-06-17 18:48     ` Siluvery, Arun
2015-06-17 19:48       ` Siluvery, Arun
2015-06-17 20:21       ` Chris Wilson
2015-06-17 21:36         ` Siluvery, Arun
2015-06-16 20:33   ` Chris Wilson
2015-06-17  9:38     ` Siluvery, Arun
2015-06-16 19:25 ` [PATCH v4 2/6] drm/i915/gen8: Re-order init pipe_control in lrc mode Arun Siluvery
2015-06-16 19:25 ` [PATCH v4 3/6] drm/i915/gen8: Add WaDisableCtxRestoreArbitration workaround Arun Siluvery
2015-06-16 19:25 ` [PATCH v4 4/6] drm/i915/gen8: Add WaFlushCoherentL3CacheLinesAtContextSwitch workaround Arun Siluvery
2015-06-16 20:38   ` Chris Wilson
2015-06-26 16:45     ` Dave Gordon [this message]
2015-06-26 16:56       ` Chris Wilson
2015-06-16 19:25 ` [PATCH v4 5/6] drm/i915/gen8: Add WaClearSlmSpaceAtContextSwitch workaround Arun Siluvery
2015-06-16 20:35   ` Chris Wilson
2015-06-16 19:25 ` [PATCH v4 6/6] drm/i915/gen8: Add WaRsRestoreWithPerCtxtBb workaround Arun Siluvery
2015-06-16 20:43   ` Chris Wilson

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=558D8194.9090302@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=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