public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Barbalho, Rafael" <rafael.barbalho@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 31/40] drm/i916: Init chv workarounds at render	ring init
Date: Wed, 30 Jul 2014 15:48:34 +0300	[thread overview]
Message-ID: <20140730124834.GE4193@intel.com> (raw)
In-Reply-To: <4B498744C37F034EA16F6FBC6AB9FAD21AE675C7@IRSMSX103.ger.corp.intel.com>

On Wed, Jul 30, 2014 at 12:35:49PM +0000, Barbalho, Rafael wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf
> > Of ville.syrjala@linux.intel.com
> > Sent: Saturday, June 28, 2014 12:04 AM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH 31/40] drm/i916: Init chv workarounds at render
> > ring init
> > 
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > My bsw is an unhappy camper if we delay the workaround init until
> > init_clock_gating(). Move a bunch of it to the render ring init.
> > 
> > FIXME: need to do this for all platforms since some of the registers
> >        also get clobbered at reset. Just need to figure out which
> >        registers those actually are. This patch is based on a
> >        slightly educated guess, but verifying on actual hw would
> >        be a good idea. Also should maybe move the init_clock_gating
> >        earlier too since we set up a bunch of clock gating stuff
> >        there that might be important for a properly working GT.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c         | 40 +++++++--------------------------
> >  drivers/gpu/drm/i915/intel_ringbuffer.c | 40
> > +++++++++++++++++++++++++++++++++
> >  2 files changed, 48 insertions(+), 32 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c
> > b/drivers/gpu/drm/i915/intel_pm.c
> > index 346dced..158c3f5 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -5720,6 +5720,10 @@ static void valleyview_init_clock_gating(struct
> > drm_device *dev)
> >  	 * in the reporting of vblank events.
> >  	 */
> >  	I915_WRITE(VLV_GUNIT_CLOCK_GATE, GCFG_DIS);
> > +
> > +	/* WaDisableDopClockGating:chv (pre-production hw) */
> > +	I915_WRITE(GEN6_UCGCTL1, I915_READ(GEN6_UCGCTL1) |
> > +		   GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE);
> >  }
> 
> Did you really mean to add a cherryview workaround to valleyview?

Nope. Not sure what happened with this patch.

Maybe it's best to wait and see what Arun comes up for BDW and once
that's sorted we deal with CHV (and all the other platforms).

