All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 08/10] drm/i915: Move vlv_init_display_clock_gating() to the display power well
Date: Tue, 12 Apr 2016 14:51:57 +0300	[thread overview]
Message-ID: <20160412115157.GP4329@intel.com> (raw)
In-Reply-To: <1460456707.12168.55.camel@intel.com>

On Tue, Apr 12, 2016 at 01:25:07PM +0300, Imre Deak wrote:
> On ma, 2016-04-11 at 16:56 +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The registers frobbed by vlv_init_display_clock_gating() libve inside
> > the disp2d power well, so frobbing them while the power well is down
> > results in unclaimed register access warning (and of course the
> > values
> > won't stick). Let's do this setup after we know the power well is
> > enabled.
> > 
> > It's also worth noting that DSPCLK_GATE_D and CBR1_VLV lose their
> > state
> > when the power well goes down, but fortunately the values we've been
> > writing are actually the reset defaults.
> > 
> > MI_ARB_VLV actually retains its value even if the power well was
> > turned
> > off, we just can't access it while the power well is down.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94164
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The spec doesn't say anything about backing power wells, I assume you
> checked this manually by reading the regs out while the power well was 
> off.

Yep.

> Looks ok:
> Reviewed-by: Imre Deak <imre.deak@intel.com>
> 
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c         | 15 ---------------
> >  drivers/gpu/drm/i915/intel_runtime_pm.c | 13 +++++++++++++
> >  2 files changed, 13 insertions(+), 15 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c
> > b/drivers/gpu/drm/i915/intel_pm.c
> > index 43b24a1f5ee6..c80d044fe082 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -6882,23 +6882,10 @@ static void
> > ivybridge_init_clock_gating(struct drm_device *dev)
> >  	gen6_check_mch_setup(dev);
> >  }
> >  
> > -static void vlv_init_display_clock_gating(struct drm_i915_private
> > *dev_priv)
> > -{
> > -	I915_WRITE(DSPCLK_GATE_D, VRHUNIT_CLOCK_GATE_DISABLE);
> > -
> > -	/*
> > -	 * Disable trickle feed and enable pnd deadline calculation
> > -	 */
> > -	I915_WRITE(MI_ARB_VLV, MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE);
> > -	I915_WRITE(CBR1_VLV, 0);
> > -}
> > -
> >  static void valleyview_init_clock_gating(struct drm_device *dev)
> >  {
> >  	struct drm_i915_private *dev_priv = dev->dev_private;
> >  
> > -	vlv_init_display_clock_gating(dev_priv);
> > -
> >  	/* WaDisableEarlyCull:vlv */
> >  	I915_WRITE(_3D_CHICKEN3,
> >  		   _MASKED_BIT_ENABLE(_3D_CHICKEN_SF_DISABLE_OBJEND_
> > CULL));
> > @@ -6981,8 +6968,6 @@ static void cherryview_init_clock_gating(struct
> > drm_device *dev)
> >  {
> >  	struct drm_i915_private *dev_priv = dev->dev_private;
> >  
> > -	vlv_init_display_clock_gating(dev_priv);
> > -
> >  	/* WaVSRefCountFullforceMissDisable:chv */
> >  	/* WaDSRefCountFullforceMissDisable:chv */
> >  	I915_WRITE(GEN7_FF_THREAD_MODE,
> > diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > index 80e8bd4b43b5..8f9797f17991 100644
> > --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > @@ -900,6 +900,17 @@ static bool vlv_power_well_enabled(struct
> > drm_i915_private *dev_priv,
> >  	return enabled;
> >  }
> >  
> > +static void vlv_init_display_clock_gating(struct drm_i915_private
> > *dev_priv)
> > +{
> > +	I915_WRITE(DSPCLK_GATE_D, VRHUNIT_CLOCK_GATE_DISABLE);
> > +
> > +	/*
> > +	 * Disable trickle feed and enable pnd deadline calculation
> > +	 */
> > +	I915_WRITE(MI_ARB_VLV, MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE);
> > +	I915_WRITE(CBR1_VLV, 0);
> > +}
> > +
> >  static void vlv_display_power_well_init(struct drm_i915_private
> > *dev_priv)
> >  {
> >  	enum pipe pipe;
> > @@ -922,6 +933,8 @@ static void vlv_display_power_well_init(struct
> > drm_i915_private *dev_priv)
> >  		I915_WRITE(DPLL(pipe), val);
> >  	}
> >  
> > +	vlv_init_display_clock_gating(dev_priv);
> > +
> >  	spin_lock_irq(&dev_priv->irq_lock);
> >  	valleyview_enable_display_irqs(dev_priv);
> >  	spin_unlock_irq(&dev_priv->irq_lock);

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-12 11:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 13:56 [PATCH 00/10] drm/i915: Fix VLV/CHV unclaimed register errors ville.syrjala
2016-04-11 13:56 ` [PATCH 01/10] drm/i915: Remove "VLV magic" from irq setup ville.syrjala
2016-04-11 15:20   ` Imre Deak
2016-04-11 15:45     ` Ville Syrjälä
2016-04-11 13:56 ` [PATCH 02/10] drm/i915: Fix up vlv/chv display " ville.syrjala
2016-04-11 16:29   ` Imre Deak
2016-04-12  9:05     ` Ville Syrjälä
2016-04-12 10:12       ` Imre Deak
2016-04-12 15:56   ` [PATCH v2 " ville.syrjala
2016-04-11 13:56 ` [PATCH 03/10] drm/i915: Skip display irq setup if display irqs aren't flagged as enabled ville.syrjala
2016-04-11 16:31   ` Imre Deak
2016-04-11 13:56 ` [PATCH 04/10] drm/i915: Move vlv/chv display irq code to a more logical place ville.syrjala
2016-04-11 16:34   ` Imre Deak
2016-04-12 15:56   ` [PATCH v2 " ville.syrjala
2016-04-11 13:56 ` [PATCH 05/10] drm/i915: Clear display interrupt before enabling when turning on the power well ville.syrjala
2016-04-11 16:36   ` Imre Deak
2016-04-11 13:56 ` [PATCH 06/10] drm/i915: Use GEN5_IRQ_INIT() in vlv_display_irq_postinstall() ville.syrjala
2016-04-11 16:38   ` Imre Deak
2016-04-11 13:56 ` [PATCH 07/10] drm/i915: Warn if irq_mask isn't ~0 during vlv/cvh display irq postinstall ville.syrjala
2016-04-11 16:39   ` Imre Deak
2016-04-11 13:56 ` [PATCH 08/10] drm/i915: Move vlv_init_display_clock_gating() to the display power well ville.syrjala
2016-04-12 10:25   ` Imre Deak
2016-04-12 11:51     ` Ville Syrjälä [this message]
2016-04-11 13:56 ` [PATCH 09/10] drm/i915: Move DPINVGTT setup to vlv_display_irq_reset() ville.syrjala
2016-04-12 11:59   ` Imre Deak
2016-04-11 13:56 ` [PATCH 10/10] Revert "drm/i915: Limit the auto arming of mmio debugs on vlv/chv" ville.syrjala
2016-04-12 12:04   ` Imre Deak
2016-04-12 17:08     ` Ville Syrjälä
2016-04-12 19:56       ` Chris Wilson
2016-04-11 14:30 ` ✗ Fi.CI.BAT: failure for drm/i915: Fix VLV/CHV unclaimed register errors Patchwork
2016-04-12 16:13   ` Ville Syrjälä

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=20160412115157.GP4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=imre.deak@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.