[Intel-gfx] [PATCH 1/2] intel_reg_dumper: Add a single register decode mode

Jani Nikula jani.nikula at linux.intel.com
Mon Sep 3 09:06:45 CEST 2012


On Sun, 02 Sep 2012, Ben Widawsky <ben at bwidawsk.net> wrote:
> On 2012-08-31 06:45, Damien Lespiau wrote:
>> From: Damien Lespiau <damien.lespiau at intel.com>
>>
>> From time to time, one would like to decode a register value that 
>> have
>> been captured at a certain point in time (and say printed out with a
>> printk). intel_reg_dumper has all the knowledge to do that and this
>> patch adds a way to ask it to decode a value.
>>
>> Example usage:
>>
>> $ ./tools/intel_reg_dumper PCH_PP_CONTROL 0xabcd0002
>>        PCH_PP_CONTROL: 0xabcd0002 (blacklight disabled, power...
>>
>> v2: friendlier invocation (Chris Wilson)
>>
>> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
>
> Back to my earlier complaint from the other patch... If the names don't 
> match the docs then you forced to memorize our historically awful naming 
> scheme. More useful to me would be to decode a register at an offset for 
> a given generation.

I think both would be useful. So how about supporting both? Concrete
suggestion:

1) If strtoul eats whole of register name, it's register offset. Print
*all* matches across *all* generations.

2) If it's a register name, print *all* partial matches (from beginning
of string) across *all* generations.

3) Include generation and register offset in the output:
   Gen5: PCH_PP_CONTROL (0xc7204): 0xabcd0002 (blacklight disabled, power...

This would help in cross checking historically awful naming against
register offsets, and help in checking for differences between registers
and their values across generations.

These patches could also go in first, and the above added later.


BR,
Jani.



More information about the Intel-gfx mailing list