[Intel-gfx] [PATCH 4/7] drm/i915: Convert debugfs to use generic residency calculator

Mika Kuoppala mika.kuoppala at linux.intel.com
Tue Mar 14 13:17:26 UTC 2017


Use intel_rc6_residency to get benefit for increased resolution
in byt/chv.

Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 9db6b04..407a198 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1487,10 +1487,10 @@ static int vlv_drpc_info(struct seq_file *m)
 	seq_printf(m, "Media Power Well: %s\n",
 		   (pw_status & VLV_GTLC_PW_MEDIA_STATUS_MASK) ? "Up" : "Down");
 
-	seq_printf(m, "Render RC6 residency since boot: %u\n",
-		   I915_READ(VLV_GT_RENDER_RC6));
-	seq_printf(m, "Media RC6 residency since boot: %u\n",
-		   I915_READ(VLV_GT_MEDIA_RC6));
+	seq_printf(m, "Render RC6 residency since boot: %llu us\n",
+		   intel_rc6_residency_us(dev_priv, VLV_GT_RENDER_RC6));
+	seq_printf(m, "Media RC6 residency since boot: %llu us\n",
+		   intel_rc6_residency_us(dev_priv, VLV_GT_MEDIA_RC6));
 
 	return i915_forcewake_domains(m, NULL);
 }
@@ -1583,14 +1583,14 @@ static int gen6_drpc_info(struct seq_file *m)
 	}
 
 	/* Not exactly sure what this is */
-	seq_printf(m, "RC6 \"Locked to RPn\" residency since boot: %u\n",
-		   I915_READ(GEN6_GT_GFX_RC6_LOCKED));
-	seq_printf(m, "RC6 residency since boot: %u\n",
-		   I915_READ(GEN6_GT_GFX_RC6));
-	seq_printf(m, "RC6+ residency since boot: %u\n",
-		   I915_READ(GEN6_GT_GFX_RC6p));
-	seq_printf(m, "RC6++ residency since boot: %u\n",
-		   I915_READ(GEN6_GT_GFX_RC6pp));
+	seq_printf(m, "RC6 \"Locked to RPn\" residency since boot: %llu us\n",
+		   intel_rc6_residency_us(dev_priv, GEN6_GT_GFX_RC6_LOCKED));
+	seq_printf(m, "RC6 residency since boot: %llu us\n",
+		   intel_rc6_residency_us(dev_priv, GEN6_GT_GFX_RC6));
+	seq_printf(m, "RC6+ residency since boot: %llu us\n",
+		   intel_rc6_residency_us(dev_priv, GEN6_GT_GFX_RC6p));
+	seq_printf(m, "RC6++ residency since boot: %llu us\n",
+		   intel_rc6_residency_us(dev_priv, GEN6_GT_GFX_RC6pp));
 
 	seq_printf(m, "RC6   voltage: %dmV\n",
 		   GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
-- 
2.7.4



More information about the Intel-gfx mailing list