aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-26 18:51:01 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-03 05:12:28 -0400
commit8e8c06cd34dbd68d36b0c561b8850478ddc5fb84 (patch)
tree7b22b31e5e52cab7098962b696258b68f57820a4 /drivers/gpu/drm/i915
parent10603caacf599297c7da0c4f4db440d015b8131a (diff)
drm/i915: Report requested frequency alongside current frequency in debugfs
It can be useful to compare at times the current vs requested frequency of the GPU, so provide the contents of RPNSWREQ alonside CAGF. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 55ab9246e1b9..a6f4cb5af185 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -857,7 +857,7 @@ static int i915_cur_delayinfo(struct seq_file *m, void *unused)
857 u32 gt_perf_status = I915_READ(GEN6_GT_PERF_STATUS); 857 u32 gt_perf_status = I915_READ(GEN6_GT_PERF_STATUS);
858 u32 rp_state_limits = I915_READ(GEN6_RP_STATE_LIMITS); 858 u32 rp_state_limits = I915_READ(GEN6_RP_STATE_LIMITS);
859 u32 rp_state_cap = I915_READ(GEN6_RP_STATE_CAP); 859 u32 rp_state_cap = I915_READ(GEN6_RP_STATE_CAP);
860 u32 rpstat, cagf; 860 u32 rpstat, cagf, reqf;
861 u32 rpupei, rpcurup, rpprevup; 861 u32 rpupei, rpcurup, rpprevup;
862 u32 rpdownei, rpcurdown, rpprevdown; 862 u32 rpdownei, rpcurdown, rpprevdown;
863 int max_freq; 863 int max_freq;
@@ -869,6 +869,14 @@ static int i915_cur_delayinfo(struct seq_file *m, void *unused)
869 869
870 gen6_gt_force_wake_get(dev_priv); 870 gen6_gt_force_wake_get(dev_priv);
871 871
872 reqf = I915_READ(GEN6_RPNSWREQ);
873 reqf &= ~GEN6_TURBO_DISABLE;
874 if (IS_HASWELL(dev))
875 reqf >>= 24;
876 else
877 reqf >>= 25;
878 reqf *= GT_FREQUENCY_MULTIPLIER;
879
872 rpstat = I915_READ(GEN6_RPSTAT1); 880 rpstat = I915_READ(GEN6_RPSTAT1);
873 rpupei = I915_READ(GEN6_RP_CUR_UP_EI); 881 rpupei = I915_READ(GEN6_RP_CUR_UP_EI);
874 rpcurup = I915_READ(GEN6_RP_CUR_UP); 882 rpcurup = I915_READ(GEN6_RP_CUR_UP);
@@ -893,6 +901,7 @@ static int i915_cur_delayinfo(struct seq_file *m, void *unused)
893 gt_perf_status & 0xff); 901 gt_perf_status & 0xff);
894 seq_printf(m, "Render p-state limit: %d\n", 902 seq_printf(m, "Render p-state limit: %d\n",
895 rp_state_limits & 0xff); 903 rp_state_limits & 0xff);
904 seq_printf(m, "RPNSWREQ: %dMHz\n", reqf);
896 seq_printf(m, "CAGF: %dMHz\n", cagf); 905 seq_printf(m, "CAGF: %dMHz\n", cagf);
897 seq_printf(m, "RP CUR UP EI: %dus\n", rpupei & 906 seq_printf(m, "RP CUR UP EI: %dus\n", rpupei &
898 GEN6_CURICONT_MASK); 907 GEN6_CURICONT_MASK);