summaryrefslogtreecommitdiff
path: root/tools/intel_infoframes.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-11-20 15:58:59 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-11-21 11:57:49 +0000
commit538091ce7008b4281d912422d8bb676c541401a4 (patch)
tree406fa375e51a17d2d87500cd6c5aa8a2ee230abf /tools/intel_infoframes.c
parent9fb5344bab2540e3d12a7d3a94c2a3801a6fec36 (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_infoframes.c')
-rw-r--r--tools/intel_infoframes.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
index 813430c9..2ef5d4fd 100644
--- a/tools/intel_infoframes.c
+++ b/tools/intel_infoframes.c
@@ -1081,7 +1081,6 @@ printf("Options:\n"
int main(int argc, char *argv[])
{
int opt;
- int drm_fd;
int ret = 0;
Transcoder transcoder = TRANSC_INVALID;
DipType dip = DIP_INVALID;
@@ -1108,11 +1107,8 @@ int main(int argc, char *argv[])
printf("WARNING: This is just a debugging tool! Don't expect it to work"
" perfectly: the Kernel might undo our changes.\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);
intel_check_pch();
if (IS_GEN4(pci_dev->device_id))
@@ -1261,6 +1257,5 @@ int main(int argc, char *argv[])
out:
intel_register_access_fini();
- close(drm_fd);
return ret;
}