[igt-dev] [PATCH i-g-t v4 31/56] tests/gem_mmap_offset: Add allocator support
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Fri Aug 6 13:41:20 UTC 2021
From: Ch Sai Gowtham <sai.gowtham.ch at intel.com>
When relocations are not available tests must assign addresses to objects
by themselves instead of relying on the driver. We use allocator for
that purpose.
Signed-off-by: Ch Sai Gowtham <sai.gowtham.ch at intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
tests/i915/gem_mmap_offset.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c
index f1ba67b7c..8148f0a2d 100644
--- a/tests/i915/gem_mmap_offset.c
+++ b/tests/i915/gem_mmap_offset.c
@@ -248,7 +248,8 @@ static void isolation(int i915)
static void pf_nonblock(int i915)
{
- igt_spin_t *spin = igt_spin_new(i915);
+ uint64_t ahnd = get_reloc_ahnd(i915, 0);
+ igt_spin_t *spin = igt_spin_new(i915, .ahnd = ahnd);
for_each_mmap_offset_type(i915, t) {
uint32_t *ptr;
@@ -268,6 +269,7 @@ static void pf_nonblock(int i915)
}
igt_spin_free(i915, spin);
+ put_ahnd(ahnd);
}
static void *memchr_inv(const void *s, int c, size_t n)
--
2.26.0
More information about the igt-dev
mailing list