[igt-dev] [PATCH i-g-t 31/35] tests/gem_mmap_offset: Use intel_buf wrapper code instead direct
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Feb 16 11:40:03 UTC 2021
Generally when playing with intel_buf we should use wrapper code
instead of adding it to intel_bb directly. Code checks required
alignment on specific gens so protects us from passing unaligned
properly addresses.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
tests/i915/gem_mmap_offset.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c
index 5e48cd697..8f2006274 100644
--- a/tests/i915/gem_mmap_offset.c
+++ b/tests/i915/gem_mmap_offset.c
@@ -614,8 +614,8 @@ static void blt_coherency(int i915)
dst = create_bo(bops, 1, width, height);
size = src->surface[0].size;
- intel_bb_add_object(ibb, src->handle, size, src->addr.offset, 0, false);
- intel_bb_add_object(ibb, dst->handle, size, dst->addr.offset, 0, true);
+ intel_bb_add_intel_buf(ibb, src, false);
+ intel_bb_add_intel_buf(ibb, dst, true);
intel_bb_blt_copy(ibb,
src, 0, 0, src->surface[0].stride,
--
2.26.0
More information about the igt-dev
mailing list