Skip to content
  • Lucas De Marchi's avatar
    intel_reg: Move decoding behind an option · ce6ce0f6
    Lucas De Marchi authored
    
    
    Decoding the register can be only as good as the reg_spec being used.
    The current builtin register spec is not that. Move that decoding behind
    an option to make it better for the normal case when running from the
    repo checkout where the external reg spec is not available. Passing any
    of --decode, --all, --spec brings the old behavior back:
    
    	$ sudo ./build/tools/intel_reg --decode read 0x2358
    	Warning: stat '/usr/local/share/igt-gpu-tools/registers' failed: No such file or directory. Using builtin register spec.
    					    (0x00002358): 0x00000000
    
    vs the new behavior:
    
    	$ sudo ./build/tools/intel_reg --decode read 0x2358
    					    (0x00002358): 0x00000000
    
    We could probably reduce the leading space since we won't have any name,
    but that can be improved later.
    
    v2: Instead of removing the warning, move the whole decoding logic
        behind a command line option
    v3: Some commands also imply --decode
    
    Reviewed-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
    Link: h...
    ce6ce0f6