aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-03-27 21:59:38 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-12 15:14:04 -0400
commitcce66a283e36e7479774de47ae9f33f7db2b8fcf (patch)
tree62692ee5aa2c45b53c50388401f881f92c837ca3 /drivers
parenteffbc4fd8e37e41d6f2bb6bcc611c14b4fbdcf9b (diff)
drm/i915: add rc6 residency times to debugfs
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. v2: move comment to the correct place v3: display with %u instead of %d, for Ouping CC: Ouping Zhang <ouping.zhang@intel.com> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c11
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 967fb928c577..97c963082d4d 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1171,6 +1171,17 @@ static int gen6_drpc_info(struct seq_file *m)
1171 1171
1172 seq_printf(m, "Core Power Down: %s\n", 1172 seq_printf(m, "Core Power Down: %s\n",
1173 yesno(gt_core_status & GEN6_CORE_CPD_STATE_MASK)); 1173 yesno(gt_core_status & GEN6_CORE_CPD_STATE_MASK));
1174
1175 /* Not exactly sure what this is */
1176 seq_printf(m, "RC6 \"Locked to RPn\" residency since boot: %u\n",
1177 I915_READ(GEN6_GT_GFX_RC6_LOCKED));
1178 seq_printf(m, "RC6 residency since boot: %u\n",
1179 I915_READ(GEN6_GT_GFX_RC6));
1180 seq_printf(m, "RC6+ residency since boot: %u\n",
1181 I915_READ(GEN6_GT_GFX_RC6p));
1182 seq_printf(m, "RC6++ residency since boot: %u\n",
1183 I915_READ(GEN6_GT_GFX_RC6pp));
1184
1174 return 0; 1185 return 0;
1175} 1186}
1176 1187
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 6924f44a88df..972321fda4d8 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3970,6 +3970,11 @@
3970 GEN6_PM_RP_DOWN_THRESHOLD | \ 3970 GEN6_PM_RP_DOWN_THRESHOLD | \
3971 GEN6_PM_RP_DOWN_TIMEOUT) 3971 GEN6_PM_RP_DOWN_TIMEOUT)
3972 3972
3973#define GEN6_GT_GFX_RC6_LOCKED 0x138104
3974#define GEN6_GT_GFX_RC6 0x138108
3975#define GEN6_GT_GFX_RC6p 0x13810C
3976#define GEN6_GT_GFX_RC6pp 0x138110
3977
3973#define GEN6_PCODE_MAILBOX 0x138124 3978#define GEN6_PCODE_MAILBOX 0x138124
3974#define GEN6_PCODE_READY (1<<31) 3979#define GEN6_PCODE_READY (1<<31)
3975#define GEN6_READ_OC_PARAMS 0xc 3980#define GEN6_READ_OC_PARAMS 0xc