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

Oscar Mateo oscar.mateo at intel.com
Fri Oct 13 20:51:02 UTC 2017



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 at intel.com>
>> Cc: Chris Wilson <chris at chris-wilson.co.uk>
>> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
>> ---
>>   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...


More information about the Intel-gfx mailing list