From: Damien Lespiau <damien.lespiau@intel.com>
To: akash.goel@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/7] drm/i915/skl: Updated the gen6_rps_limits function
Date: Tue, 17 Feb 2015 14:44:56 +0000 [thread overview]
Message-ID: <20150217144456.GC18727@strange.ger.corp.intel.com> (raw)
In-Reply-To: <1423234598-14781-5-git-send-email-akash.goel@intel.com>
On Fri, Feb 06, 2015 at 08:26:35PM +0530, akash.goel@intel.com wrote:
> From: Akash Goel <akash.goel@intel.com>
>
> RP Interrupt Up/Down Frequency Limits register (A014) definition
> has changed for SKL. Updated the gen6_rps_limits function as per that
>
> Signed-off-by: Akash Goel <akash.goel@intel.com>
Ah, this is the change I was looking for earlier. Comment below though:
> ---
> drivers/gpu/drm/i915/intel_pm.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 215b200..db24b48 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3623,7 +3623,7 @@ static void ironlake_disable_drps(struct drm_device *dev)
> * ourselves, instead of doing a rmw cycle (which might result in us clearing
> * all limits and the gpu stuck at whatever frequency it is at atm).
> */
> -static u32 gen6_rps_limits(struct drm_i915_private *dev_priv, u8 val)
> +static u32 get_rps_limits(struct drm_i915_private *dev_priv, u8 val)
> {
> u32 limits;
>
> @@ -3633,9 +3633,15 @@ static u32 gen6_rps_limits(struct drm_i915_private *dev_priv, u8 val)
> * the hw runs at the minimal clock before selecting the desired
> * frequency, if the down threshold expires in that window we will not
> * receive a down interrupt. */
> - limits = dev_priv->rps.max_freq_softlimit << 24;
> - if (val <= dev_priv->rps.min_freq_softlimit)
> - limits |= dev_priv->rps.min_freq_softlimit << 16;
> + if (IS_GEN9(dev_priv->dev)) {
> + limits = (dev_priv->rps.max_freq_softlimit * GEN9_FREQ_SCALER) << 23;
> + if (val <= dev_priv->rps.min_freq_softlimit)
> + limits |= (dev_priv->rps.min_freq_softlimit * GEN9_FREQ_SCALER) << 14;
I believe the values here are in 16.666 Mhz, the power spec I have gives
examples:
[31:23]=54d: No interrupt if already >=900MHz
[22:14]=18d: No interrupt if already <= 300MHz
and 54 * 16.66.. = 900.
> + } else {
> + limits = dev_priv->rps.max_freq_softlimit << 24;
> + if (val <= dev_priv->rps.min_freq_softlimit)
> + limits |= dev_priv->rps.min_freq_softlimit << 16;
> + }
>
> return limits;
> }
> @@ -3778,7 +3784,7 @@ static void gen6_set_rps(struct drm_device *dev, u8 val)
> /* Make sure we continue to get interrupts
> * until we hit the minimum or maximum frequencies.
> */
> - I915_WRITE(GEN6_RP_INTERRUPT_LIMITS, gen6_rps_limits(dev_priv, val));
> + I915_WRITE(GEN6_RP_INTERRUPT_LIMITS, get_rps_limits(dev_priv, val));
> I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
>
> POSTING_READ(GEN6_RPNSWREQ);
> --
> 1.9.2
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-02-17 14:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 14:56 [PATCH 0/7] Added missing changes for Turbo feature on SKL akash.goel
2015-02-06 14:56 ` [PATCH 1/7] drm/i915/skl: Added new macros akash.goel
2015-02-16 19:05 ` Damien Lespiau
2015-02-17 14:40 ` Damien Lespiau
2015-02-17 15:20 ` Goel, Akash
2015-02-17 15:26 ` Damien Lespiau
2015-02-17 15:32 ` Goel, Akash
2015-02-23 16:21 ` Daniel Vetter
2015-02-23 16:22 ` Damien Lespiau
2015-02-06 14:56 ` [PATCH 2/7] drm/i915/skl: Updated the gen6_set_rps function akash.goel
2015-02-17 14:31 ` Damien Lespiau
2015-02-17 15:08 ` Damien Lespiau
2015-02-06 14:56 ` [PATCH 3/7] drm/i915/skl: Restructured the gen6_set_rps_thresholds function akash.goel
2015-02-06 15:48 ` Chris Wilson
2015-02-09 4:51 ` Akash Goel
2015-02-06 14:56 ` [PATCH 4/7] drm/i915/skl: Updated the gen6_rps_limits function akash.goel
2015-02-06 15:43 ` Chris Wilson
2015-02-09 4:56 ` Akash Goel
2015-02-09 11:03 ` Chris Wilson
2015-02-09 11:33 ` Akash Goel
2015-02-17 14:44 ` Damien Lespiau [this message]
2015-02-17 15:01 ` Damien Lespiau
2015-02-17 15:10 ` Damien Lespiau
2015-02-06 14:56 ` [PATCH 5/7] drm/i915/skl: Updated the gen9_enable_rps function akash.goel
2015-02-17 15:47 ` Damien Lespiau
2015-02-18 4:59 ` Akash Goel
2015-02-06 14:56 ` [PATCH 6/7] drm/i915/skl: Updated the 'i915_frequency_info' debugs function akash.goel
2015-02-17 15:38 ` Damien Lespiau
2015-02-18 6:47 ` Akash Goel
2015-02-06 14:56 ` [PATCH 7/7] drm/i915/skl: Enabling processing of Turbo interrupts akash.goel
2015-02-06 19:40 ` shuang.he
2015-02-17 15:38 ` Damien Lespiau
2015-02-17 15:51 ` [PATCH 0/7] Added missing changes for Turbo feature on SKL Damien Lespiau
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=20150217144456.GC18727@strange.ger.corp.intel.com \
--to=damien.lespiau@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox