Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "Kahola, Mika" <mika.kahola@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 5/5] drm/i915/display: Implement Wa_16021440873
Date: Thu, 28 Mar 2024 13:19:24 +0000	[thread overview]
Message-ID: <babf88003031821d46e2ef22973abe8802053171.camel@intel.com> (raw)
In-Reply-To: <MW4PR11MB7054FE071E2815F385B9A782EF3B2@MW4PR11MB7054.namprd11.prod.outlook.com>

On Thu, 2024-03-28 at 12:57 +0000, Kahola, Mika wrote:
> > -----Original Message-----
> > From: Hogander, Jouni <jouni.hogander@intel.com>
> > Sent: Tuesday, March 19, 2024 2:33 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: Kahola, Mika <mika.kahola@intel.com>; Hogander, Jouni
> > <jouni.hogander@intel.com>
> > Subject: [PATCH 5/5] drm/i915/display: Implement Wa_16021440873
> > 
> > This patch is implementing Wa_16021440873.
> > 
> > Bspec: 74151
> > 
> 
> Reviewed-by: Mika Kahola <mika.kahola@intel.com>

Thank you Mika for your review. These are now pushed to drm-intel-next.

BR,

Jouni Högander

> 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_cursor.c | 24
> > ++++++++++++++++++++-
> >  drivers/gpu/drm/i915/display/intel_psr.c    | 20 +++++++++++------
> >  2 files changed, 37 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c
> > b/drivers/gpu/drm/i915/display/intel_cursor.c
> > index f8b33999d43f..838d1a723ff1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> > +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> > @@ -511,6 +511,24 @@ static void
> > i9xx_cursor_disable_sel_fetch_arm(struct intel_plane *plane,
> >         intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe,
> > plane->id), 0);  }
> > 
> > +static void wa_16021440873(struct intel_plane *plane,
> > +                          const struct intel_crtc_state
> > *crtc_state,
> > +                          const struct intel_plane_state
> > *plane_state) {
> > +       struct drm_i915_private *dev_priv = to_i915(plane-
> > >base.dev);
> > +       u32 ctl = plane_state->ctl;
> > +       int et_y_position = drm_rect_height(&crtc_state->pipe_src)
> > + 1;
> > +       enum pipe pipe = plane->pipe;
> > +
> > +       ctl &= ~MCURSOR_MODE_MASK;
> > +       ctl |= MCURSOR_MODE_64_2B;
> > +
> > +       intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe,
> > plane->id),
> > +ctl);
> > +
> > +       intel_de_write(dev_priv, PIPE_SRCSZ_ERLY_TPT(pipe),
> > +                      PIPESRC_HEIGHT(et_y_position)); }
> > +
> >  static void i9xx_cursor_update_sel_fetch_arm(struct intel_plane
> > *plane,
> >                                              const struct
> > intel_crtc_state *crtc_state,
> >                                              const struct
> > intel_plane_state *plane_state) @@ -531,7 +549,11 @@ static void
> > i9xx_cursor_update_sel_fetch_arm(struct intel_plane *plane,
> >                 intel_de_write_fw(dev_priv,
> > PLANE_SEL_FETCH_CTL(pipe, plane->id),
> >                                   plane_state->ctl);
> >         } else {
> > -               i9xx_cursor_disable_sel_fetch_arm(plane,
> > crtc_state);
> > +               /* Wa_16021440873 */
> > +               if (crtc_state->enable_psr2_su_region_et)
> > +                       wa_16021440873(plane, crtc_state,
> > plane_state);
> > +               else
> > +                       i9xx_cursor_disable_sel_fetch_arm(plane,
> > crtc_state);
> >         }
> >  }
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index e1a9399aa503..7ecf1b35c1ef 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -2082,14 +2082,19 @@ static void psr2_man_trk_ctl_calc(struct
> > intel_crtc_state *crtc_state,
> >         crtc_state->psr2_man_track_ctl = val;
> >  }
> > 
> > -static u32 psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state
> > *crtc_state,
> > -                                         bool full_update)
> > +static u32
> > +psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state
> > *crtc_state,
> > +                              bool full_update, bool
> > cursor_in_su_area)
> >  {
> >         int width, height;
> > 
> >         if (!crtc_state->enable_psr2_su_region_et || full_update)
> >                 return 0;
> > 
> > +       if (!cursor_in_su_area)
> > +               return PIPESRC_WIDTH(0) |
> > +                       PIPESRC_HEIGHT(drm_rect_height(&crtc_state-
> > >pipe_src));
> > +
> >         width = drm_rect_width(&crtc_state->psr2_su_area);
> >         height = drm_rect_height(&crtc_state->psr2_su_area);
> > 
> > @@ -2141,7 +2146,8 @@ static void
> > intel_psr2_sel_fetch_pipe_alignment(struct intel_crtc_state
> > *crtc_st
> >   */
> >  static void
> >  intel_psr2_sel_fetch_et_alignment(struct intel_atomic_state
> > *state,
> > -                                 struct intel_crtc *crtc)
> > +                                 struct intel_crtc *crtc,
> > +                                 bool *cursor_in_su_area)
> >  {
> >         struct intel_crtc_state *crtc_state =
> > intel_atomic_get_new_crtc_state(state, crtc);
> >         struct intel_plane_state *new_plane_state; @@ -2169,6
> > +2175,7 @@ intel_psr2_sel_fetch_et_alignment(struct
> > intel_atomic_state *state,
> > 
> >                 clip_area_update(&crtc_state->psr2_su_area,
> > &new_plane_state->uapi.dst,
> >                                  &crtc_state->pipe_src);
> > +               *cursor_in_su_area = true;
> >         }
> >  }
> > 
> > @@ -2214,7 +2221,7 @@ int intel_psr2_sel_fetch_update(struct
> > intel_atomic_state *state,
> >         struct intel_crtc_state *crtc_state =
> > intel_atomic_get_new_crtc_state(state, crtc);
> >         struct intel_plane_state *new_plane_state,
> > *old_plane_state;
> >         struct intel_plane *plane;
> > -       bool full_update = false;
> > +       bool full_update = false, cursor_in_su_area = false;
> >         int i, ret;
> > 
> >         if (!crtc_state->enable_psr2_sel_fetch)
> > @@ -2331,7 +2338,7 @@ int intel_psr2_sel_fetch_update(struct
> > intel_atomic_state *state,
> >          * drm_atomic_add_affected_planes to ensure visible cursor
> > is added into
> >          * affected planes even when cursor is not updated by
> > itself.
> >          */
> > -       intel_psr2_sel_fetch_et_alignment(state, crtc);
> > +       intel_psr2_sel_fetch_et_alignment(state, crtc,
> > &cursor_in_su_area);
> > 
> >         intel_psr2_sel_fetch_pipe_alignment(crtc_state);
> > 
> > @@ -2395,7 +2402,8 @@ int intel_psr2_sel_fetch_update(struct
> > intel_atomic_state *state,
> >  skip_sel_fetch_set_loop:
> >         psr2_man_trk_ctl_calc(crtc_state, full_update);
> >         crtc_state->pipe_srcsz_early_tpt =
> > -               psr2_pipe_srcsz_early_tpt_calc(crtc_state,
> > full_update);
> > +               psr2_pipe_srcsz_early_tpt_calc(crtc_state,
> > full_update,
> > +                                              cursor_in_su_area);
> >         return 0;
> >  }
> > 
> > --
> > 2.34.1
> 


  reply	other threads:[~2024-03-28 13:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 12:33 [PATCH 0/5] Wa_16021440873 and early transport fixes Jouni Högander
2024-03-19 12:33 ` [PATCH 1/5] drm/i915/psr: Calculate PIPE_SRCSZ_ERLY_TPT value Jouni Högander
2024-03-27 13:05   ` Kahola, Mika
2024-03-19 12:33 ` [PATCH 2/5] drm/i915/psr: Move writing early transport pipe src Jouni Högander
2024-03-27 13:06   ` Kahola, Mika
2024-03-19 12:33 ` [PATCH 3/5] drm/i915/display/intel_psr: Fix intel_psr2_sel_fetch_et_alignment usage Jouni Högander
2024-03-28  9:25   ` Kahola, Mika
2024-03-19 12:33 ` [PATCH 4/5] drm/i915/display: Add definition for MCURSOR_MODE_64_2B Jouni Högander
2024-03-28  9:29   ` Kahola, Mika
2024-03-19 12:33 ` [PATCH 5/5] drm/i915/display: Implement Wa_16021440873 Jouni Högander
2024-03-28 12:57   ` Kahola, Mika
2024-03-28 13:19     ` Hogander, Jouni [this message]
2024-03-19 21:40 ` ✗ Fi.CI.SPARSE: warning for Wa_16021440873 and early transport fixes Patchwork
2024-03-19 21:58 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-20  8:03 ` ✗ Fi.CI.SPARSE: warning for Wa_16021440873 and early transport fixes (rev2) Patchwork
2024-03-20  8:16 ` ✓ Fi.CI.BAT: success " Patchwork
2024-03-20 18:39 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-28 13:01   ` Hogander, Jouni

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=babf88003031821d46e2ef22973abe8802053171.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kahola@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