[igt-dev] [PATCH i-g-t v34 35/40] tests/api_intel_bb: address review comments (keep 48bit flag after reset)

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Sep 11 08:07:52 UTC 2020


Verify 48bit flag remains same after bb reset.

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/api_intel_bb.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
index 8bc66740..dacf05c0 100644
--- a/tests/i915/api_intel_bb.c
+++ b/tests/i915/api_intel_bb.c
@@ -250,6 +250,7 @@ static void reset_flags(struct buf_ops *bops)
 	int i915 = buf_ops_get_fd(bops);
 	struct intel_bb *ibb;
 	struct intel_buf *src, *mid, *dst;
+	uint64_t src_48bit, mid_48bit, dst_48bit;
 	struct drm_i915_gem_exec_object2 *obj;
 	const uint32_t width = 512;
 	const uint32_t height = 512;
@@ -272,11 +273,13 @@ static void reset_flags(struct buf_ops *bops)
 	obj = intel_bb_find_object(ibb, src->handle);
 	igt_assert(obj);
 	igt_assert((obj->flags & EXEC_OBJECT_WRITE) == 0);
+	src_48bit = obj->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
 
 	/* Check mid has EXEC_OBJECT_WRITE */
 	obj = intel_bb_find_object(ibb, mid->handle);
 	igt_assert(obj);
 	igt_assert(obj->flags & EXEC_OBJECT_WRITE);
+	mid_48bit = obj->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
 
 	intel_bb_out(ibb, 0);
 	intel_bb_flush_blit(ibb);
@@ -286,11 +289,17 @@ static void reset_flags(struct buf_ops *bops)
 	igt_assert(obj);
 	igt_assert((obj->flags & EXEC_OBJECT_WRITE) == 0);
 
+	/* Check src keep 48bit address flag */
+	igt_assert((obj->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) == src_48bit);
+
 	/* Check mid has zeroed flags */
 	obj = intel_bb_find_object(ibb, mid->handle);
 	igt_assert(obj);
 	igt_assert((obj->flags & EXEC_OBJECT_WRITE) == 0);
 
+	/* Check mid keep 48bit address flag */
+	igt_assert((obj->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) == mid_48bit);
+
 	intel_bb_emit_blt_copy(ibb,
 			       mid, 0, 0, mid->surface[0].stride,
 			       dst, 0, 0, dst->surface[0].stride,
@@ -307,14 +316,18 @@ static void reset_flags(struct buf_ops *bops)
 	obj = intel_bb_find_object(ibb, dst->handle);
 	igt_assert(obj);
 	igt_assert(obj->flags & EXEC_OBJECT_WRITE);
+	dst_48bit = obj->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
 
 	intel_bb_flush_blit(ibb);
 
-	/* Check mid has no EXEC_OBJECT_WRITE */
+	/* Check dst has no EXEC_OBJECT_WRITE */
 	obj = intel_bb_find_object(ibb, dst->handle);
 	igt_assert(obj);
 	igt_assert((obj->flags & EXEC_OBJECT_WRITE) == 0);
 
+	/* Check dst keep 48bit address flag */
+	igt_assert((obj->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) == dst_48bit);
+
 	intel_buf_destroy(src);
 	intel_buf_destroy(mid);
 	intel_buf_destroy(dst);
-- 
2.26.0



More information about the igt-dev mailing list