From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: jeff.mcgee@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/chv: Add CHV HW status to SSEU status
Date: Fri, 27 Feb 2015 20:36:52 +0200 [thread overview]
Message-ID: <20150227183652.GT11371@intel.com> (raw)
In-Reply-To: <1425061352-29188-3-git-send-email-jeff.mcgee@intel.com>
On Fri, Feb 27, 2015 at 10:22:32AM -0800, jeff.mcgee@intel.com wrote:
> From: Jeff McGee <jeff.mcgee@intel.com>
>
> Collect the currently enabled counts of slice, subslice, and
> execution units using the power gate control ack message
> registers specific to Cherryview.
>
> Slice/subslice/EU info and hardware status can now be
> determined for CHV, so allow the debugfs SSEU status dump
> to proceed for CHV devices.
>
> Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 31 +++++++++++++++++++++++++++++--
> drivers/gpu/drm/i915/i915_reg.h | 11 +++++++++++
> 2 files changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 94b3984..e42e79a 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4362,7 +4362,7 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
> struct drm_i915_private *dev_priv = dev->dev_private;
> unsigned int s_tot = 0, ss_tot = 0, ss_per = 0, eu_tot = 0, eu_per = 0;
>
> - if (INTEL_INFO(dev)->gen < 9)
> + if ((INTEL_INFO(dev)->gen < 8) || IS_BROADWELL(dev))
> return -ENODEV;
>
> seq_puts(m, "SSEU Device Info\n");
> @@ -4384,7 +4384,34 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
> yesno(INTEL_INFO(dev)->has_eu_pg));
>
> seq_puts(m, "SSEU Device Status\n");
> - if (IS_SKYLAKE(dev)) {
> + if (IS_CHERRYVIEW(dev)) {
> + const int ss_max = 2;
> + int ss;
> + u32 sig1[ss_max], sig2[ss_max];
> +
> + sig1[0] = I915_READ(CHV_POWER_SS0_SIG1);
> + sig1[1] = I915_READ(CHV_POWER_SS1_SIG1);
> + sig2[0] = I915_READ(CHV_POWER_SS0_SIG2);
> + sig2[1] = I915_READ(CHV_POWER_SS1_SIG2);
> +
> + for (ss = 0; ss < ss_max; ss++) {
> + unsigned int eu_cnt;
> +
> + if (sig1[ss] & CHV_SS_PG_ENABLE)
> + /* skip disabled subslice */
> + continue;
> +
> + s_tot = 1;
> + ss_per++;
> + eu_cnt = ((sig1[ss] & CHV_EU08_PG_ENABLE) ? 0 : 2) +
> + ((sig1[ss] & CHV_EU19_PG_ENABLE) ? 0 : 2) +
> + ((sig1[ss] & CHV_EU210_PG_ENABLE) ? 0 : 2) +
> + ((sig2[ss] & CHV_EU311_PG_ENABLE) ? 0 : 2);
> + eu_tot += eu_cnt;
> + eu_per = max(eu_per, eu_cnt);
> + }
> + ss_tot = ss_per;
> + } else if (IS_SKYLAKE(dev)) {
> const int s_max = 3, ss_max = 4;
> int s, ss;
> u32 s_reg[s_max], eu_reg[2*s_max], eu_mask[2];
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index a8b205d..659aefc 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -6227,6 +6227,17 @@ enum skl_disp_power_wells {
> #define GEN6_RC6 3
> #define GEN6_RC7 4
>
> +#define CHV_POWER_SS0_SIG1 0xa720
> +#define CHV_POWER_SS1_SIG1 0xa728
> +#define CHV_SS_PG_ENABLE (1<<1)
> +#define CHV_EU08_PG_ENABLE (1<<9)
> +#define CHV_EU19_PG_ENABLE (1<<17)
> +#define CHV_EU210_PG_ENABLE (1<<25)
> +
> +#define CHV_POWER_SS0_SIG2 0xa724
> +#define CHV_POWER_SS1_SIG2 0xa72c
> +#define CHV_EU311_PG_ENABLE (1<<1)
> +
> #define GEN9_SLICE0_PGCTL_ACK 0x804c
> #define GEN9_SLICE1_PGCTL_ACK 0x8050
> #define GEN9_SLICE2_PGCTL_ACK 0x8054
> --
> 2.3.0
--
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-02-27 18:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 18:22 [PATCH 0/2] SSEU detection for CHV jeff.mcgee
2015-02-27 18:22 ` [PATCH 1/2] drm/i915/chv: Determine CHV slice/subslice/EU info jeff.mcgee
2015-02-27 18:29 ` Ville Syrjälä
2015-02-27 18:22 ` [PATCH 2/2] drm/i915/chv: Add CHV HW status to SSEU status jeff.mcgee
2015-02-27 18:36 ` Ville Syrjälä [this message]
2015-03-03 7:28 ` shuang.he
2015-02-27 20:12 ` [PATCH v2 1/2] drm/i915/chv: Determine CHV slice/subslice/EU info jeff.mcgee
2015-02-27 20:12 ` Ville Syrjälä
2015-03-03 1:33 ` Jeff McGee
2015-03-07 1:38 ` [PATCH 0/2] SSEU detection for CHV Jeff McGee
2015-03-09 8:40 ` Daniel Vetter
2015-03-09 16:41 ` Jeff McGee
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=20150227183652.GT11371@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jeff.mcgee@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.