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_panel_fitter.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_panel_fitter.c')
-rw-r--r-- | tools/intel_panel_fitter.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/intel_panel_fitter.c b/tools/intel_panel_fitter.c index 48b2fd89..137ef61a 100644 --- a/tools/intel_panel_fitter.c +++ b/tools/intel_panel_fitter.c @@ -266,7 +266,7 @@ static void print_usage(void) int main (int argc, char *argv[]) { - int opt, drm_fd; + int opt; int ret = 0; char intel_pipe = '\0'; int x = 0, y = 0; @@ -279,11 +279,8 @@ int main (int argc, char *argv[]) "with overscan compensation properties: it is just a temporary " "solution that may or may not work. Use it at your own risk.\n"); - /* Just to make sure we open the right debugfs files */ - drm_fd = drm_open_driver_master(DRIVER_INTEL); - pci_dev = intel_get_pci_device(); - intel_register_access_init(pci_dev, 0, drm_fd); + intel_register_access_init(pci_dev, 0, -1); devid = pci_dev->device_id; if (!HAS_PCH_SPLIT(devid)) { @@ -346,6 +343,5 @@ int main (int argc, char *argv[]) out: intel_register_access_fini(); - close(drm_fd); return ret; } |