diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-11-20 15:58:59 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-11-21 11:57:49 +0000 |
commit | 538091ce7008b4281d912422d8bb676c541401a4 (patch) | |
tree | 406fa375e51a17d2d87500cd6c5aa8a2ee230abf /tools/intel_gpu_top.c | |
parent | 9fb5344bab2540e3d12a7d3a94c2a3801a6fec36 (diff) |
tools: Stop opening the driver just to find the debugfs
Since the tools want to work without the module loaded, remove the
assumption that we want to load the driver to find debugfs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tools/intel_gpu_top.c')
-rw-r--r-- | tools/intel_gpu_top.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index 7454de87..83cf53ea 100644 --- a/tools/intel_gpu_top.c +++ b/tools/intel_gpu_top.c @@ -409,7 +409,6 @@ usage(const char *appname) int main(int argc, char **argv) { uint32_t devid; - int drm_fd; struct pci_device *pci_dev; struct ring render_ring = { .name = "render", @@ -510,11 +509,8 @@ int main(int argc, char **argv) top_bits_sorted[i] = &top_bits[i]; } - /* Just to make sure we open the right debugfs files */ - drm_fd = drm_open_driver(DRIVER_INTEL); - /* Grab access to the registers */ - intel_register_access_init(pci_dev, 0, drm_fd); + intel_register_access_init(pci_dev, 0, -1); ring_init(&render_ring); if (IS_GEN4(devid) || IS_GEN5(devid)) @@ -717,6 +713,5 @@ int main(int argc, char **argv) fclose(output); intel_register_access_fini(); - close(drm_fd); return 0; } |