All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Kahola, Mika" <mika.kahola@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/tgl: Lower cdclk for sub 4k resolutions
Date: Tue, 20 Aug 2019 16:44:16 +0300	[thread overview]
Message-ID: <20190820134416.GD5942@intel.com> (raw)
In-Reply-To: <8ca285150096aa90e67eb5e6b253eec151dafc6e.camel@intel.com>

On Tue, Aug 20, 2019 at 01:22:00PM +0000, Kahola, Mika wrote:
> On Tue, 2019-08-20 at 16:03 +0300, Ville Syrjälä wrote:
> > On Tue, Aug 20, 2019 at 02:06:31PM +0300, Mika Kahola wrote:
> > > In order to achieve improved power savings we can tune down CD
> > > clock frequency
> > > for sub 4k resolutions. The maximum CD clock frequency for sub 4k
> > > resolutions is set to 172.8 MHz.
> > > 
> > > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_cdclk.c | 26
> > > +++++++++++++++++++++-
> > >  drivers/gpu/drm/i915/display/intel_cdclk.h |  3 +++
> > >  2 files changed, 28 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > > b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > > index d0bc42e5039c..1d6c7bc79470 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > > @@ -2610,6 +2610,24 @@ static int intel_compute_max_dotclk(struct
> > > drm_i915_private *dev_priv)
> > >  		return max_cdclk_freq*90/100;
> > >  }
> > >  
> > > +bool mode_is_4k(struct drm_i915_private *dev_priv)
> > > +{
> > > +	struct intel_crtc *crtc;
> > > +	struct intel_crtc_state *pipe_config;
> > > +
> > > +	for_each_intel_crtc(&dev_priv->drm, crtc) {
> > > +		pipe_config = to_intel_crtc_state(crtc->base.state);
> > > +
> > > +		if (pipe_config->base.active) {
> > > +			if (pipe_config->pipe_src_w >= WIDTH_4K &&
> > > +			    pipe_config->pipe_src_h >= HEIGHT_4K)
> > > +				return true;
> > > +		}
> > > +	}
> > > +
> > > +	return false;
> > > +}
> > > +
> > >  /**
> > >   * intel_update_max_cdclk - Determine the maximum support CDCLK
> > > frequency
> > >   * @dev_priv: i915 device
> > > @@ -2620,7 +2638,13 @@ static int intel_compute_max_dotclk(struct
> > > drm_i915_private *dev_priv)
> > >   */
> > >  void intel_update_max_cdclk(struct drm_i915_private *dev_priv)
> > >  {
> > > -	if (IS_ELKHARTLAKE(dev_priv)) {
> > > +	/*
> > > +	 * Use lower CDCLK frequency on Tigerlake when selected
> > > +	 * mode is less than 4k.
> > > +	 */
> > > +	if (INTEL_GEN(dev_priv) >= 12 && !mode_is_4k(dev_priv)) {
> > > +		dev_priv->max_cdclk_freq = 172800;
> > 
> > The maximum is just that, the maximum. It doesn't affect the actual
> > cdclk chosen (outside of rejecting everything exceeding the max).
> > And the maximum won't ever change, so trying to calculate it based
> > on some ephemeral crtc states doesn't make sense.
> > 
> > Given that our policy is to always go for the minimum acceptable
> > cdclk
> > frequency I don't think there is any work to be done to get proper
> > power savings for <4k. What is the actual problem you're seeing?
> The actual problem is that this is a requested feature for TGL. I
> admit, with these suggested optimizations the gains will be marginal.
> 
> My interpretation of this feature was that we should not exceed
> 172.8MHz with the sub 4k modes, hence I'm suggesting in this patch to limit the max cdclock to this number. 
> 
> So, how do we get forward? Should I propose that we drop this feature
> or should we implement this differently?

There is nothing to implement. The current policy already picks the
minimum cdclk that will work.

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-08-20 13:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 11:06 [PATCH] drm/i915/tgl: Lower cdclk for sub 4k resolutions Mika Kahola
2019-08-20 13:03 ` Ville Syrjälä
2019-08-20 13:22   ` Kahola, Mika
2019-08-20 13:44     ` Ville Syrjälä [this message]
2019-08-20 13:35 ` Shankar, Uma
2019-08-20 13:43   ` Ville Syrjälä
2019-08-20 15:06     ` Shankar, Uma
2019-08-21  6:18   ` Kahola, Mika
2019-08-20 16:28 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-08-20 16:29 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-08-20 17:51 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-21  5:29 ` ✓ 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=20190820134416.GD5942@intel.com \
    --to=ville.syrjala@linux.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 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.