[PATCH i-g-t 4/6] tests/i915/api_intel_allocator: Fixed start alignment
Dominik Karol Piatkowski
dominik.karol.piatkowski at intel.com
Tue Dec 13 15:10:19 UTC 2022
On some platforms it may be required to use aligned start address.
Signed-off-by: Dominik Karol Piatkowski <dominik.karol.piatkowski at intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
tests/i915/api_intel_allocator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/i915/api_intel_allocator.c b/tests/i915/api_intel_allocator.c
index cf401176..c9fe881c 100644
--- a/tests/i915/api_intel_allocator.c
+++ b/tests/i915/api_intel_allocator.c
@@ -50,6 +50,7 @@ static void alloc_simple(int fd)
igt_assert(!freed);
intel_allocator_get_address_range(ahnd, &start, &end);
+ start = ALIGN(start, gem_detect_safe_alignment(fd));
offset0 = intel_allocator_alloc(ahnd, 1, end - start, 0);
offset1 = __intel_allocator_alloc(ahnd, 2, 4096, 0, ALLOC_STRATEGY_NONE);
igt_assert(offset1 == ALLOC_INVALID_ADDRESS);
--
2.34.1
More information about the Intel-gfx-trybot
mailing list