From 03e8a621ea43931e2e5943431cf4600041afe175 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 10 Oct 2012 18:05:57 +0100 Subject: [PATCH] drm/i915: Dump RP interrupt limits into debugfs/i915_cur_delayinfo Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index c0d1029..50fbc16 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -881,11 +881,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; @@ -896,6 +896,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); @@ -915,6 +920,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 & -- 1.7.10.4