diff mbox

drm/i915: Dump RP interrupt limits into debugfs/i915_cur_delayinfo

Message ID 1354534494-3310-1-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Dec. 3, 2012, 11:34 a.m. UTC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_debugfs.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 58e6676..5359f376 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -882,11 +882,11 @@  static int i915_cur_delayinfo(struct seq_file *m, void *unused)
 		seq_printf(m, "Current P-state: %d\n",
 			   (rgvstat & MEMSTAT_PSTATE_MASK) >> MEMSTAT_PSTATE_SHIFT);
 	} else if (IS_GEN6(dev) || IS_GEN7(dev)) {
-		u32 gt_perf_status = I915_READ(GEN6_GT_PERF_STATUS);
-		u32 rp_state_limits = I915_READ(GEN6_RP_STATE_LIMITS);
-		u32 rp_state_cap = I915_READ(GEN6_RP_STATE_CAP);
-		u32 rpstat;
-		u32 rpupei, rpcurup, rpprevup;
+		u32 gt_perf_status;
+		u32 rp_state_limits;
+		u32 rp_interrupt_limits;
+		u32 rp_state_cap;
+		u32 rpstat, rpupei, rpcurup, rpprevup;
 		u32 rpdownei, rpcurdown, rpprevdown;
 		int max_freq;
 
@@ -897,6 +897,11 @@  static int i915_cur_delayinfo(struct seq_file *m, void *unused)
 
 		gen6_gt_force_wake_get(dev_priv);
 
+		gt_perf_status = I915_READ(GEN6_GT_PERF_STATUS);
+		rp_state_limits = I915_READ(GEN6_RP_STATE_LIMITS);
+		rp_interrupt_limits = I915_READ(GEN6_RP_INTERRUPT_LIMITS);
+		rp_state_cap = I915_READ(GEN6_RP_STATE_CAP);
+
 		rpstat = I915_READ(GEN6_RPSTAT1);
 		rpupei = I915_READ(GEN6_RP_CUR_UP_EI);
 		rpcurup = I915_READ(GEN6_RP_CUR_UP);
@@ -916,6 +921,10 @@  static int i915_cur_delayinfo(struct seq_file *m, void *unused)
 			   gt_perf_status & 0xff);
 		seq_printf(m, "Render p-state limit: %d\n",
 			   rp_state_limits & 0xff);
+		seq_printf(m, "Render up-interrupt threshold: %d\n",
+			   (rp_interrupt_limits >> 24 & 0xff) * GT_FREQUENCY_MULTIPLIER);
+		seq_printf(m, "Render down-interrupt threshold: %d\n",
+			   (rp_interrupt_limits >> 16 & 0xff) * GT_FREQUENCY_MULTIPLIER);
 		seq_printf(m, "CAGF: %dMHz\n", ((rpstat & GEN6_CAGF_MASK) >>
 						GEN6_CAGF_SHIFT) * GT_FREQUENCY_MULTIPLIER);
 		seq_printf(m, "RP CUR UP EI: %dus\n", rpupei &