Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Display WA #1185 WaDisableDARBFClkGating:cnl, glk
Date: Fri, 10 Nov 2017 22:44:01 +0200	[thread overview]
Message-ID: <20171110204401.GJ10981@intel.com> (raw)
In-Reply-To: <20171110202424.tahfygkow6i4dxlh@intel.com>

On Fri, Nov 10, 2017 at 12:24:24PM -0800, Rodrigo Vivi wrote:
> On Fri, Nov 10, 2017 at 08:13:44PM +0000, Ville Syrjälä wrote:
> > On Thu, Nov 09, 2017 at 02:26:32PM -0800, Rodrigo Vivi wrote:
> > > Display is not sending a PMRsp when a PMReq is received
> > > at the same time that all planes are turned off.
> > > State machine in the dcprunit is stuck in the WAIT4DONE
> > > state which means that there is no fill_done.
> > > 
> > > WA: disable arbiter clock gating, set bit [27] of 0x46530
> > > 
> > > v2: As Ville pointed out, based on the description the issue
> > >     can happen when disabling the planes, similar to
> > >     WaRsPkgCStateDisplayPMReq:hsw
> > >     Also description of the issue was updated on commit
> > >     message to make it more clear that we need this
> > >     earlier.
> > 
> > I guess we don't know exactly if this has the same ordering requirements
> > as WaRsPkgCStateDisplayPMReq:hsw. But playing it safe can't hurt I
> > suppose.
> > 
> > > 
> > > Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > > Cc: Imre Deak <imre.deak@intel.com>
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/i915_reg.h      |  1 +
> > >  drivers/gpu/drm/i915/intel_display.c | 24 +++++++++++++++---------
> > >  2 files changed, 16 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > > index 6ef33422f762..fc8c5f8260f6 100644
> > > --- a/drivers/gpu/drm/i915/i915_reg.h
> > > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > > @@ -3819,6 +3819,7 @@ enum {
> > >   * GEN9 clock gating regs
> > >   */
> > >  #define GEN9_CLKGATE_DIS_0		_MMIO(0x46530)
> > > +#define   DARBF_GATING_DIS		(1 << 27)
> > >  #define   PWM2_GATING_DIS		(1 << 14)
> > >  #define   PWM1_GATING_DIS		(1 << 13)
> > >  
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > index 84817ccc5305..a038610b66cc 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -15080,6 +15080,20 @@ get_encoder_power_domains(struct drm_i915_private *dev_priv)
> > >  	}
> > >  }
> > >  
> > > +/* System hang if this isn't done before disabling all planes! */
> > > +static void intel_early_display_was(struct drm_i915_private *dev_priv)
> > > +{
> > > +	/* Display WA #1185 WaDisableDARBFClkGating:cnl,glk */
> > > +	if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
> > 
> > Bspec says GLK isn't affected.
> 
> Bspec refers to GLK as Gen10 display...
> so GEN10:All is also GLK...
> but if you look 2 columns ahead you see this:
> GEN:BUG:1947072 [CNL, GLK]

Ah. And the hsd does indeed list glk as well.

> 
> > 
> > > +		I915_WRITE(GEN9_CLKGATE_DIS_0, I915_READ(GEN9_CLKGATE_DIS_0) |
> > > +			   DARBF_GATING_DIS);
> > > +
> > > +	/* WaRsPkgCStateDisplayPMReq:hsw */
> > 
> > Please keep the comment about the hsw system hangs here. The next guy to
> > touch this code is probably not going to be aware of it, or may simply
> > have forgotten it already.
> 
> makes sense...
> should I keep the one in the function comment as well? and duplicate
> the comment on the new one or since we are not that sure we just leave
> the comment close to the hsw one?

I'd just keep it on the hsw one since we know that's how it works
on hsw. Having it on the cnl/glk one would be more speculation at
this point.

> 
> > 
> > With that those addresses this is
> > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> thanks
> 
> > 
> > > +	if (IS_HASWELL(dev_priv))
> > > +		I915_WRITE(CHICKEN_PAR1_1,
> > > +			   I915_READ(CHICKEN_PAR1_1) | FORCE_ARB_IDLE_PLANES);
> > > +}
> > > +
> > >  /* Scan out the current hw modeset state,
> > >   * and sanitizes it to the current state
> > >   */
> > > @@ -15093,15 +15107,7 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
> > >  	struct intel_encoder *encoder;
> > >  	int i;
> > >  
> > > -	if (IS_HASWELL(dev_priv)) {
> > > -		/*
> > > -		 * WaRsPkgCStateDisplayPMReq:hsw
> > > -		 * System hang if this isn't done before disabling all planes!
> > > -		 */
> > > -		I915_WRITE(CHICKEN_PAR1_1,
> > > -			   I915_READ(CHICKEN_PAR1_1) | FORCE_ARB_IDLE_PLANES);
> > > -	}
> > > -
> > > +	intel_early_display_was(dev_priv);
> > >  	intel_modeset_readout_hw_state(dev);
> > >  
> > >  	/* HW state is read out, now we need to sanitize this mess. */
> > > -- 
> > > 2.13.6
> > 
> > -- 
> > Ville Syrjälä
> > Intel OTC

-- 
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:[~2017-11-10 20:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 23:30 [PATCH] drm/i915: Display WA #1185 WaDisableDARBFClkGating:cnl, glk Rodrigo Vivi
2017-11-08 23:48 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-09  0:31 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-11-09  0:55 ` ✓ Fi.CI.BAT: success " Patchwork
2017-11-09  1:31 ` ✗ Fi.CI.BAT: warning " Patchwork
2017-11-09 13:20 ` [PATCH] " Imre Deak
2017-11-09 13:45 ` Ville Syrjälä
2017-11-09 17:58   ` Rodrigo Vivi
2017-11-09 18:05     ` Chris Wilson
2017-11-09 22:26   ` Rodrigo Vivi
2017-11-10 20:13     ` Ville Syrjälä
2017-11-10 20:24       ` Rodrigo Vivi
2017-11-10 20:44         ` Ville Syrjälä [this message]
2017-11-10 20:58           ` Rodrigo Vivi
2017-11-10 21:11             ` Ville Syrjälä
2017-11-10 21:17               ` Rodrigo Vivi
2017-11-11  0:03               ` Rodrigo Vivi
2017-11-09 22:43 ` ✓ Fi.CI.BAT: success for drm/i915: Display WA #1185 WaDisableDARBFClkGating:cnl, glk (rev2) Patchwork
2017-11-09 23:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-11-10 21:18 ` ✓ Fi.CI.BAT: success for drm/i915: Display WA #1185 WaDisableDARBFClkGating:cnl, glk (rev3) Patchwork
2017-11-10 23:00 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-11  0:22 ` ✗ Fi.CI.BAT: warning for drm/i915: Display WA #1185 WaDisableDARBFClkGating:cnl, glk (rev4) Patchwork
2017-11-13 23:01 ` ✗ Fi.CI.BAT: failure " Patchwork
2017-11-14  0:38 ` ✓ Fi.CI.BAT: success " Patchwork
2017-11-14  1:31 ` ✓ Fi.CI.IGT: " Patchwork

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=20171110204401.GJ10981@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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