From 25fbae15262cf570e207e62f50e7c5233e06bc67 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 21 Mar 2017 17:57:04 +0100 Subject: Revert "lib: Open debugfs files for the given DRM device" This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso --- tools/intel_gpu_top.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tools/intel_gpu_top.c') diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index 78488764..4f327c6d 100644 --- a/tools/intel_gpu_top.c +++ b/tools/intel_gpu_top.c @@ -46,7 +46,6 @@ #include "instdone.h" #include "intel_reg.h" #include "intel_chipset.h" -#include "drmtest.h" #define FORCEWAKE 0xA18C #define FORCEWAKE_ACK 0x130090 @@ -411,7 +410,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", @@ -512,11 +510,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_master(DRIVER_INTEL); - /* Grab access to the registers */ - intel_register_access_init(pci_dev, 0, drm_fd); + intel_register_access_init(pci_dev, 0); ring_init(&render_ring); if (IS_GEN4(devid) || IS_GEN5(devid)) @@ -719,6 +714,5 @@ int main(int argc, char **argv) fclose(output); intel_register_access_fini(); - close(drm_fd); return 0; } -- cgit v1.2.3