Re: [PATCH 08/11] drm/i915: Print all workaround types correctly in debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/11/2017 11:41 AM, Chris Wilson wrote:
Quoting Oscar Mateo (2017-10-11 19:15:18)
Let's try to make sure that all WAs are applied correctly and survive
resumes, resets, etc... (with some help from a companion i-g-t patch).

Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_debugfs.c | 48 ++++++++++++++++++++++++++-----------
  1 file changed, 34 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index f108f53..fb49eac 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3399,6 +3399,20 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)
         return 0;
  }
+static void check_wa_register(struct seq_file *m, struct i915_wa_reg *wa_reg)
+{
+       struct drm_i915_private *dev_priv = node_to_i915(m->private);
+       u32 read;
+       bool ok;
+
+       read = I915_READ(wa_reg->addr);
+       ok = (wa_reg->value & wa_reg->mask) == (read & wa_reg->mask);
+       seq_printf(m, "0x%X: 0x%08x, mask: 0x%08x, read: 0x%08x, status: %s\n",
+                  i915_mmio_reg_offset(wa_reg->addr),
+                  wa_reg->value, wa_reg->mask, read,
+                  ok ? "OK" : "FAIL");
So one thing I've been considering is adding the Wa name for easier
cross-referencing. I am just worried about the number of strings and
whether we should put those names anywhere near user visible output.
-Chris

This would fit nicely with the static table proposed by Joonas, but I really don't know if we want the names in visible output...
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux