Skip to content

Commit 34b2f8d

Browse files
committed
drm/i915/gen9_lp: Fix DMC DC counter debugfs output
On GEN9 LP (BXT/GLK) DC6 is not supported, so don't print the counter on those platforms. So far we did this on GLK too. While at it warn if we forgot to adjust the printout properly for a new platform. (Rodrigo) Testcase: igt/pm_dc/dc6-dpms Cc: Jyoti Yadav <jyoti.r.yadav@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181031200220.11608-1-imre.deak@intel.com
1 parent 93b662d commit 34b2f8d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,15 +2916,15 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
29162916
seq_printf(m, "version: %d.%d\n", CSR_VERSION_MAJOR(csr->version),
29172917
CSR_VERSION_MINOR(csr->version));
29182918

2919-
if (IS_BROXTON(dev_priv)) {
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)) {
2923-
seq_printf(m, "DC3 -> DC5 count: %d\n",
2924-
I915_READ(SKL_CSR_DC3_DC5_COUNT));
2919+
if (WARN_ON(INTEL_GEN(dev_priv) > 11))
2920+
goto out;
2921+
2922+
seq_printf(m, "DC3 -> DC5 count: %d\n",
2923+
I915_READ(IS_BROXTON(dev_priv) ? BXT_CSR_DC3_DC5_COUNT :
2924+
SKL_CSR_DC3_DC5_COUNT));
2925+
if (!IS_GEN9_LP(dev_priv))
29252926
seq_printf(m, "DC5 -> DC6 count: %d\n",
29262927
I915_READ(SKL_CSR_DC5_DC6_COUNT));
2927-
}
29282928

29292929
out:
29302930
seq_printf(m, "program base: 0x%08x\n", I915_READ(CSR_PROGRAM(0)));

0 commit comments

Comments
 (0)