All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: akash.goel@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915/skl: Retrieve the Rpe value from Pcode
Date: Fri, 12 Jun 2015 13:32:09 +0300	[thread overview]
Message-ID: <20150612103209.GW5176@intel.com> (raw)
In-Reply-To: <1434101468-14889-1-git-send-email-akash.goel@intel.com>

On Fri, Jun 12, 2015 at 03:01:08PM +0530, akash.goel@intel.com wrote:
> From: Akash Goel <akash.goel@intel.com>
> 
> Read the efficient frequency (aka RPe) value through the the mailbox
> command (0x1A) from the pcode, as done on Haswell and Broadwell.
> The turbo minimum frequency softlimit is not revised as per the
> efficient frequency value.
> 
> v2: Replaced the conditional expression operator with 'if' statement (Tom)
> 
> Issue: VIZ-5143
> Signed-off-by: Akash Goel <akash.goel@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index d091fec..21b22a7 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4314,16 +4314,20 @@ static void gen6_init_rps_frequencies(struct drm_device *dev)
>  	dev_priv->rps.max_freq		= dev_priv->rps.rp0_freq;
>  
>  	dev_priv->rps.efficient_freq = dev_priv->rps.rp1_freq;
> -	if (IS_HASWELL(dev) || IS_BROADWELL(dev)) {
> +	if (IS_HASWELL(dev) || IS_BROADWELL(dev) || IS_SKYLAKE(dev)) {
>  		ret = sandybridge_pcode_read(dev_priv,
>  					HSW_PCODE_DYNAMIC_DUTY_CYCLE_CONTROL,
>  					&ddcc_status);
> -		if (0 == ret)
> +		if (0 == ret) {
>  			dev_priv->rps.efficient_freq =
>  				clamp_t(u8,
>  					((ddcc_status >> 8) & 0xff),
>  					dev_priv->rps.min_freq,
>  					dev_priv->rps.max_freq);

That's wrong now since min/max_freq were already multiplied by
GEN9_FREQ_SCALER.

> +
> +			if (IS_SKYLAKE(dev))
> +			      dev_priv->rps.efficient_freq *= GEN9_FREQ_SCALER;
> +		}
>  	}

I would suggest moving all the GEN9_FREQ_SCALER multiplications here.

>  
>  	dev_priv->rps.idle_freq = dev_priv->rps.min_freq;
> -- 
> 1.9.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  reply	other threads:[~2015-06-12 10:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-07 13:02 [PATCH 0/5] Ring frequency & Rpe changes for SKL akash.goel
2015-06-07 13:02 ` [PATCH 1/5] drm/i915/skl: Retrieve the Rpe value from Pcode akash.goel
2015-06-09 23:24   ` Rodrigo Vivi
2015-06-10 18:50     ` O'Rourke, Tom
2015-06-12  7:41       ` Jani Nikula
2015-06-12  9:31         ` [PATCH v2] " akash.goel
2015-06-12 10:32           ` Ville Syrjälä [this message]
2015-06-12 11:48             ` Akash Goel
2015-06-12 17:58             ` [PATCH v3] " akash.goel
2015-06-28 10:09               ` shuang.he
2015-06-28 13:25           ` [PATCH v2] " shuang.he
2015-06-07 13:02 ` [PATCH 2/5] drm/i915/skl: Ring frequency table programming changes akash.goel
2015-06-09 23:28   ` Rodrigo Vivi
2015-06-07 13:02 ` [PATCH 3/5] drm/i915/skl: Restrict the ring frequency table programming to SKL akash.goel
2015-06-09 23:30   ` Rodrigo Vivi
2015-06-07 13:02 ` [PATCH 4/5] drm/i915: Corrected the platform checks in i915_ring_freq_table function akash.goel
2015-06-09 23:32   ` Rodrigo Vivi
2015-06-15 13:15   ` Daniel Vetter
2015-06-15 13:53     ` Akash Goel
2015-06-07 13:02 ` [PATCH 5/5] drm/i915/skl: Updated the i915_ring_freq_table debugfs function akash.goel
2015-06-09 23:32   ` Rodrigo Vivi

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=20150612103209.GW5176@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=akash.goel@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.