summaryrefslogtreecommitdiff
path: root/tools/intel_gpu_top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/intel_gpu_top.c')
-rw-r--r--tools/intel_gpu_top.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index a2277cc5..2c2ed393 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -486,6 +486,11 @@ int main(int argc, char **argv)
argc -= optind;
argv += optind;
+ pci_dev = intel_get_pci_device();
+ devid = pci_dev->device_id;
+ intel_get_mmio(pci_dev);
+ init_instdone_definitions(devid);
+
/* Do we have a command to run? */
if (cmd != NULL) {
if (output != stdout) {
@@ -514,11 +519,6 @@ int main(int argc, char **argv)
}
}
- pci_dev = intel_get_pci_device();
- devid = pci_dev->device_id;
- intel_get_mmio(pci_dev);
- init_instdone_definitions(devid);
-
for (i = 0; i < num_instdone_bits; i++) {
top_bits[i].bit = &instdone_bits[i];
top_bits[i].count = 0;