diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-12-12 09:38:54 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-12-12 15:09:14 +0000 |
commit | 5c4766f5c4ca896a4c7b61645ecca2b80546dc3b (patch) | |
tree | a410458b31a719f20ea536b75c33df0db75cbebd /tests/i915/i915_pm_rpm.c | |
parent | d14fcf9235c223c29449ef907579e97086b2d4e5 (diff) |
lib: Pass device fd to gem_mmappable_aperture_size()
In order to find the correct aperture size for the test, we want to pass
the test's device into the query.
Reported-by: Bruce Chang <yu.bruce.chang@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Bruce Chang <yu.bruce.chang@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/i915_pm_rpm.c')
-rw-r--r-- | tests/i915/i915_pm_rpm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c index 6d46c320..6321dd40 100644 --- a/tests/i915/i915_pm_rpm.c +++ b/tests/i915/i915_pm_rpm.c @@ -1419,7 +1419,7 @@ static void gem_evict_pwrite_subtest(void) unsigned int num_trash_bos, n; uint32_t buf; - num_trash_bos = gem_mappable_aperture_size() / (1024*1024) + 1; + num_trash_bos = gem_mappable_aperture_size(drm_fd) / (1024*1024) + 1; trash_bos = malloc(num_trash_bos * sizeof(*trash_bos)); igt_assert(trash_bos); @@ -1463,7 +1463,7 @@ static bool device_in_pci_d3(void) uint16_t val; int rc; - rc = pci_device_cfg_read_u16(intel_get_pci_device(), &val, 0xd4); + rc = pci_device_cfg_read_u16(igt_device_get_pci_device(drm_fd), &val, 0xd4); igt_assert_eq(rc, 0); igt_debug("%s: PCI D3 state=%d\n", __func__, val & 0x3); |