@@ -2482,9 +2482,16 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
seq_printf(m, "version: %d.%d\n", CSR_VERSION_MAJOR(csr->version),
CSR_VERSION_MINOR(csr->version));
- if (WARN_ON(INTEL_GEN(dev_priv) > 11))
+ if (WARN_ON(INTEL_GEN(dev_priv) > 12))
goto out;
+ /*
+ * B.Spes specify that DMC_DEBUG3 is general debug register
+ * DMC folks uses this register for DC3CO counter for TGL
+ */
+ if (IS_TIGERLAKE(dev_priv))
+ seq_printf(m, "DC3CO count: %d\n", I915_READ(DMC_DEBUG3));
+
seq_printf(m, "DC3 -> DC5 count: %d\n",
I915_READ(IS_BROXTON(dev_priv) ? BXT_CSR_DC3_DC5_COUNT :
SKL_CSR_DC3_DC5_COUNT));
@@ -7275,6 +7275,9 @@ enum {
#define SKL_CSR_DC5_DC6_COUNT _MMIO(0x8002C)
#define BXT_CSR_DC3_DC5_COUNT _MMIO(0x80038)
+/* DMC DEBUG COUNTERS for TGL*/
+#define DMC_DEBUG3 _MMIO(0x101090) /*DC3CO debug counter*/
+
/* interrupts */
#define DE_MASTER_IRQ_CONTROL (1 << 31)
#define DE_SPRITEB_FLIP_DONE (1 << 29)
Adding DC3CO counter in i915_dmc_info debugfs will be useful for DC3CO validation. DMC firmware uses DMC_DEBUG3 register as DC3CO counter register on TGL, as per B.Specs DMC_DEBUG3 is general purpose register. Cc: Nikula, Jani <jani.nikula@intel.com> Cc: Deak, Imre <imre.deak@intel.com> Cc: Manna, Animesh <animesh.manna@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- drivers/gpu/drm/i915/i915_debugfs.c | 9 ++++++++- drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-)