All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@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: [Intel-gfx] [PATCH v5 2/6] drm/i915/psr: Modify/fix Wa_16013835468 and prepare for Wa_14015648006
Date: Tue, 28 Mar 2023 11:31:56 +0000	[thread overview]
Message-ID: <2ff543070fbe6419ee76124ddac483b1cc3288f1.camel@intel.com> (raw)
In-Reply-To: <ZCLMvr4fridshPiA@intel.com>

On Tue, 2023-03-28 at 14:17 +0300, Ville Syrjälä wrote:
> On Wed, Mar 22, 2023 at 12:34:08PM +0200, Jouni Högander wrote:
> > Wa_16013835468 is a separate from Wa_14015648006 and needs to be
> > applied for TGL onwards. Fix this by removing all the references to
> > Wa_14015648006 and apply Wa_16013835468 according to Bspec.
> > 
> > Also move workaround into separate function as a preparation for
> > Wa_14015648006 implementation. Apply this workaround in post plane
> > hook.
> > 
> > Bspec: 55378
> > 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 45 ++++++++++++++++----
> > ----
> >  1 file changed, 30 insertions(+), 15 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 8dbf452d63c2..e66677e0554b 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -1173,18 +1173,6 @@ static void intel_psr_enable_source(struct
> > intel_dp *intel_dp,
> >                              intel_dp->psr.psr2_sel_fetch_enabled ?
> >                              IGNORE_PSR2_HW_TRACKING : 0);
> >  
> > -       /*
> > -        * Wa_16013835468
> > -        * Wa_14015648006
> > -        */
> > -       if (IS_MTL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_B0) ||
> > -           IS_DISPLAY_VER(dev_priv, 12, 13)) {
> > -               if (crtc_state->hw.adjusted_mode.crtc_vblank_start
> > !=
> > -                   crtc_state->hw.adjusted_mode.crtc_vdisplay)
> > -                       intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1,
> > 0,
> > -                                   
> > wa_16013835468_bit_get(intel_dp));
> > -       }
> > -
> >         if (intel_dp->psr.psr2_enabled) {
> >                 if (DISPLAY_VER(dev_priv) == 9)
> >                         intel_de_rmw(dev_priv,
> > CHICKEN_TRANS(cpu_transcoder), 0,
> > @@ -1359,10 +1347,8 @@ static void intel_psr_disable_locked(struct
> > intel_dp *intel_dp)
> >  
> >         /*
> >          * Wa_16013835468
> > -        * Wa_14015648006
> >          */
> > -       if (IS_MTL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_B0) ||
> > -           IS_DISPLAY_VER(dev_priv, 12, 13))
> > +       if (DISPLAY_VER(dev_priv) >= 12)
> >                 intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1,
> >                              wa_16013835468_bit_get(intel_dp), 0);
> >  
> > @@ -1941,6 +1927,30 @@ void intel_psr_pre_plane_update(struct
> > intel_atomic_state *state,
> >         }
> >  }
> >  
> > +/*
> > + * Wa_16013835468
> > + */
> > +static void wm_optimization_wa(struct intel_dp *intel_dp,
> > +                          const struct intel_crtc_state
> > *crtc_state)
> > +{
> > +       struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > +       bool set_wa_bit = false;
> > +
> > +       /* Wa_16013835468 */
> > +       if (DISPLAY_VER(dev_priv) >= 12)
> > +               set_wa_bit |= crtc_state-
> > >hw.adjusted_mode.crtc_vblank_start !=
> > +                       crtc_state->hw.adjusted_mode.crtc_vdisplay;
> > +
> > +       set_wa_bit &= intel_dp->psr.enabled;
> > +
> > +       if (set_wa_bit)
> > +               intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1, 0,
> > +                            wa_16013835468_bit_get(intel_dp));
> > +       else
> > +               intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1,
> > +                            wa_16013835468_bit_get(intel_dp), 0);
> > +}
> > +
> >  static void _intel_psr_post_plane_update(const struct
> > intel_atomic_state *state,
> >                                          const struct
> > intel_crtc_state *crtc_state)
> >  {
> > @@ -1966,6 +1976,11 @@ static void
> > _intel_psr_post_plane_update(const struct intel_atomic_state
> > *state,
> >                 if (!psr->enabled && !keep_disabled)
> >                         intel_psr_enable_locked(intel_dp,
> > crtc_state);
> >  
> > +               /*
> > +                * Wa_16013835468
> > +                */
> > +               wm_optimization_wa(intel_dp, crtc_state);
> 
> Hmm. I think the correct thing would probably be to set the
> bit in pre_plane_update() and clear it in post_plane_update().
> Otherwise we risk running with the bit in the wrong position
> for a while.

I see intel_update_watermarks being called in intel_display.c:
intel_pre_plane_update. Is it ok to configure the bit before that is
complete? This was the main reason to place it in
pst_post_plane_update.

> 
> > +
> >                 /* Force a PSR exit when enabling CRC to avoid CRC
> > timeouts */
> >                 if (crtc_state->crc_enabled && psr->enabled)
> >                         psr_force_hw_tracking_exit(intel_dp);
> > -- 
> > 2.34.1
> 


  reply	other threads:[~2023-03-28 11:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 10:34 [Intel-gfx] [PATCH v5 0/6] High refresh rate PSR fixes Jouni Högander
2023-03-22 10:34 ` [Intel-gfx] [PATCH v5 1/6] drm/i915/psr: Unify pre/post hooks Jouni Högander
2023-03-22 10:34 ` [Intel-gfx] [PATCH v5 2/6] drm/i915/psr: Modify/fix Wa_16013835468 and prepare for Wa_14015648006 Jouni Högander
2023-03-28 11:17   ` Ville Syrjälä
2023-03-28 11:31     ` Hogander, Jouni [this message]
2023-03-28 11:40       ` Ville Syrjälä
2023-03-22 10:34 ` [Intel-gfx] [PATCH v5 3/6] drm/i915/psr: Implement Wa_14015648006 Jouni Högander
2023-03-22 10:34 ` [Intel-gfx] [PATCH v5 4/6] drm/i915/psr: Add helpers for block count number handling Jouni Högander
2023-03-28 11:19   ` Ville Syrjälä
2023-03-22 10:34 ` [Intel-gfx] [PATCH v5 5/6] drm/i915/psr: Check that vblank is long enough for psr2 Jouni Högander
2023-03-28 11:24   ` Ville Syrjälä
2023-03-28 11:33     ` Hogander, Jouni
2023-03-22 10:34 ` [Intel-gfx] [PATCH v5 6/6] drm/i915/psr: Implement Display WA #1136 Jouni Högander
2023-03-28 11:26   ` Ville Syrjälä
2023-03-28 11:35     ` Hogander, Jouni
2023-03-22 13:43 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for High refresh rate PSR fixes (rev5) Patchwork
2023-03-22 13:43 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-03-22 13:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-22 18:29 ` [Intel-gfx] ✓ 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=2ff543070fbe6419ee76124ddac483b1cc3288f1.camel@intel.com \
    --to=jouni.hogander@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.