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 --- lib/ioctl_wrappers.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/ioctl_wrappers.c') diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index a66eb4bc..39920f87 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -53,7 +53,6 @@ #include "intel_chipset.h" #include "intel_io.h" #include "igt_debugfs.h" -#include "igt_device.h" #include "igt_sysfs.h" #include "config.h" @@ -1097,9 +1096,9 @@ uint64_t gem_aperture_size(int fd) * * Returns: The mappable gtt address space size. */ -uint64_t gem_mappable_aperture_size(int fd) +uint64_t gem_mappable_aperture_size(void) { - struct pci_device *pci_dev = igt_device_get_pci_device(fd); + struct pci_device *pci_dev = intel_get_pci_device(); int bar; if (intel_gen(pci_dev->device_id) < 3) -- cgit v1.2.3