From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 05/10] drm/i915: Move overclocking detection to alongside RPS frequency detection
Date: Mon, 11 Jul 2016 16:37:37 +0300 [thread overview]
Message-ID: <87bn24thwe.fsf@intel.com> (raw)
In-Reply-To: <1468055535-19740-6-git-send-email-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Move the overclocking max frequency detection alongside the regular
> frequency detection, before we expose the undefined value to userspace.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 54f739fbd133..24b23a51c56b 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5343,7 +5343,7 @@ static void gen8_enable_rps(struct drm_i915_private *dev_priv)
> static void gen6_enable_rps(struct drm_i915_private *dev_priv)
> {
> struct intel_engine_cs *engine;
> - u32 rc6vids, pcu_mbox = 0, rc6_mask = 0;
> + u32 rc6vids, rc6_mask = 0;
> u32 gtfifodbg;
> int rc6_mode;
> int ret;
> @@ -5417,14 +5417,6 @@ static void gen6_enable_rps(struct drm_i915_private *dev_priv)
> if (ret)
> DRM_DEBUG_DRIVER("Failed to set the min frequency\n");
>
> - ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);
> - if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
> - DRM_DEBUG_DRIVER("Overclocking supported. Max: %dMHz, Overclock max: %dMHz\n",
> - (dev_priv->rps.max_freq_softlimit & 0xff) * 50,
> - (pcu_mbox & 0xff) * 50);
> - dev_priv->rps.max_freq = pcu_mbox & 0xff;
> - }
> -
> reset_rps(dev_priv, gen6_set_rps);
>
> rc6vids = 0;
> @@ -6526,6 +6518,20 @@ void intel_init_gt_powersave(struct drm_i915_private *dev_priv)
> dev_priv->rps.efficient_freq,
> intel_freq_opcode(dev_priv, 450));
>
> + /* After setting max-softlimit, find the overclock max freq */
> + if (IS_GEN6(dev_priv) ||
> + IS_IVYBRIDGE(dev_priv) || IS_HASWELL(dev_priv)) {
> + u32 params = 0;
> +
> + sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, ¶ms);
> + if (params & BIT(31)) { /* OC supported */
> + DRM_DEBUG_DRIVER("Overclocking supported, max: %dMHz, overclock: %dMHz\n",
> + (dev_priv->rps.max_freq & 0xff) * 50,
> + (params & 0xff) * 50);
Yeah max_freq makes more sense.
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> + dev_priv->rps.max_freq = params & 0xff;
> + }
> + }
> +
> mutex_unlock(&dev_priv->rps.hw_lock);
> }
>
> --
> 2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-11 13:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-09 9:12 Mika's rps/rc6 fixes Chris Wilson
2016-07-09 9:12 ` [PATCH 01/10] drm/i915/breadcrumbs: Queue hangcheck before sleeping Chris Wilson
2016-07-11 11:42 ` Mika Kuoppala
2016-07-09 9:12 ` [PATCH 02/10] drm/i915: Kick hangcheck from retire worker Chris Wilson
2016-07-11 12:21 ` Mika Kuoppala
2016-07-11 12:46 ` Chris Wilson
2016-07-09 9:12 ` [PATCH 03/10] drm/i915: Preserve current RPS frequency across init Chris Wilson
2016-07-09 9:12 ` [PATCH 04/10] drm/i915: Perform static RPS frequency setup before userspace Chris Wilson
2016-07-11 13:31 ` Mika Kuoppala
2016-07-09 9:12 ` [PATCH 05/10] drm/i915: Move overclocking detection to alongside RPS frequency detection Chris Wilson
2016-07-11 13:37 ` Mika Kuoppala [this message]
2016-07-09 9:12 ` [PATCH 06/10] drm/i915: Define a separate variable and control for RPS waitboost frequency Chris Wilson
2016-07-11 11:39 ` Mika Kuoppala
2016-07-11 11:49 ` Chris Wilson
2016-07-11 12:55 ` Mika Kuoppala
2016-07-11 13:09 ` Chris Wilson
2016-07-09 9:12 ` [PATCH 07/10] drm/i915: Remove superfluous powersave work flushing Chris Wilson
2016-07-11 14:11 ` Mika Kuoppala
2016-07-09 9:12 ` [PATCH 08/10] drm/i915: Defer enabling rc6 til after we submit the first batch/context Chris Wilson
2016-07-11 14:14 ` Mika Kuoppala
2016-07-11 14:24 ` Chris Wilson
2016-07-09 9:12 ` [PATCH 09/10] drm/i915: Hide gen6_update_ring_freq() Chris Wilson
2016-07-09 9:12 ` [PATCH 10/10] drm/i915: Remove temporary RPM wakeref assert disables Chris Wilson
2016-07-11 15:30 ` Mika Kuoppala
2016-07-09 9:58 ` ✗ Ro.CI.BAT: failure for series starting with [01/10] drm/i915/breadcrumbs: Queue hangcheck before sleeping Patchwork
2016-07-09 10:08 ` Chris Wilson
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=87bn24thwe.fsf@intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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.