[igt-dev] [PATCH i-g-t 3/4] tests/i915/api_intel_allocator: Fixed start offset

Dominik Karol Piatkowski dominik.karol.piatkowski at intel.com
Wed Dec 14 07:29:43 UTC 2022


On some platforms it may be required to use safe start offset
instead of hardcoded one.

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/api_intel_allocator.c b/tests/i915/api_intel_allocator.c
index 87abd900..cf401176 100644
--- a/tests/i915/api_intel_allocator.c
+++ b/tests/i915/api_intel_allocator.c
@@ -96,7 +96,7 @@ static void reserve_simple(int fd)
 static void reserve(int fd, uint8_t type)
 {
 	struct test_obj obj;
-	uint64_t ahnd, offset = 0x40000, size = 0x1000;
+	uint64_t ahnd, offset = gem_detect_safe_start_offset(fd), size = 0x1000;
 
 	ahnd = intel_allocator_open(fd, 0, type);
 
-- 
2.34.1



More information about the igt-dev mailing list