summaryrefslogtreecommitdiff
path: root/tools/intel_reg.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-05-04 13:54:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-04 13:57:14 +0100
commit862fa60cc9ead665fca4ddaa77210559b59d696b (patch)
tree4e696d37a5dce14e94f03022374c7a1a6710cc96 /tools/intel_reg.c
parentc2e3d911b15b6a928e51d4dc64f0e5e2d1f07347 (diff)
intel_reg: Use the drm device fd as a hint only
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ä <ville.syrjala@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/intel_reg.c')
-rw-r--r--tools/intel_reg.c3
1 files changed, 1 insertions, 2 deletions
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;