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_panel_fitter.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tools/intel_panel_fitter.c') diff --git a/tools/intel_panel_fitter.c b/tools/intel_panel_fitter.c index 06f4ac59..137ef61a 100644 --- a/tools/intel_panel_fitter.c +++ b/tools/intel_panel_fitter.c @@ -30,7 +30,6 @@ #include #include #include -#include "igt_device.h" #include "intel_io.h" #include "intel_chipset.h" #include "intel_reg.h" @@ -274,17 +273,13 @@ int main (int argc, char *argv[]) bool do_disable = false, do_dump = false, do_usage = false; struct pci_device *pci_dev; uint32_t devid; - int fd; printf("WARNING:\n" "This tool is a workaround for people that don't have a Kernel " "with overscan compensation properties: it is just a temporary " "solution that may or may not work. Use it at your own risk.\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); devid = pci_dev->device_id; @@ -348,6 +343,5 @@ int main (int argc, char *argv[]) out: intel_register_access_fini(); - return ret; } -- cgit v1.2.3