summaryrefslogtreecommitdiff
path: root/tests/i915/gem_workarounds.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-11-13 15:04:04 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-11-16 11:25:32 +0000
commitb8e1de5f79d339a163348dbb7779a5c93d0e5a02 (patch)
treec638ed98c2904f3a6902f5238c284c9ef5dc3970 /tests/i915/gem_workarounds.c
parentd25f4367159998150314471af447eef01320a3ca (diff)
i915: Use igt_device_get_pci_device()
Avoid hard coding the expected PCI location, and refer to the pci device used for the test device instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_workarounds.c')
-rw-r--r--tests/i915/gem_workarounds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/i915/gem_workarounds.c b/tests/i915/gem_workarounds.c
index 4f043d7d..00b475c2 100644
--- a/tests/i915/gem_workarounds.c
+++ b/tests/i915/gem_workarounds.c
@@ -29,6 +29,7 @@
#include "i915/gem.h"
#include "igt.h"
+#include "igt_device.h"
#define PAGE_SIZE 4096
#define PAGE_ALIGN(x) ALIGN(x, PAGE_SIZE)
@@ -258,7 +259,7 @@ igt_main
device = drm_open_driver(DRIVER_INTEL);
igt_require_gem(device);
- intel_mmio_use_pci_bar(&mmio_data, intel_get_pci_device());
+ intel_mmio_use_pci_bar(&mmio_data, igt_device_get_pci_device(device));
gen = intel_gen(intel_get_drm_devid(device));