Allow specifying virtual devices now
PATCH 1/1 Allow specifying virtual devices now
Now you can specify a device not present in the system for the purposes of using the --lookup command (also -lr and -lb). Handy for decoding register dumps for ASICs you don't have access to.
Simply use the --force command with a '.' prefix, e.g.
umr -f .vega10 -lb
Can be combined with NPI scripts as well, e.g.
umr -f .@/home/user/device.npi -lb
Signed-off-by Tom St Denis <[email protected]>
--- doc/umr.1 | 5 ++++- src/lib/discover.c | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
doc/umr.1 +4 -1
@@ -16,7 +16,10 @@ where 0 is the first card probed. Select a GFX INSTANCE/SH/SE bank in decimal. Can use 'x' to denote a broadcast selection. .IP "--force -f <number>" Force a PCIE Device ID in hex or by asic name. This is used in case the amdgpu driver -is not yet loaded or a display is not yet attached. +is not yet loaded or a display is not yet attached. A '@' prefix will specify a path to + an NPI script, for instance, '@/home/user/device.npi'. A '.' prefix will specify a virtual +device which is handy for looking up register decodings for a device not present in the system, +for instance, '.vega10'. .IP "--pci <device>" Force a specific PCI device using the domain:bus:slot.function format in hex. This is useful when more than one GPU is available. If the amdgpu driver is
src/lib/discover.c +8 -0
@@ -103,6 +103,14 @@ struct umr_asic *umr_discover_asic(struct umr_options *options)long trydid = options->forcedid;int busmatch =0 , parsed_did, need_config_scan =0 ; +// virtual device +if (options->dev_name[0 ] =='.' ) { + asic =umr_discover_asic_by_name (options, options->dev_name +1 ); +if (asic) + asic->options = *options; +return asic; + } +// Try to map to instance if we have a specific pci device if (options->pci.domain || options->pci.bus || options->pci.slot || options->pci.func) {
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx