summaryrefslogtreecommitdiff
path: root/tests/i915/gem_mmap.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-12-12 09:38:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-12-12 15:09:14 +0000
commit5c4766f5c4ca896a4c7b61645ecca2b80546dc3b (patch)
treea410458b31a719f20ea536b75c33df0db75cbebd /tests/i915/gem_mmap.c
parentd14fcf9235c223c29449ef907579e97086b2d4e5 (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_mmap.c')
-rw-r--r--tests/i915/gem_mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/i915/gem_mmap.c b/tests/i915/gem_mmap.c
index 8bad9b14..60a64c13 100644
--- a/tests/i915/gem_mmap.c
+++ b/tests/i915/gem_mmap.c
@@ -53,10 +53,10 @@ test_huge_bo(int huge)
switch (huge) {
case -1:
- huge_object_size = gem_mappable_aperture_size() / 2;
+ huge_object_size = gem_mappable_aperture_size(fd) / 2;
break;
case 0:
- huge_object_size = gem_mappable_aperture_size() + PAGE_SIZE;
+ huge_object_size = gem_mappable_aperture_size(fd) + PAGE_SIZE;
break;
case 1:
huge_object_size = gem_aperture_size(fd) + PAGE_SIZE;