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_lid.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tools/intel_lid.c') diff --git a/tools/intel_lid.c b/tools/intel_lid.c index 447790d9..37c6ba5e 100644 --- a/tools/intel_lid.c +++ b/tools/intel_lid.c @@ -37,10 +37,9 @@ #include #include -#include "drmtest.h" -#include "igt_device.h" #include "intel_io.h" #include "intel_reg.h" +#include "intel_chipset.h" #define SWF14_LID_STATUS_CLOSED (1<<29) /* 0 here means open */ @@ -119,11 +118,8 @@ out: int main(int argc, char **argv) { int swf14, acpi_lid; - int fd; - fd = drm_open_driver(DRIVER_INTEL); - intel_mmio_use_pci_bar(igt_device_get_pci_device(fd)); - close(fd); + intel_mmio_use_pci_bar(intel_get_pci_device()); while (1) { swf14 = INREG(SWF14); @@ -146,6 +142,5 @@ int main(int argc, char **argv) } sleep(2); } - return 0; } -- cgit v1.2.3