summaryrefslogtreecommitdiff
path: root/tests/i915/gem_request_retire.c
diff options
context:
space:
mode:
authorCh Sai Gowtham <sai.gowtham.ch@intel.com>2021-07-06 16:21:28 +0530
committerZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2021-08-10 21:02:50 +0200
commit4e44905a9762277531ca04f7d8e31fa3ef734c95 (patch)
tree048ca8eeb668ec1cc483e14ac82afff5ae3ec5a4 /tests/i915/gem_request_retire.c
parent4ac65bda3815831c1895cd88419bc4d334fd00c3 (diff)
tests/gem_request_retire: Add allocator support
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@intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/i915/gem_request_retire.c')
-rw-r--r--tests/i915/gem_request_retire.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/i915/gem_request_retire.c b/tests/i915/gem_request_retire.c
index 3df54f2a..da9d405e 100644
--- a/tests/i915/gem_request_retire.c
+++ b/tests/i915/gem_request_retire.c
@@ -63,21 +63,29 @@ test_retire_vma_not_inactive(int fd)
{
struct intel_execution_engine2 *e;
const intel_ctx_t *ctx;
+ uint64_t ahnd, ahndN;
igt_spin_t *bg = NULL;
ctx = intel_ctx_create_all_physical(fd);
+ ahnd = get_reloc_ahnd(fd, ctx->id);
for_each_ctx_engine(fd, ctx, e) {
igt_spin_t *spin;
const intel_ctx_t *spin_ctx;
if (!bg) {
- bg = igt_spin_new(fd, .ctx = ctx, .engine = e->flags);
+ bg = igt_spin_new(fd,
+ .ahnd = ahnd,
+ .ctx = ctx,
+ .engine = e->flags);
continue;
}
spin_ctx = intel_ctx_create(fd, &ctx->cfg);
- spin = igt_spin_new(fd, .ctx = spin_ctx,
+ ahndN = get_reloc_ahnd(fd, spin_ctx->id);
+ spin = igt_spin_new(fd,
+ .ahnd = ahndN,
+ .ctx = spin_ctx,
.engine = e->flags,
.dependency = bg->handle,
.flags = IGT_SPIN_SOFTDEP);
@@ -86,11 +94,13 @@ test_retire_vma_not_inactive(int fd)
gem_sync(fd, spin->handle);
igt_spin_free(fd, spin);
+ put_ahnd(ahndN);
}
igt_drop_caches_set(fd, DROP_RETIRE);
igt_spin_free(fd, bg);
intel_ctx_destroy(fd, ctx);
+ put_ahnd(ahnd);
}
int fd;