All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Show RPS autotuning thresholds along with waitboost
@ 2016-08-14  8:52 Chris Wilson
  2016-08-14  9:21 ` ✗ Ro.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2016-08-14  8:52 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rainer Hochecker

For convenience when debugging user issues show the autotuning
RPS parameters in debugfs/i915_rps_boost_info.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rainer Hochecker <fernetmenta@kodi.tv>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 4ad2355f510a..d7c2064c28bd 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2340,6 +2340,16 @@ static int count_irq_waiters(struct drm_i915_private *i915)
 	return count;
 }
 
+static const char *rps_power_to_str(int power)
+{
+	switch (power) {
+	default: return "unknown";
+	case LOW_POWER: return "low power";
+	case BETWEEN: return "mixed";
+	case HIGH_POWER: return "high power";
+	}
+}
+
 static int i915_rps_boost_info(struct seq_file *m, void *data)
 {
 	struct drm_info_node *node = m->private;
@@ -2377,6 +2387,27 @@ static int i915_rps_boost_info(struct seq_file *m, void *data)
 	spin_unlock(&dev_priv->rps.client_lock);
 	mutex_unlock(&dev->filelist_mutex);
 
+	if (INTEL_GEN(dev_priv) >= 6) {
+		u32 rpupei, rpcurup;
+		u32 rpdownei, rpcurdown;
+
+		intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
+		rpupei = I915_READ_FW(GEN6_RP_CUR_UP_EI) & GEN6_CURICONT_MASK;
+		rpcurup = I915_READ_FW(GEN6_RP_CUR_UP) & GEN6_CURBSYTAVG_MASK;
+		rpdownei = I915_READ_FW(GEN6_RP_CUR_DOWN_EI) & GEN6_CURIAVG_MASK;
+		rpcurdown = I915_READ_FW(GEN6_RP_CUR_DOWN) & GEN6_CURBSYTAVG_MASK;
+		intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
+
+		seq_printf(m, "\nRPS Autotuning (current \"%s\" window):\n",
+			   rps_power_to_str(dev_priv->rps.power));
+		seq_printf(m, "  Avg. busy: %d%% [threshold %d%%]\n",
+			   100*rpcurup/rpupei,
+			   dev_priv->rps.up_threshold);
+		seq_printf(m, "  Avg. idle: %d%% [threshold %d%%]\n",
+			   100*rpcurdown/rpdownei,
+			   dev_priv->rps.down_threshold);
+	}
+
 	return 0;
 }
 
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-15  8:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-14  8:52 [PATCH] drm/i915: Show RPS autotuning thresholds along with waitboost Chris Wilson
2016-08-14  9:21 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-14 13:28 ` [PATCH v2] " Chris Wilson
2016-08-14 13:58   ` kbuild test robot
2016-08-15  8:27   ` David Weinehall
2016-08-14 13:52 ` ✗ Ro.CI.BAT: failure for drm/i915: Show RPS autotuning thresholds along with waitboost (rev2) Patchwork

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.