From 862fa60cc9ead665fca4ddaa77210559b59d696b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 4 May 2017 13:54:18 +0100 Subject: intel_reg: Use the drm device fd as a hint only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want intel_reg to work even when i915.ko isn't loaded, in which case there is debugfs to provide /debug/.../i915_forcewake, but we will survive without! Fixes: 301ad44cdf1b ("lib: Open debugfs files for the given DRM device") Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson --- tools/intel_reg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools/intel_reg.c') diff --git a/tools/intel_reg.c b/tools/intel_reg.c index 7b58d0b8..b3823fd8 100644 --- a/tools/intel_reg.c +++ b/tools/intel_reg.c @@ -880,7 +880,7 @@ int main(int argc, char *argv[]) } /* Just to make sure we open the right debugfs files */ - config.drm_fd = drm_open_driver_master(DRIVER_INTEL); + config.drm_fd = __drm_open_driver(DRIVER_INTEL); if (read_reg_spec(&config) < 0) { return EXIT_FAILURE; @@ -900,7 +900,6 @@ int main(int argc, char *argv[]) ret = command->function(&config, argc, argv); - close(config.drm_fd); free(config.mmiofile); return ret; -- cgit v1.2.3