* [PATCH] drm/i915: add rc6 residency times to debugfs
@ 2012-03-23 1:42 Ben Widawsky
2012-03-23 16:43 ` Eugeni Dodonov
0 siblings, 1 reply; 5+ messages in thread
From: Ben Widawsky @ 2012-03-23 1:42 UTC (permalink / raw)
To: intel-gfx; +Cc: Ben Widawsky, Arjan van de Ven
RC6 residency should be in intervals of 1.28us, and the counter wraps.
Here is an example using awk to get the RC6 and RC6+ residency 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.
CC: Arjan van de Ven <arjan@linux.intel.com>
CC: Ouping Zhang <ouping.zhang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++
drivers/gpu/drm/i915/i915_reg.h | 3 +++
2 files changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 66c90d4..cd67d3c 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1133,6 +1133,12 @@ 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 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));
return 0;
}
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 52a06be..5382d8b 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3791,6 +3791,9 @@
GEN6_PM_RP_DOWN_THRESHOLD | \
GEN6_PM_RP_DOWN_TIMEOUT)
+#define GEN6_GT_GFX_RC6 0x138108
+#define GEN6_GT_GFX_RC6p 0x13810C
+
#define GEN6_PCODE_MAILBOX 0x138124
#define GEN6_PCODE_READY (1<<31)
#define GEN6_READ_OC_PARAMS 0xc
--
1.7.9.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: add rc6 residency times to debugfs
2012-03-23 1:42 [PATCH] drm/i915: add rc6 residency times to debugfs Ben Widawsky
@ 2012-03-23 16:43 ` Eugeni Dodonov
2012-03-23 18:44 ` Ben Widawsky
2012-03-24 14:58 ` Daniel Vetter
0 siblings, 2 replies; 5+ messages in thread
From: Eugeni Dodonov @ 2012-03-23 16:43 UTC (permalink / raw)
To: Ben Widawsky; +Cc: intel-gfx, Arjan van de Ven
[-- Attachment #1.1: Type: text/plain, Size: 765 bytes --]
On Thu, Mar 22, 2012 at 22:42, 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 RC6 and RC6+ residency 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.
>
Note that we already have this in intel_reg_dumper as well, since
http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=47a5bc505cb972cc94f1fbd9882d4e5c2e72ac43
.
But if it makes sense to include it into kernel as well, why not?
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
--
Eugeni Dodonov
<http://eugeni.dodonov.net/>
[-- Attachment #1.2: Type: text/html, Size: 1347 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: add rc6 residency times to debugfs
2012-03-23 16:43 ` Eugeni Dodonov
@ 2012-03-23 18:44 ` Ben Widawsky
2012-03-24 14:58 ` Daniel Vetter
1 sibling, 0 replies; 5+ messages in thread
From: Ben Widawsky @ 2012-03-23 18:44 UTC (permalink / raw)
To: Eugeni Dodonov; +Cc: intel-gfx, Arjan van de Ven
On Fri, 23 Mar 2012 13:43:22 -0300
Eugeni Dodonov <eugeni@dodonov.net> wrote:
> On Thu, Mar 22, 2012 at 22:42, 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 RC6 and RC6+
> > residency 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.
> >
>
> Note that we already have this in intel_reg_dumper as well, since
> http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=47a5bc505cb972cc94f1fbd9882d4e5c2e72ac43
> .
>
> But if it makes sense to include it into kernel as well, why not?
>
Yeah, reg dumper does a whole lot of other stuff in addition to this.
I'd agree it wouldn't be worth adding a new debugfs entry though since
reg dumper does it (obviously intel_reg_read does it too :)).
> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: add rc6 residency times to debugfs
2012-03-23 16:43 ` Eugeni Dodonov
2012-03-23 18:44 ` Ben Widawsky
@ 2012-03-24 14:58 ` Daniel Vetter
2012-03-25 0:01 ` Daniel Vetter
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2012-03-24 14:58 UTC (permalink / raw)
To: Eugeni Dodonov; +Cc: Ben Widawsky, Arjan van de Ven, intel-gfx
On Fri, Mar 23, 2012 at 01:43:22PM -0300, Eugeni Dodonov wrote:
> On Thu, Mar 22, 2012 at 22:42, 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 RC6 and RC6+ residency 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.
> >
>
> Note that we already have this in intel_reg_dumper as well, since
> http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=47a5bc505cb972cc94f1fbd9882d4e5c2e72ac43
> .
>
> But if it makes sense to include it into kernel as well, why not?
>
> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Queued for -next, thanks for the patch and review.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: add rc6 residency times to debugfs
2012-03-24 14:58 ` Daniel Vetter
@ 2012-03-25 0:01 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2012-03-25 0:01 UTC (permalink / raw)
To: Eugeni Dodonov; +Cc: Ben Widawsky, Arjan van de Ven, intel-gfx
On Sat, Mar 24, 2012 at 03:58:01PM +0100, Daniel Vetter wrote:
> On Fri, Mar 23, 2012 at 01:43:22PM -0300, Eugeni Dodonov wrote:
> > On Thu, Mar 22, 2012 at 22:42, 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 RC6 and RC6+ residency 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.
> > >
> >
> > Note that we already have this in intel_reg_dumper as well, since
> > http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=47a5bc505cb972cc94f1fbd9882d4e5c2e72ac43
> > .
> >
> > But if it makes sense to include it into kernel as well, why not?
> >
> > Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
>
> Queued for -next, thanks for the patch and review.
Unqueued after some irc discussion with Ben, looks like we don't yet fully
understand how this works (and at least an rc6pp reg seems to be missing).
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-25 0:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-23 1:42 [PATCH] drm/i915: add rc6 residency times to debugfs Ben Widawsky
2012-03-23 16:43 ` Eugeni Dodonov
2012-03-23 18:44 ` Ben Widawsky
2012-03-24 14:58 ` Daniel Vetter
2012-03-25 0:01 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox