From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: akash.goel@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 08/11] drm/i915/skl: Updated the i915_frequency_info debugfs function
Date: Wed, 11 Mar 2015 22:48:03 +0200 [thread overview]
Message-ID: <20150311204803.GA11371@intel.com> (raw)
In-Reply-To: <1425620244-12637-9-git-send-email-akash.goel@intel.com>
On Fri, Mar 06, 2015 at 11:07:21AM +0530, akash.goel@intel.com wrote:
> From: Akash Goel <akash.goel@intel.com>
>
> Added support for SKL in the i915_frequency_info debugfs function
>
> v2:
> - corrected the handling of reqf (Damien)
> - Reorderd the platform check for cagf (Ville)
>
> Signed-off-by: Akash Goel <akash.goel@intel.com>
Had to dig up the PM docs for the GT_PERF_STATUS, but with the right
docs it all looks good to me.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 25 +++++++++++++++++--------
> 1 file changed, 17 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index f9b5a97..e97de3cc 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1090,7 +1090,7 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
> seq_printf(m, "Current P-state: %d\n",
> (rgvstat & MEMSTAT_PSTATE_MASK) >> MEMSTAT_PSTATE_SHIFT);
> } else if (IS_GEN6(dev) || (IS_GEN7(dev) && !IS_VALLEYVIEW(dev)) ||
> - IS_BROADWELL(dev)) {
> + IS_BROADWELL(dev) || IS_GEN9(dev)) {
> u32 gt_perf_status = I915_READ(GEN6_GT_PERF_STATUS);
> u32 rp_state_limits = I915_READ(GEN6_RP_STATE_LIMITS);
> u32 rp_state_cap = I915_READ(GEN6_RP_STATE_CAP);
> @@ -1109,11 +1109,15 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
> intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
>
> reqf = I915_READ(GEN6_RPNSWREQ);
> - reqf &= ~GEN6_TURBO_DISABLE;
> - if (IS_HASWELL(dev) || IS_BROADWELL(dev))
> - reqf >>= 24;
> - else
> - reqf >>= 25;
> + if (IS_GEN9(dev))
> + reqf >>= 23;
> + else {
> + reqf &= ~GEN6_TURBO_DISABLE;
> + if (IS_HASWELL(dev) || IS_BROADWELL(dev))
> + reqf >>= 24;
> + else
> + reqf >>= 25;
> + }
> reqf = intel_gpu_freq(dev_priv, reqf);
>
> rpmodectl = I915_READ(GEN6_RP_CONTROL);
> @@ -1127,7 +1131,9 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
> rpdownei = I915_READ(GEN6_RP_CUR_DOWN_EI);
> rpcurdown = I915_READ(GEN6_RP_CUR_DOWN);
> rpprevdown = I915_READ(GEN6_RP_PREV_DOWN);
> - if (IS_HASWELL(dev) || IS_BROADWELL(dev))
> + if (IS_GEN9(dev))
> + cagf = (rpstat & GEN9_CAGF_MASK) >> GEN9_CAGF_SHIFT;
> + else if (IS_HASWELL(dev) || IS_BROADWELL(dev))
> cagf = (rpstat & HSW_CAGF_MASK) >> HSW_CAGF_SHIFT;
> else
> cagf = (rpstat & GEN6_CAGF_MASK) >> GEN6_CAGF_SHIFT;
> @@ -1153,7 +1159,7 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
> pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
> seq_printf(m, "GT_PERF_STATUS: 0x%08x\n", gt_perf_status);
> seq_printf(m, "Render p-state ratio: %d\n",
> - (gt_perf_status & 0xff00) >> 8);
> + (gt_perf_status & (IS_GEN9(dev) ? 0x1ff00 : 0xff00)) >> 8);
> seq_printf(m, "Render p-state VID: %d\n",
> gt_perf_status & 0xff);
> seq_printf(m, "Render p-state limit: %d\n",
> @@ -1178,14 +1184,17 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
> GEN6_CURBSYTAVG_MASK);
>
> max_freq = (rp_state_cap & 0xff0000) >> 16;
> + max_freq *= (IS_SKYLAKE(dev) ? GEN9_FREQ_SCALER : 1);
> seq_printf(m, "Lowest (RPN) frequency: %dMHz\n",
> intel_gpu_freq(dev_priv, max_freq));
>
> max_freq = (rp_state_cap & 0xff00) >> 8;
> + max_freq *= (IS_SKYLAKE(dev) ? GEN9_FREQ_SCALER : 1);
> seq_printf(m, "Nominal (RP1) frequency: %dMHz\n",
> intel_gpu_freq(dev_priv, max_freq));
>
> max_freq = rp_state_cap & 0xff;
> + max_freq *= (IS_SKYLAKE(dev) ? GEN9_FREQ_SCALER : 1);
> seq_printf(m, "Max non-overclocked (RP0) frequency: %dMHz\n",
> intel_gpu_freq(dev_priv, max_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
next prev parent reply other threads:[~2015-03-11 20:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 5:37 [PATCH v4 00/11] Added missing changes for Turbo feature on SKL akash.goel
2015-03-06 5:37 ` [PATCH 01/11] drm/i915/skl: Added new macros akash.goel
2015-03-11 19:12 ` Ville Syrjälä
2015-03-06 5:37 ` [PATCH 02/11] drm/i915/skl: Updated intel_gpu_freq() and intel_freq_opcode() akash.goel
2015-03-06 5:37 ` [PATCH 03/11] drm/i915/skl: Updated the gen6_init_rps_frequencies function akash.goel
2015-03-11 19:12 ` Ville Syrjälä
2015-03-06 5:37 ` [PATCH 04/11] drm/i915/skl: Updated the gen6_set_rps function akash.goel
2015-03-06 5:37 ` [PATCH 05/11] drm/i915/skl: Restructured the gen6_set_rps_thresholds function akash.goel
2015-03-06 5:37 ` [PATCH 06/11] drm/i915/skl: Updated the gen6_rps_limits function akash.goel
2015-03-06 5:37 ` [PATCH 07/11] drm/i915/skl: Updated the gen9_enable_rps function akash.goel
2015-03-11 19:27 ` Jesse Barnes
2015-03-11 19:46 ` Chris Wilson
2015-03-11 20:08 ` Jesse Barnes
2015-03-11 20:39 ` Daniel Vetter
2015-03-06 5:37 ` [PATCH 08/11] drm/i915/skl: Updated the i915_frequency_info debugfs function akash.goel
2015-03-11 20:48 ` Ville Syrjälä [this message]
2015-03-06 5:37 ` [PATCH 09/11] drm/i915/skl: Updated the act_freq_mhz_show sysfs function akash.goel
2015-03-06 5:37 ` [PATCH 10/11] drm/i915/skl: Enabling processing of Turbo interrupts akash.goel
2015-03-11 19:23 ` Jesse Barnes
2015-03-06 5:37 ` [PATCH 11/11] drm/i915/skl: Enable the RPS interrupts programming akash.goel
2015-03-06 19:44 ` shuang.he
2015-03-11 21:12 ` Jesse Barnes
2015-03-12 9:14 ` Daniel Vetter
2015-03-12 22:08 ` [PATCH v4 00/11] Added missing changes for Turbo feature on SKL Jesse Barnes
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=20150311204803.GA11371@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox