On Wednesday, 2018-11-07 10:55:05 +0000, Lionel Landwerlin wrote: > Got tired of remembering the PCI ids. > > Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>
Series is Reviewed-by: Eric Engestrom <eric.engest...@intel.com> > --- > src/intel/tools/intel_dump_gpu.c | 6 ++++++ > src/intel/tools/intel_dump_gpu.in | 27 ++++++++++++++++++++++----- > 2 files changed, 28 insertions(+), 5 deletions(-) > > diff --git a/src/intel/tools/intel_dump_gpu.c > b/src/intel/tools/intel_dump_gpu.c > index a71103f1889..ffe49b10108 100644 > --- a/src/intel/tools/intel_dump_gpu.c > +++ b/src/intel/tools/intel_dump_gpu.c > @@ -358,10 +358,16 @@ maybe_init(void) > verbose = 2; > } > } else if (!strcmp(key, "device")) { > + fail_if(device != 0, "Device/Platform override specified multiple > times."); > fail_if(sscanf(value, "%i", &device) != 1, > "failed to parse device id '%s'", > value); > device_override = true; > + } else if (!strcmp(key, "platform")) { > + fail_if(device != 0, "Device/Platform override specified multiple > times."); > + device = gen_device_name_to_pci_device_id(value); > + fail_if(device == -1, "Unknown platform '%s'", value); > + device_override = true; > } else if (!strcmp(key, "file")) { > output_filename = strdup(value); > output_file = fopen(output_filename, "w+"); > diff --git a/src/intel/tools/intel_dump_gpu.in > b/src/intel/tools/intel_dump_gpu.in > index 2175b090622..045a3968a3f 100755 > --- a/src/intel/tools/intel_dump_gpu.in > +++ b/src/intel/tools/intel_dump_gpu.in > @@ -8,15 +8,17 @@ Usage: intel_dump_gpu [OPTION]... [--] COMMAND ARGUMENTS > Run COMMAND with ARGUMENTS and dump an AUB file that captures buffer > contents and execution of the GEM application. > > - -o, --output=FILE Name of AUB file. Defaults to COMMAND.aub > + -o, --output=FILE Name of AUB file. Defaults to COMMAND.aub > > - --device=ID Override PCI ID of the reported device > + --device=ID Override PCI ID of the reported device > > - -v Enable verbose output > + -p, --platform=NAME Override PCI ID using a platform name > > - -vv Enable extra verbosity - dumps gtt mappings > + -v Enable verbose output > > - --help Display this help message and exit > + -vv Enable extra verbosity - dumps gtt mappings > + > + --help Display this help message and exit > > EOF > > @@ -62,6 +64,21 @@ while true; do > add_arg "device=${1##--device=}" > shift > ;; > + -p) > + platform=$2 > + add_arg "platform=${platform}" > + shift 2 > + ;; > + -p*) > + platform=${1##-p} > + add_arg "platform=${platform}" > + shift > + ;; > + --platform=*) > + platform=${1##-p} > + add_arg "platform=${platform}" > + shift > + ;; > --gdb) > gdb=1 > shift > -- > 2.19.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev