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/gem_pwrite.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/gem_pwrite.c')
-rw-r--r-- | tests/i915/gem_pwrite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/i915/gem_pwrite.c b/tests/i915/gem_pwrite.c index d2dcc95e..f76d2bc7 100644 --- a/tests/i915/gem_pwrite.c +++ b/tests/i915/gem_pwrite.c @@ -130,7 +130,7 @@ static void test_big_cpu(int fd, int scale, unsigned flags) switch (scale) { case 0: - size = gem_mappable_aperture_size() + 4096; + size = gem_mappable_aperture_size(fd) + 4096; break; case 1: size = gem_global_aperture_size(fd) + 4096; @@ -192,7 +192,7 @@ static void test_big_gtt(int fd, int scale, unsigned flags) igt_require(gem_mmap__has_wc(fd)); switch (scale) { case 0: - size = gem_mappable_aperture_size() + 4096; + size = gem_mappable_aperture_size(fd) + 4096; break; case 1: size = gem_global_aperture_size(fd) + 4096; @@ -257,7 +257,7 @@ static void test_random(int fd) gem_require_mmap_wc(fd); size = min(intel_get_total_ram_mb() / 2, - gem_mappable_aperture_size() + 4096); + gem_mappable_aperture_size(fd) + 4096); intel_require_memory(1, size, CHECK_RAM); handle = gem_create(fd, size); |