[igt-dev] [PATCH i-g-t 2/3] lib/igt_dummyload: Don't assume dependency object size
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Wed Jan 11 18:12:04 UTC 2023
Most of the tests use page size for dependency object so spinner
had this value hardcoded as a default. But there're exceptions
where dependency object is bigger and for softpin path we need to
allow pass this size to properly acquire offsets from the allocator.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
lib/igt_dummyload.c | 4 +++-
lib/igt_dummyload.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 17ae21f567..5f3c6b10c7 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -186,10 +186,12 @@ emit_recursive_batch(igt_spin_t *spin,
addr += BATCH_SIZE;
if (opts->dependency) {
+ uint64_t dep_size = opts->dependency_size ?: BATCH_SIZE;
+
igt_assert(!(opts->flags & IGT_SPIN_POLL_RUN));
if (ahnd)
addr_scratch = intel_allocator_alloc_with_strategy(ahnd, opts->dependency,
- BATCH_SIZE, 0,
+ dep_size, 0,
ALLOC_STRATEGY_LOW_TO_HIGH);
else
addr_scratch = addr;
diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
index b33507971b..b247ab02b2 100644
--- a/lib/igt_dummyload.h
+++ b/lib/igt_dummyload.h
@@ -49,6 +49,7 @@ typedef struct igt_spin_factory {
uint32_t ctx_id;
const intel_ctx_t *ctx;
uint32_t dependency;
+ uint64_t dependency_size;
unsigned int engine;
unsigned int flags;
int fence;
--
2.34.1
More information about the igt-dev
mailing list