[igt-dev] [PATCH i-g-t v18 29/31] tests/api_intel_bb: Use allocator in delta-check test

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Jan 29 14:44:52 UTC 2021


To be squashed before merge.

We want to use address returned from emit_reloc() but do not call
kernel relocation path. Change intel-bb to use allocator to fully
control addresses passed in execbuf.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/i915/api_intel_bb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
index 76cffc771..a19d620e5 100644
--- a/tests/i915/api_intel_bb.c
+++ b/tests/i915/api_intel_bb.c
@@ -1109,7 +1109,7 @@ static void delta_check(struct buf_ops *bops)
 	uint64_t offset;
 	bool supports_48bit;
 
-	ibb = intel_bb_create(i915, PAGE_SIZE);
+	ibb = intel_bb_create_full(i915, 0, PAGE_SIZE, INTEL_ALLOCATOR_SIMPLE);
 	supports_48bit = ibb->supports_48b_address;
 	if (!supports_48bit)
 		intel_bb_destroy(ibb);
@@ -1121,7 +1121,7 @@ static void delta_check(struct buf_ops *bops)
 	buf = create_buf(bops, 0x1000, 0x10, COLOR_CC);
 	buf->addr.offset = 0xfffff000;
 	intel_bb_add_object(ibb, buf->handle, intel_buf_bo_size(buf),
-			    buf->addr.offset, false);
+			    buf->addr.offset, 0, false);
 
 	intel_bb_out(ibb, MI_STORE_DWORD_IMM);
 	intel_bb_emit_reloc(ibb, buf->handle,
-- 
2.26.0



More information about the igt-dev mailing list