Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 4/7] drm/i915: Clean up intel_wm_need_update()
Date: Mon, 23 Sep 2024 20:33:32 +0300	[thread overview]
Message-ID: <ZvGmbLMQFe_XhWtp@intel.com> (raw)
In-Reply-To: <b32bfa82c4dbbf611b4bcd613c154261e4d8cb6a.camel@intel.com>

On Sun, Sep 22, 2024 at 10:34:07AM +0000, Govindapillai, Vinod wrote:
> On Sun, 2024-09-22 at 12:54 +0300, Govindapillai, Vinod wrote:
> > On Mon, 2024-09-16 at 19:24 +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > intel_wm_need_update() is a mess when it comes to variable
> > > names and constness. The checks also keep alternating randomly
> > > between 'old != cur' vs. 'cur != old'. Clean it all up.
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  .../gpu/drm/i915/display/intel_atomic_plane.c | 20 +++++++++----------
> > >  1 file changed, 10 insertions(+), 10 deletions(-)
> > 
> > Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> 
> Just noticed that the next patch in this series nuke this intel_wm_need_update() and move to
> i9xx_wm_need_update().

That's just a rename. Nothing to do with the internals of the function.

> So wonder if we need this patch.
> 
> Anyway, already RB-ed.
> 
> BR
> Vinod
> 
> > 
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > > b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > > index b5bbcc773ec0..2aeb4cd5b5a1 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > > @@ -393,22 +393,22 @@ void intel_plane_set_invisible(struct intel_crtc_state *crtc_state,
> > >  }
> > >  
> > >  /* FIXME nuke when all wm code is atomic */
> > > -static bool intel_wm_need_update(const struct intel_plane_state *cur,
> > > -                                struct intel_plane_state *new)
> > > +static bool intel_wm_need_update(const struct intel_plane_state *old_plane_state,
> > > +                                const struct intel_plane_state *new_plane_state)
> > >  {
> > >         /* Update watermarks on tiling or size changes. */
> > > -       if (new->uapi.visible != cur->uapi.visible)
> > > +       if (old_plane_state->uapi.visible != new_plane_state->uapi.visible)
> > >                 return true;
> > >  
> > > -       if (!cur->hw.fb || !new->hw.fb)
> > > +       if (!old_plane_state->hw.fb || !new_plane_state->hw.fb)
> > >                 return false;
> > >  
> > > -       if (cur->hw.fb->modifier != new->hw.fb->modifier ||
> > > -           cur->hw.rotation != new->hw.rotation ||
> > > -           drm_rect_width(&new->uapi.src) != drm_rect_width(&cur->uapi.src) ||
> > > -           drm_rect_height(&new->uapi.src) != drm_rect_height(&cur->uapi.src) ||
> > > -           drm_rect_width(&new->uapi.dst) != drm_rect_width(&cur->uapi.dst) ||
> > > -           drm_rect_height(&new->uapi.dst) != drm_rect_height(&cur->uapi.dst))
> > > +       if (old_plane_state->hw.fb->modifier != new_plane_state->hw.fb->modifier ||
> > > +           old_plane_state->hw.rotation != new_plane_state->hw.rotation ||
> > > +           drm_rect_width(&old_plane_state->uapi.src) != drm_rect_width(&new_plane_state-
> > > > uapi.src) ||
> > > +           drm_rect_height(&old_plane_state->uapi.src) != drm_rect_height(&new_plane_state-
> > > > uapi.src) ||
> > > +           drm_rect_width(&old_plane_state->uapi.dst) != drm_rect_width(&new_plane_state-
> > > > uapi.dst) ||
> > > +           drm_rect_height(&old_plane_state->uapi.dst) != drm_rect_height(&new_plane_state-
> > > > uapi.dst))
> > >                 return true;
> > >  
> > >         return false;
> > 
> 

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2024-09-23 17:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16 16:24 [PATCH 0/7] drm/i915: Some wm/cxsr cleanups Ville Syrjala
2024-09-16 16:24 ` [PATCH 1/7] drm/i915: Remove leftover intel_sprite_set_colorkey_ioctl() prototype Ville Syrjala
2024-09-22  9:31   ` Govindapillai, Vinod
2024-09-23 21:58     ` Ville Syrjälä
2024-09-16 16:24 ` [PATCH 2/7] drm/i915: Combine .compute_{pipe, intermediate}_wm() into one Ville Syrjala
2024-09-22  9:49   ` Govindapillai, Vinod
2024-09-16 16:24 ` [PATCH 3/7] drm/i915: Extract ilk_must_disable_lp_wm() Ville Syrjala
2024-09-16 16:24 ` [PATCH 4/7] drm/i915: Clean up intel_wm_need_update() Ville Syrjala
2024-09-22  9:54   ` Govindapillai, Vinod
2024-09-22 10:34     ` Govindapillai, Vinod
2024-09-23 17:33       ` Ville Syrjälä [this message]
2024-09-16 16:24 ` [PATCH 5/7] drm/i915: Move the dodgy pre-g4x wm stuff into i9xx_wm Ville Syrjala
2024-09-22 10:40   ` Govindapillai, Vinod
2024-09-23 17:35     ` Ville Syrjälä
2024-09-23 21:59       ` Ville Syrjälä
2024-09-24  6:07         ` Govindapillai, Vinod
2024-09-16 16:24 ` [PATCH 6/7] drm/i915: s/disable_lp_wm/disable_cxsr/ Ville Syrjala
2024-09-22 10:46   ` Govindapillai, Vinod
2024-09-16 16:24 ` [PATCH 7/7] drm/i915: Rename variables in ilk_intermedidate_wm() Ville Syrjala
2024-09-22 10:50   ` Govindapillai, Vinod
2024-09-16 22:11 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Some wm/cxsr cleanups Patchwork
2024-09-16 22:11 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-09-16 22:35 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-18 21:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Some wm/cxsr cleanups (rev2) Patchwork
2024-09-18 21:09 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-09-18 21:18 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-19  8:31 ` ✗ Fi.CI.IGT: failure " 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=ZvGmbLMQFe_XhWtp@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vinod.govindapillai@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