> 
> > 
> >  static void cherryview_init_clock_gating(struct drm_device *dev)
> > @@ -5730,49 +5734,21 @@ static void cherryview_init_clock_gating(struct
> > drm_device *dev)
> > 
> >  	I915_WRITE(MI_ARB_VLV,
> > MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE);
> > 
> > -	/* WaDisablePartialInstShootdown:chv */
> > -	I915_WRITE(GEN8_ROW_CHICKEN,
> > -
> > _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));
> > -
> > -	/* WaDisableThreadStallDopClockGating:chv */
> > -	I915_WRITE(GEN8_ROW_CHICKEN,
> > -		   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));
> > -
> > -	/* WaVSRefCountFullforceMissDisable:chv */
> > -	/* WaDSRefCountFullforceMissDisable:chv */
> > -	I915_WRITE(GEN7_FF_THREAD_MODE,
> > -		   I915_READ(GEN7_FF_THREAD_MODE) &
> > -		   ~(GEN8_FF_DS_REF_CNT_FFME |
> > GEN7_FF_VS_REF_CNT_FFME));
> > -
> > -	/* WaDisableSemaphoreAndSyncFlipWait:chv */
> > -	I915_WRITE(GEN6_RC_SLEEP_PSMI_CONTROL,
> > -
> > _MASKED_BIT_ENABLE(GEN8_RC_SEMA_IDLE_MSG_DISABLE));
> > -
> >  	/* WaDisableCSUnitClockGating:chv */
> >  	I915_WRITE(GEN6_UCGCTL1, I915_READ(GEN6_UCGCTL1) |
> >  		   GEN6_CSUNIT_CLOCK_GATE_DISABLE);
> > 
> > +	/* WaDisableDopClockGating:chv (pre-production hw) */
> 
> Shouldn't this be WaDisableTCUnitClock gating?
> 
> > +	I915_WRITE(GEN6_UCGCTL1, I915_READ(GEN6_UCGCTL1) |
> > +		   GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE);
> > +
> >  	/* WaDisableSDEUnitClockGating:chv */
> >  	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
> >  		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
> > 
> > -	/* WaDisableSamplerPowerBypass:chv (pre-production hw) */
> > -	I915_WRITE(HALF_SLICE_CHICKEN3,
> > -
> > _MASKED_BIT_ENABLE(GEN8_SAMPLER_POWER_BYPASS_DIS));
> > -
> >  	/* WaDisableGunitClockGating:chv (pre-production hw) */
> >  	I915_WRITE(VLV_GUNIT_CLOCK_GATE,
> > I915_READ(VLV_GUNIT_CLOCK_GATE) |
> >  		   GINT_DIS);
> > -
> > -	/* WaDisableFfDopClockGating:chv (pre-production hw) */
> > -	I915_WRITE(GEN6_RC_SLEEP_PSMI_CONTROL,
> > -
> > _MASKED_BIT_ENABLE(GEN8_FF_DOP_CLOCK_GATE_DISABLE));
> > -
> > -	/* WaDisableDopClockGating:chv (pre-production hw) */
> > -	I915_WRITE(GEN7_ROW_CHICKEN2,
> > -		   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
> > -	I915_WRITE(GEN6_UCGCTL1, I915_READ(GEN6_UCGCTL1) |
> > -		   GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE);
> >  }
> > 
> >  static void g4x_init_clock_gating(struct drm_device *dev)
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > index ceb1295..9e81c28 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > @@ -615,6 +615,43 @@ err:
> >  	return ret;
> >  }
> > 
> 
> I think we can share the cherryview_init_workarounds functions with broadwell
> and just call it gen8_init_workarounds with a bit of code to just enable the
> cheryview functions. I'll mark down the workarounds that are shared and the ones
> that are not. It will also simplify the bdw clock gating init functions.
> 
> > +static void cherryview_init_workarounds(struct drm_device *dev)
> > +{
> > +	struct drm_i915_private *dev_priv = dev->dev_private;
> > +
> > +	/* WaDisablePartialInstShootdown:chv */
> 
> Applies to bdw.
> 
> > +	I915_WRITE(GEN8_ROW_CHICKEN,
> > +
> > _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));
> > +
> > +	/* WaDisableThreadStallDopClockGating:chv */
> 
> Applies to bdw.
> 
> > +	I915_WRITE(GEN8_ROW_CHICKEN,
> > +		   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));
> > +
> > +	/* WaVSRefCountFullforceMissDisable:chv */
> > +	/* WaDSRefCountFullforceMissDisable:chv */
> 
> Applies to bdw.
> 
> > +	I915_WRITE(GEN7_FF_THREAD_MODE,
> > +		   I915_READ(GEN7_FF_THREAD_MODE) &
> > +		   ~(GEN8_FF_DS_REF_CNT_FFME |
> > GEN7_FF_VS_REF_CNT_FFME));
> > +
> > +	/* WaDisableSemaphoreAndSyncFlipWait:chv */
> 
> Chv specific.
> 
> > +	I915_WRITE(GEN6_RC_SLEEP_PSMI_CONTROL,
> > +
> > _MASKED_BIT_ENABLE(GEN8_RC_SEMA_IDLE_MSG_DISABLE));
> > +
> > +	/* WaDisableSamplerPowerBypass:chv (pre-production hw) */
> 
> Chv specific.
> 
> > +	I915_WRITE(HALF_SLICE_CHICKEN3,
> > +
> > _MASKED_BIT_ENABLE(GEN8_SAMPLER_POWER_BYPASS_DIS));
> > +
> > +	/* WaDisableFfDopClockGating:chv (pre-production hw) */
> 
> Chv specific.
> 
> > +	I915_WRITE(GEN6_RC_SLEEP_PSMI_CONTROL,
> > +
> > _MASKED_BIT_ENABLE(GEN8_FF_DOP_CLOCK_GATE_DISABLE));
> > +
> > +	/* WaDisableDopClockGating:chv (pre-production hw) */
> 
> This first register write as applies to broadwell.
> 
> > +	I915_WRITE(GEN7_ROW_CHICKEN2,
> > +		   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
> 
> I think we need a split here and add WaDisableTCUnitClockGating. This also shows up in
> the init clock gating function. Do we need to have it in both places?  This second register
> write also only applies to chv.
> 
> > +	I915_WRITE(GEN6_UCGCTL1, I915_READ(GEN6_UCGCTL1) |
> > +		   GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE);
> > +}
> > +
> >  static int init_render_ring(struct intel_engine_cs *ring)
> >  {
> >  	struct drm_device *dev = ring->dev;
> > @@ -670,6 +707,9 @@ static int init_render_ring(struct intel_engine_cs
> > *ring)
> >  	if (HAS_L3_DPF(dev))
> >  		I915_WRITE_IMR(ring, ~GT_PARITY_ERROR(dev));
> > 
> > +	if (IS_CHERRYVIEW(dev))
> 
> If we modify the function init_workaround functions then we change from IS_CHERRYVIEW
> to IS_GEN8.
> 
> Thanks,
> Raf
> 
> > +		cherryview_init_workarounds(dev);
> > +
> >  	return ret;
> >  }
> > 
> > --
> > 1.8.5.5
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-07-30 12:48 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 23:03 [PATCH 00/40] CHV stuff mostly ville.syrjala
2014-06-27 23:03 ` [PATCH 01/40] drm/i915: Try to populate mem_freq for chv ville.syrjala
2014-07-12 13:27   ` Deepak S
2014-06-27 23:03 ` [PATCH 02/40] drm/i915: Use the cached min/min/rpe values in the vlv debugfs code ville.syrjala
2014-07-12 13:30   ` Deepak S
2014-07-11 14:04     ` Daniel Vetter
2014-06-27 23:03 ` [PATCH 03/40] drm/i915: Align chv rps min/max/rpe values ville.syrjala
2014-07-12 13:46   ` Deepak S
2014-07-28 15:17     ` Ville Syrjälä
2014-06-27 23:03 ` [PATCH 04/40] drm/i915: Populate mem_freq in init_gt_powerwave() ville.syrjala
2014-06-27 23:03 ` [PATCH 05/40] drm/i915: Don't disable PPGTT for CHV based in PCI rev ville.syrjala
2014-07-12 13:48   ` Deepak S
2014-07-11 13:59     ` Daniel Vetter
2014-06-27 23:03 ` [PATCH 06/40] drm/i915: Add cdclk change support for chv ville.syrjala
2014-07-29 16:51   ` Jesse Barnes
2014-07-29 17:59     ` Daniel Vetter
2014-07-29 18:07       ` Jesse Barnes
2014-07-29 18:39     ` Ville Syrjälä
2014-06-27 23:03 ` [PATCH 07/40] drm/i915: Disable cdclk changes for chv until Punit is ready ville.syrjala
2014-07-29 16:51   ` Jesse Barnes
2014-06-27 23:03 ` [PATCH 08/40] drm/i915: Leave DPLL ref clocks on ville.syrjala
2014-07-29 16:51   ` Jesse Barnes
2014-06-27 23:04 ` [PATCH 09/40] drm/i915: Split chv_update_pll() apart ville.syrjala
2014-07-29 16:53   ` Jesse Barnes
2014-06-27 23:04 ` [PATCH 10/40] drm/i915: Call encoder->post_disable() in intel_sanitize_encoder() ville.syrjala
2014-07-11 14:46   ` Barbalho, Rafael
2014-06-27 23:04 ` [PATCH 11/40] drm/i915: Call intel_{dp, hdmi}_prepare for chv ville.syrjala
2014-07-29 16:54   ` Jesse Barnes
2014-06-27 23:04 ` [PATCH 12/40] drm/i915: Clarify CHV swing margin/deemph bits ville.syrjala
2014-07-29 16:55   ` Jesse Barnes
2014-07-29 19:09     ` Daniel Vetter
2014-06-27 23:04 ` [PATCH 13/40] drm/i915: Make sure hardware uses the correct swing margin/deemph bits on chv ville.syrjala
2014-06-27 23:04 ` [PATCH 14/40] drm/i915: Override display PHY TX FIFO reset master " ville.syrjala
2014-07-29 16:57   ` Jesse Barnes
2014-08-01 13:10     ` Ville Syrjälä
2014-06-27 23:04 ` [PATCH 15/40] drm/i915: Clear TX FIFO reset master override bits " ville.syrjala
2014-08-01 13:23   ` [PATCH v2 " ville.syrjala
2014-06-27 23:04 ` [PATCH 16/40] drm/i915: Add chv_power_wells[] ville.syrjala
2014-07-11 14:09   ` Barbalho, Rafael
2014-07-30 11:18     ` Daniel Vetter
2014-06-27 23:04 ` [PATCH 17/40] drm/i915: Add chv cmnlane power wells ville.syrjala
2014-07-25 11:55   ` Imre Deak
2014-07-28 15:18     ` Ville Syrjälä
2014-06-27 23:04 ` [PATCH 18/40] drm/i915: Kill intel_reset_dpio() ville.syrjala
2014-07-25 11:56   ` Imre Deak
2014-06-27 23:04 ` [PATCH 19/40] drm/i915: Add disp2d power well for chv ville.syrjala
2014-07-25 13:23   ` Imre Deak
2014-06-27 23:04 ` [PATCH 20/40] drm/i915: Add per-pipe power wells " ville.syrjala
2014-07-25 13:24   ` Imre Deak
2014-06-27 23:04 ` [PATCH 21/40] drm/i915: Add chv port B and C TX wells ville.syrjala
2014-07-25 13:25   ` Imre Deak
2014-06-27 23:04 ` [PATCH 22/40] drm/i915: Add chv port D " ville.syrjala
2014-07-25 13:30   ` Imre Deak
2014-07-28  9:11     ` Daniel Vetter
2014-07-28 15:19     ` Ville Syrjälä
2014-07-29  9:54       ` Imre Deak
2014-07-29 10:27         ` Daniel Vetter
2014-06-27 23:04 ` [PATCH 23/40] drm/i915: Fix drain latency precision multipler for VLV ville.syrjala
2014-07-31 15:08   ` Paulo Zanoni
2014-07-31 15:16     ` Ville Syrjälä
2014-07-31 17:05       ` Paulo Zanoni
2014-07-31 17:13         ` Ville Syrjälä
2014-07-31 18:06           ` Paulo Zanoni
2014-06-27 23:04 ` [PATCH 24/40] drm/i915: Fix threshold for choosing 32 vs. 64 precisions for VLV DDL values ville.syrjala
2014-07-31 18:08   ` Paulo Zanoni
2014-08-01 12:33     ` Ville Syrjälä
2014-06-27 23:04 ` [PATCH 25/40] drm/i915: Fill out the FWx watermark register defines ville.syrjala
2014-07-31 20:16   ` Paulo Zanoni
2014-08-01 11:26     ` Ville Syrjälä
2014-08-01 12:28     ` [PATCH v2 " ville.syrjala
2014-06-27 23:04 ` [PATCH 26/40] drm/i915: Parametrize VLV_DDL registers ville.syrjala
2014-07-30 20:43   ` Paulo Zanoni
2014-07-31 12:05     ` Ville Syrjälä
2014-07-31 12:11     ` [PATCH v2 " ville.syrjala
2014-06-27 23:04 ` [PATCH 27/40] drm/i915: Split a few long debug prints ville.syrjala
2014-07-29 16:59   ` Jesse Barnes
2014-06-27 23:04 ` [PATCH 28/40] drm/i915: Add cherryview_update_wm() ville.syrjala
2014-07-31 20:57   ` Paulo Zanoni
2014-08-01 11:33     ` Ville Syrjälä
2014-08-01 12:36     ` [PATCH v2 " ville.syrjala
2014-08-01 14:29       ` Paulo Zanoni
2014-06-27 23:04 ` [PATCH 29/40] drm/i915: Refactor Broadwell PIPE_CONTROL emission into a helper ville.syrjala
2014-07-29 16:59   ` Jesse Barnes
2014-07-29 18:01     ` Daniel Vetter
2014-07-30 20:23       ` Daniel Vetter
2014-06-27 23:04 ` [PATCH 30/40] drm/i915: Add the WaCsStallBeforeStateCacheInvalidate:bdw workaround ville.syrjala
2014-07-11 13:30   ` Barbalho, Rafael
2014-06-27 23:04 ` [PATCH 31/40] drm/i916: Init chv workarounds at render ring init ville.syrjala
2014-07-30 12:35   ` Barbalho, Rafael
2014-07-30 12:48     ` Ville Syrjälä [this message]
2014-06-27 23:04 ` [PATCH 32/40] drm/i915: Hack to tie both common lanes together on chv ville.syrjala
2014-07-30 12:12   ` Barbalho, Rafael
2014-06-27 23:04 ` [PATCH 33/40] drm/i915: Polish the chv cmnlane resrt macros ville.syrjala
2014-07-30 12:13   ` Barbalho, Rafael
2014-06-27 23:04 ` [PATCH 34/40] drm/i915: Add DP training pattern 3 for CHV ville.syrjala
2014-07-29 17:01   ` Jesse Barnes
2014-07-29 18:04     ` Daniel Vetter
2014-07-29 18:34       ` Ville Syrjälä
2014-07-29 19:12         ` Daniel Vetter
2014-06-27 23:04 ` [PATCH 35/40] drm/i915: Fix vdd locking ville.syrjala
2014-06-27 23:04 ` [PATCH 36/40] drm/i915: Allow vdd_off when vdd is already off ville.syrjala
2014-06-27 23:04 ` [PATCH 37/40] drm/i915: Fix eDP link training when switching pipes ville.syrjala
2014-06-30 21:52   ` Jesse Barnes
2014-07-29 18:06     ` Daniel Vetter
2014-07-29 19:18       ` Ville Syrjälä
2014-07-29 19:23         ` Daniel Vetter
2014-06-27 23:04 ` [PATCH 38/40] drm/i915: Track which port is using which pipe's power sequencer ville.syrjala
2014-06-27 23:04 ` [PATCH 39/40] drm/i915: Kick the power sequencer before AUX transactions ville.syrjala
2014-06-27 23:04 ` [PATCH 40/40] drm/i915: Unstuck power sequencer when lighting up a DP port ville.syrjala

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=20140730124834.GE4193@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rafael.barbalho@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