From e408d569973b610ba4aafdba016c48b25e563468 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Wed, 27 Mar 2019 20:52:52 +0200 Subject: Revert "lib/igt_device: Move intel_get_pci_device under igt_device" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One significant usecase for intel_reg/etc. is to be able to examine the hardware state *before* loading the driver. If the tool forces the driver to load we've totally lost that capability. This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f. Cc: Michał Winiarski Cc: Chris Wilson Signed-off-by: Ville Syrjälä Acked-by: Jani Nikula Acked-by: Michał Winiarski --- tools/intel_infoframes.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tools/intel_infoframes.c') diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c index 9129572a..2ef5d4fd 100644 --- a/tools/intel_infoframes.c +++ b/tools/intel_infoframes.c @@ -30,7 +30,6 @@ #include #include #include -#include "igt_device.h" #include "intel_io.h" #include "intel_chipset.h" #include "drmtest.h" @@ -1082,7 +1081,6 @@ printf("Options:\n" int main(int argc, char *argv[]) { int opt; - int fd; int ret = 0; Transcoder transcoder = TRANSC_INVALID; DipType dip = DIP_INVALID; @@ -1109,10 +1107,7 @@ 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"); - fd = drm_open_driver(DRIVER_INTEL); - pci_dev = igt_device_get_pci_device(fd); - close(fd); - + pci_dev = intel_get_pci_device(); intel_register_access_init(pci_dev, 0, -1); intel_check_pch(); -- cgit v1.2.3