summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2014-10-07 17:21:27 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-10-24 16:34:08 +0200
commit2fa60f6d515b509b05f6a96afc83ac9629d6401b (patch)
treee88db803e364b5735af9a57498ad863e241bd015 /drivers/gpu/drm/i915/i915_debugfs.c
parent7225342ab501befdb64bcec76ded41f5897c0855 (diff)
downloadlwn-2fa60f6d515b509b05f6a96afc83ac9629d6401b.tar.gz
lwn-2fa60f6d515b509b05f6a96afc83ac9629d6401b.zip
drm/i915: Check workaround status on dfs read time
As the workaround list has the value as initialization time constant, we can do the simple checking on the go without negleting igt. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 62c111b1f0d8..6f8c9d780632 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2657,16 +2657,16 @@ static int i915_wa_registers(struct seq_file *m, void *unused)
seq_printf(m, "Workarounds applied: %d\n", dev_priv->workarounds.count);
for (i = 0; i < dev_priv->workarounds.count; ++i) {
- u32 addr, mask;
+ u32 addr, mask, value, read;
+ bool ok;
addr = dev_priv->workarounds.reg[i].addr;
mask = dev_priv->workarounds.reg[i].mask;
- dev_priv->workarounds.reg[i].value = I915_READ(addr) | mask;
- if (dev_priv->workarounds.reg[i].addr)
- seq_printf(m, "0x%X: 0x%08X, mask: 0x%08X\n",
- dev_priv->workarounds.reg[i].addr,
- dev_priv->workarounds.reg[i].value,
- dev_priv->workarounds.reg[i].mask);
+ value = dev_priv->workarounds.reg[i].value;
+ read = I915_READ(addr);
+ ok = (value & mask) == (read & mask);
+ seq_printf(m, "0x%X: 0x%08X, mask: 0x%08X, read: 0x%08x, status: %s\n",
+ addr, value, mask, read, ok ? "OK" : "FAIL");
}
intel_runtime_pm_put(dev_priv);