aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJyoti Yadav <jyoti.r.yadav@intel.com>2018-10-05 14:08:46 -0400
committerRodrigo Vivi <rodrigo.vivi@intel.com>2018-10-12 18:44:32 -0400
commit27d7aaae0fd7d7feb232f267c85370da04b593a4 (patch)
tree026fcabc0c4902f745b6056f14f848c9fa75e38a
parentb9117149fefdcdc6fcd12a14a26d71979582c057 (diff)
drm/i915/csr Added DC5 and DC6 counter register for ICL in debugfs entry.
DC5 and DC6 counter register tells about residency of DC5 and DC6. Added the same in debugfs file. v2 : Remove csr_version check. Added generic check regarding DC counters for Gen9 onwards. (Rodrigo) v3 : Simplified gen checks. (Chris) v4 : Simplified "if" ladder for multiple gens. v5 : Removed unnecessary comment. Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1538762926-4880-1-git-send-email-jyoti.r.yadav@intel.com
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 00c551d3e409..7b7f844d325b 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2916,15 +2916,14 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
2916 seq_printf(m, "version: %d.%d\n", CSR_VERSION_MAJOR(csr->version), 2916 seq_printf(m, "version: %d.%d\n", CSR_VERSION_MAJOR(csr->version),
2917 CSR_VERSION_MINOR(csr->version)); 2917 CSR_VERSION_MINOR(csr->version));
2918 2918
2919 if (IS_KABYLAKE(dev_priv) || 2919 if (IS_BROXTON(dev_priv)) {
2920 (IS_SKYLAKE(dev_priv) && csr->version >= CSR_VERSION(1, 6))) { 2920 seq_printf(m, "DC3 -> DC5 count: %d\n",
2921 I915_READ(BXT_CSR_DC3_DC5_COUNT));
2922 } else if (IS_GEN(dev_priv, 9, 11)) {
2921 seq_printf(m, "DC3 -> DC5 count: %d\n", 2923 seq_printf(m, "DC3 -> DC5 count: %d\n",
2922 I915_READ(SKL_CSR_DC3_DC5_COUNT)); 2924 I915_READ(SKL_CSR_DC3_DC5_COUNT));
2923 seq_printf(m, "DC5 -> DC6 count: %d\n", 2925 seq_printf(m, "DC5 -> DC6 count: %d\n",
2924 I915_READ(SKL_CSR_DC5_DC6_COUNT)); 2926 I915_READ(SKL_CSR_DC5_DC6_COUNT));
2925 } else if (IS_BROXTON(dev_priv) && csr->version >= CSR_VERSION(1, 4)) {
2926 seq_printf(m, "DC3 -> DC5 count: %d\n",
2927 I915_READ(BXT_CSR_DC3_DC5_COUNT));
2928 } 2927 }
2929 2928
2930out: 2929out: