All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sripada, Radhakrishna" <radhakrishna.sripada@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v4] drm/i915/icl: Fix clockgating issue when using scalers
Date: Fri, 29 Mar 2019 23:20:37 +0000	[thread overview]
Message-ID: <99c00cb7e5472d8aa341a6cdd28b5b9874fcf368.camel@intel.com> (raw)
In-Reply-To: <20190329183907.GH3888@intel.com>

On Fri, 2019-03-29 at 20:39 +0200, Ville Syrjälä wrote:
> On Thu, Mar 28, 2019 at 10:35:19AM -0700, Radhakrishna Sripada wrote:
> > Fixes the clock-gating issue when pipe scaling is enabled.
> > (Lineage #2006604312)
> > 
> > V2: Fix typo in headline(Chris)
> >     Handle the non double buffered nature of the register(Ville)
> > V3: Fix checkpatch warning. BAT failure for V2 on gen3 looks
> > unrelated.
> > V4: Split the icl and skl wa's(Ville)
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Aditya Swarup <aditya.swarup@intel.com>
> > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com
> > >
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 48 ++++++++++++++++++++--
> > ------
> >  1 file changed, 34 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 8576a7f799f2..c3ca9cfd36fe 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -466,6 +466,7 @@ static const struct intel_limit
> > intel_limits_bxt = {
> >  	.p2 = { .p2_slow = 1, .p2_fast = 20 },
> >  };
> >  
> > +/* WA Display #0827: Gen9:all */
> >  static void
> >  skl_wa_clkgate(struct drm_i915_private *dev_priv, int pipe, bool
> > enable)
> >  {
> > @@ -478,6 +479,17 @@ skl_wa_clkgate(struct drm_i915_private
> > *dev_priv, int pipe, bool enable)
> >  			   ~(DUPS1_GATING_DIS | DUPS2_GATING_DIS));
> >  }
> >  
> > +/* Wa_2006604312:icl */
> > +static void
> > +icl_wa_clkgate(struct drm_i915_private *dev_priv, int pipe, bool
> > enable)
> 
> These functions names (including the skl one) are rather too generic
> and don't describe which clock gating we're disabling. But fixing
> that is probably material for another patch.
Sure let me spin out another patch for this.
> 
> > +{
> > +	if (enable)
> > +		I915_WRITE(CLKGATE_DIS_PSL(pipe), DPFR_GATING_DIS);
> > +	else
> > +		I915_WRITE(CLKGATE_DIS_PSL(pipe),
> > +			   I915_READ(CLKGATE_DIS_PSL(pipe)) &
> > ~DPFR_GATING_DIS);
> 
> No RMW for enable but RMW for disable? Seems rather inconsistent.
Sure looks inconsistent. Let me fix it next rev.
> 
> > +}
> > +
> >  static bool
> >  needs_modeset(const struct drm_crtc_state *state)
> >  {
> > @@ -5481,14 +5493,18 @@ static bool
> > hsw_post_update_enable_ips(const struct intel_crtc_state
> > *old_crtc_s
> >  	return !old_crtc_state->ips_enabled;
> >  }
> >  
> > -static bool needs_nv12_wa(struct drm_i915_private *dev_priv,
> > -			  const struct intel_crtc_state *crtc_state)
> > +static bool skl_needs_clk_wa(struct drm_i915_private *dev_priv,
> > +			     const struct intel_crtc_state *crtc_state)
> 
> Still mixing our workarounds more than I'd like. I suggest keeping
> the two entirely separate.
Sure let me separate it completely. Avoids duplicating checks as well.

Thanks,
Radhakrishna(RK) Sripada
> 
> >  {
> > -	if (!crtc_state->nv12_planes)
> > -		return false;
> > -
> >  	/* WA Display #0827: Gen9:all */
> > -	if (IS_GEN(dev_priv, 9) && !IS_GEMINILAKE(dev_priv))
> > +	if (!!crtc_state->nv12_planes && IS_GEN(dev_priv, 9) &&
> > +	    !IS_GEMINILAKE(dev_priv))
> > +		return true;
> > +
> > +	/*
> > +	 * Wa_2006604312:icl
> > +	 */
> > +	if (IS_ICELAKE(dev_priv) && crtc_state->pch_pfit.enabled)
> >  		return true;
> >  
> >  	return false;
> > @@ -5527,10 +5543,12 @@ static void intel_post_plane_update(struct
> > intel_crtc_state *old_crtc_state)
> >  			intel_post_enable_primary(&crtc->base,
> > pipe_config);
> >  	}
> >  
> > -	/* Display WA 827 */
> > -	if (needs_nv12_wa(dev_priv, old_crtc_state) &&
> > -	    !needs_nv12_wa(dev_priv, pipe_config)) {
> > -		skl_wa_clkgate(dev_priv, crtc->pipe, false);
> > +	if (skl_needs_clk_wa(dev_priv, old_crtc_state) &&
> > +	    !skl_needs_clk_wa(dev_priv, pipe_config)) {
> > +		if (IS_ICELAKE(dev_priv))
> > +			icl_wa_clkgate(dev_priv, crtc->pipe, false);
> > +		else
> > +			skl_wa_clkgate(dev_priv, crtc->pipe, false);
> >  	}
> >  }
> >  
> > @@ -5566,10 +5584,12 @@ static void intel_pre_plane_update(struct
> > intel_crtc_state *old_crtc_state,
> >  			intel_set_cpu_fifo_underrun_reporting(dev_priv,
> > crtc->pipe, false);
> >  	}
> >  
> > -	/* Display WA 827 */
> > -	if (!needs_nv12_wa(dev_priv, old_crtc_state) &&
> > -	    needs_nv12_wa(dev_priv, pipe_config)) {
> > -		skl_wa_clkgate(dev_priv, crtc->pipe, true);
> > +	if (!skl_needs_clk_wa(dev_priv, old_crtc_state) &&
> > +	    skl_needs_clk_wa(dev_priv, pipe_config)) {
> > +		if (IS_ICELAKE(dev_priv))
> > +			icl_wa_clkgate(dev_priv, crtc->pipe, true);
> > +		else
> > +			skl_wa_clkgate(dev_priv, crtc->pipe, true);
> >  	}
> >  
> >  	/*
> > -- 
> > 2.20.0.rc2.7.g965798d1f299
> 
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-29 23:20 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 22:18 [PATCH] drm/i915/icl: Fix clockgating issue when using scalars Radhakrishna Sripada
2019-03-15 22:23 ` Chris Wilson
2019-03-18 21:19   ` Sripada, Radhakrishna
2019-03-18 21:22     ` Chris Wilson
2019-03-18 22:37       ` Sripada, Radhakrishna
2019-03-15 23:10 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-03-16  7:07 ` ✓ Fi.CI.IGT: " Patchwork
2019-03-18 13:30 ` [PATCH] " Ville Syrjälä
2019-03-18 22:32   ` Sripada, Radhakrishna
2019-03-21  1:00 ` [PATCH v2] drm/i915/icl: Fix clockgating issue when using scalers Radhakrishna Sripada
2019-03-21  1:33 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/icl: Fix clockgating issue when using scalars (rev2) Patchwork
2019-03-21  2:07 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-21 21:44 ` [PATCH v3] drm/i915/icl: Fix clockgating issue when using scalers Radhakrishna Sripada
2019-03-22 13:14   ` Ville Syrjälä
2019-03-25 19:45     ` Sripada, Radhakrishna
2019-03-22  1:10 ` ✓ Fi.CI.BAT: success for drm/i915/icl: Fix clockgating issue when using scalars (rev3) Patchwork
2019-03-22 18:21 ` ✓ Fi.CI.IGT: " Patchwork
2019-03-28 17:35 ` [PATCH v4] drm/i915/icl: Fix clockgating issue when using scalers Radhakrishna Sripada
2019-03-29 18:39   ` Ville Syrjälä
2019-03-29 23:20     ` Sripada, Radhakrishna [this message]
2019-03-28 18:01 ` ✓ Fi.CI.BAT: success for drm/i915/icl: Fix clockgating issue when using scalars (rev4) Patchwork
2019-03-29  4:14 ` ✓ Fi.CI.IGT: " Patchwork
2019-03-30  1:19 ` [PATCH v5 1/3] drm/i915: Rename skl_wa_clkgating to the actual WA Radhakrishna Sripada
2019-03-30  1:19 ` [PATCH v5 2/3] drm/i915: Fix the inconsistent RMW in WA 827 Radhakrishna Sripada
2019-03-30  1:19 ` [PATCH v5 3/3] drm/i915/icl: Fix clockgating issue when using scalers Radhakrishna Sripada
2019-04-05 15:07   ` Ville Syrjälä
2019-04-05 21:14     ` [PATCH v6] " Radhakrishna Sripada
2019-04-11 21:41       ` Souza, Jose
2019-04-11 23:29         ` Sripada, Radhakrishna
2019-04-12  7:25       ` Ville Syrjälä
2019-04-15 22:55         ` [PATCH v7] " Radhakrishna Sripada
2019-04-16 14:14           ` Ville Syrjälä
2019-04-16 15:50             ` Sripada, Radhakrishna
2019-04-17 18:59             ` [PATCH v8] " Radhakrishna Sripada
2019-04-23 18:38               ` Ville Syrjälä
2019-03-30  2:16 ` ✓ Fi.CI.BAT: success for drm/i915/icl: Fix clockgating issue when using scalars (rev5) Patchwork
2019-03-30  5:55 ` ✓ Fi.CI.IGT: " Patchwork
2019-04-05 22:51 ` ✓ Fi.CI.BAT: success for drm/i915/icl: Fix clockgating issue when using scalars (rev6) Patchwork
2019-04-06 22:08 ` ✓ Fi.CI.IGT: " Patchwork
2019-04-16  0:13 ` ✓ Fi.CI.BAT: success for drm/i915/icl: Fix clockgating issue when using scalars (rev7) Patchwork
2019-04-16  1:11 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-04-17 19:46 ` ✓ Fi.CI.BAT: success for drm/i915/icl: Fix clockgating issue when using scalars (rev8) Patchwork
2019-04-18  3: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=99c00cb7e5472d8aa341a6cdd28b5b9874fcf368.camel@intel.com \
    --to=radhakrishna.sripada@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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 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.