Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@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 9/9] drm/i915: s/enable/active/ for DRRS
Date: Mon, 21 Mar 2022 20:57:03 +0000	[thread overview]
Message-ID: <a16da7d73ef7ddc87aa6cd7cafa4fdd99c10f8f6.camel@intel.com> (raw)
In-Reply-To: <YjD1vpq7u4yXSopV@intel.com>

On Tue, 2022-03-15 at 22:23 +0200, Ville Syrjälä wrote:
> On Tue, Mar 15, 2022 at 06:54:21PM +0000, Souza, Jose wrote:
> > On Tue, 2022-03-15 at 15:27 +0200, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Rename the DRRS functiosn to say "(de)activate" rather than
> > > "enable/disable". This let's us differentiate between the
> > > logically enabled vs. actually currently active cases.
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_display.c  |  4 ++--
> > >  .../drm/i915/display/intel_display_debugfs.c  | 15 ++++++++-----
> > >  drivers/gpu/drm/i915/display/intel_drrs.c     | 22 ++++++++++---------
> > >  drivers/gpu/drm/i915/display/intel_drrs.h     |  6 ++---
> > >  4 files changed, 27 insertions(+), 20 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > > index 86fc8ddd0b8f..90d54281535d 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > @@ -1246,7 +1246,7 @@ static void intel_post_plane_update(struct intel_atomic_state *state,
> > >  	    !needs_cursorclk_wa(new_crtc_state))
> > >  		icl_wa_cursorclkgating(dev_priv, pipe, false);
> > >  
> > > -	intel_drrs_enable(new_crtc_state);
> > > +	intel_drrs_activate(new_crtc_state);
> > >  }
> > >  
> > >  static void intel_crtc_enable_flip_done(struct intel_atomic_state *state,
> > > @@ -1324,7 +1324,7 @@ static void intel_pre_plane_update(struct intel_atomic_state *state,
> > >  		intel_atomic_get_new_crtc_state(state, crtc);
> > >  	enum pipe pipe = crtc->pipe;
> > >  
> > > -	intel_drrs_disable(old_crtc_state);
> > > +	intel_drrs_deactivate(old_crtc_state);
> > >  
> > >  	intel_psr_pre_plane_update(state, crtc);
> > >  
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> > > index e0a126e7ebb8..18b98788b23e 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> > > @@ -1159,6 +1159,9 @@ static int i915_drrs_status(struct seq_file *m, void *unused)
> > >  	seq_puts(m, "\n");
> > >  
> > >  	for_each_intel_crtc(&dev_priv->drm, crtc) {
> > > +		const struct intel_crtc_state *crtc_state =
> > > +			to_intel_crtc_state(crtc->base.state);
> > > +
> > >  		seq_printf(m, "[CRTC:%d:%s]:\n",
> > >  			   crtc->base.base.id, crtc->base.name);
> > >  
> > > @@ -1166,7 +1169,10 @@ static int i915_drrs_status(struct seq_file *m, void *unused)
> > >  
> > >  		/* DRRS Supported */
> > >  		seq_printf(m, "\tDRRS Enabled: %s\n",
> > > -			   str_yes_no(intel_drrs_is_enabled(crtc)));
> > > +			   str_yes_no(crtc_state->has_drrs));
> > > +
> > > +		seq_printf(m, "\tDRRS Active: %s\n",
> > > +			   str_yes_no(intel_drrs_is_active(crtc)));
> > 
> > So there is no way to know if the worker thread have activated the downclock mode?
> > I prefer to have the "activated" as meaning that the downlock is in use.
> 
> The "DRRS refresh rate" print shows if we're actually running at
> high or low refresh rate right now.
> 


Okay, reading it again makes sense to have 'enabled' when has_drrs is set and 'active' when feature is armed.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>


  reply	other threads:[~2022-03-21 20:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 13:27 [Intel-gfx] [PATCH 0/9] drm/i915: More DRRS work Ville Syrjala
2022-03-15 13:27 ` [Intel-gfx] [PATCH 1/9] drm/i915: Put the downclock_mode check back into can_enable_drrs() Ville Syrjala
2022-03-15 18:40   ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 2/9] drm/i915: Add missing tab to DRRS debugfs Ville Syrjala
2022-03-15 18:34   ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 3/9] drm/i915: Fix DRRS frontbuffer_bits handling Ville Syrjala
2022-03-15 18:35   ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 4/9] drm/i195: Determine DRRS frontbuffer_bits ahead of time Ville Syrjala
2022-03-15 18:36   ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 5/9] drm/i915: Don't cancel/schedule drrs work if the pipe wasn't affected Ville Syrjala
2022-03-15 18:39   ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 6/9] drm/i915: Schedule DRRS work from intel_drrs_enable() Ville Syrjala
2022-03-15 18:39   ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 7/9] drm/i915: Do DRRS disable/enable during pre/post_plane_update() Ville Syrjala
2022-03-15 18:48   ` Souza, Jose
2022-03-15 20:18     ` Ville Syrjälä
2022-03-15 21:39   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-03-15 13:27 ` [Intel-gfx] [PATCH 8/9] drm/i915: Deal with bigjoiner vs. DRRS Ville Syrjala
2022-03-15 18:24   ` Navare, Manasi
2022-03-15 13:27 ` [Intel-gfx] [PATCH 9/9] drm/i915: s/enable/active/ for DRRS Ville Syrjala
2022-03-15 18:54   ` Souza, Jose
2022-03-15 20:23     ` Ville Syrjälä
2022-03-21 20:57       ` Souza, Jose [this message]
2022-03-15 14:15 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: More DRRS work Patchwork
2022-03-15 14:50 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-15 16:33 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-03-15 21:52 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: More DRRS work (rev2) Patchwork
2022-03-15 22:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-16  2:28 ` [Intel-gfx] ✗ 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=a16da7d73ef7ddc87aa6cd7cafa4fdd99c10f8f6.camel@intel.com \
    --to=jose.souza@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox