From: Ben Widawsky <ben@bwidawsk.net>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: add rc6 residency times to debugfs
Date: Sat, 24 Mar 2012 19:22:28 -0700 [thread overview]
Message-ID: <20120324192228.4129857e@bwidawsk.net> (raw)
In-Reply-To: <1332641388-7688-1-git-send-email-ben@bwidawsk.net>
On Sat, 24 Mar 2012 19:09:44 -0700
Ben Widawsky <ben@bwidawsk.net> wrote:
> RC6 residency should be in intervals of 1.28us, and the counter wraps.
> Here is an example using awk to get the various RC6 and RC6+ residency
> times in seconds, since boot.
>
> cat /sys/kernel/debug/dri/0/i915_drpc_info | grep residency | awk
> -F':' -F' ' '{print $5 * 1.28 / 1000000}'
>
> This is primarily for QA, but has other applications as well. An
> upcoming patch to add interfaces should be more interesting to
> application developers.
>
> CC: Ouping Zhang <ouping.zhang@intel.com>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 11 +++++++++++
> drivers/gpu/drm/i915/i915_reg.h | 5 +++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c
> b/drivers/gpu/drm/i915/i915_debugfs.c index 66c90d4..72457ff 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1133,6 +1133,17 @@ static int gen6_drpc_info(struct seq_file *m)
>
> seq_printf(m, "Core Power Down: %s\n",
> yesno(gt_core_status & GEN6_CORE_CPD_STATE_MASK));
> +
> + seq_printf(m, "RC6 \"Locked to RPn\" residency since boot:
> %d\n",
> + I915_READ(GEN6_GT_GFX_RC6_LOCKED));
> + /* Not exactly sure what this is */
> + seq_printf(m, "RC6 residency since boot: %d\n",
> + I915_READ(GEN6_GT_GFX_RC6));
> + seq_printf(m, "RC6+ residency since boot: %d\n",
> + I915_READ(GEN6_GT_GFX_RC6p));
> + seq_printf(m, "RC6++ residency since boot: %d\n",
> + I915_READ(GEN6_GT_GFX_RC6pp));
> +
> return 0;
> }
As noted in patch 3, this was a stale patch, and the comment belongs
for the Locked to RPn.
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> b/drivers/gpu/drm/i915/i915_reg.h index f3609f2..b1c3d35 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -3799,6 +3799,11 @@
> GEN6_PM_RP_DOWN_THRESHOLD
> | \ GEN6_PM_RP_DOWN_TIMEOUT)
>
> +#define GEN6_GT_GFX_RC6_LOCKED 0x138104
> +#define GEN6_GT_GFX_RC6 0x138108
> +#define GEN6_GT_GFX_RC6p 0x13810C
> +#define GEN6_GT_GFX_RC6pp 0x138110
> +
> #define GEN6_PCODE_MAILBOX 0x138124
> #define GEN6_PCODE_READY (1<<31)
> #define GEN6_READ_OC_PARAMS 0xc
prev parent reply other threads:[~2012-03-25 2:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-25 2:09 [PATCH 1/3] drm/i915: add rc6 residency times to debugfs Ben Widawsky
2012-03-25 2:09 ` [PATCH 2/3] drm/i915: extract intel_enable_rc6() Ben Widawsky
2012-03-25 12:10 ` Daniel Vetter
2012-03-29 0:30 ` Ben Widawsky
2012-03-25 2:09 ` [PATCH 3/3] drm/i915: rc6 in sysfs Ben Widawsky
2012-03-25 2:14 ` Ben Widawsky
2012-03-25 12:15 ` Daniel Vetter
2012-03-29 0:31 ` Ben Widawsky
2012-03-25 2:09 ` [PATCH 1/2] build: make sure we have asprintf Ben Widawsky
2012-03-25 2:09 ` [PATCH 2/2] tests: rc6 residency test Ben Widawsky
2012-03-25 12:21 ` Daniel Vetter
2012-03-25 2:22 ` Ben Widawsky [this message]
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=20120324192228.4129857e@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=daniel.vetter@ffwll.ch \
--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