[igt-dev] [PATCH i-g-t v18 17/17] tiled_blits: debug stuff for gen3

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Jul 30 11:49:20 UTC 2020


Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 lib/intel_bufops.c                  | 5 ++++-
 lib/rendercopy_i915.c               | 5 +++++
 tests/i915/gem_render_tiled_blits.c | 8 +++++++-
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 8380a026..4c50f67e 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -210,11 +210,14 @@ static void set_hw_tiled(struct buf_ops *bops, struct intel_buf *buf)
 {
 	uint32_t ret_tiling, ret_swizzle;
 
+	igt_info("set_hw_tiled: tiling: %d\n", buf->tiling);
 	if (buf->tiling != I915_TILING_X && buf->tiling != I915_TILING_Y)
 		return;
 
-	if (!buf_ops_has_hw_fence(bops, buf->tiling))
+	if (!buf_ops_has_hw_fence(bops, buf->tiling)) {
+		igt_info("has_hw_fence = false\n");
 		return;
+	}
 
 	igt_assert_eq(__set_tiling(bops->fd,
 				   buf->handle, buf->tiling,
diff --git a/lib/rendercopy_i915.c b/lib/rendercopy_i915.c
index b16d4f12..776a254b 100644
--- a/lib/rendercopy_i915.c
+++ b/lib/rendercopy_i915.c
@@ -32,6 +32,11 @@ void gen3_render_copyfunc(struct intel_bb *ibb,
 	intel_bb_add_intel_buf(ibb, dst, true);
 	intel_bb_add_intel_buf(ibb, src, false);
 
+	intel_buf_set_name(dst, "dst");
+	intel_buf_print(dst);
+	intel_buf_set_name(src, "src");
+	intel_buf_print(src);
+
 	/* invariant state */
 	{
 		intel_bb_out(ibb, _3DSTATE_AA_CMD |
diff --git a/tests/i915/gem_render_tiled_blits.c b/tests/i915/gem_render_tiled_blits.c
index dbf4a336..2c78282e 100644
--- a/tests/i915/gem_render_tiled_blits.c
+++ b/tests/i915/gem_render_tiled_blits.c
@@ -171,6 +171,11 @@ static void run_test (int fd, int count)
 	bops = buf_ops_create(fd);
 	ibb = intel_bb_create(fd, 4096);
 
+	if (ibb->gen == DUMPGEN) {
+		intel_bb_set_debug(ibb, true);
+		intel_bb_set_dump_base64(ibb, true);
+	}
+
 	intel_buf_init(bops, &linear, WIDTH, HEIGHT, 32, 0,
 		       I915_TILING_NONE, I915_COMPRESSION_NONE);
 	if (snoop) {
@@ -188,7 +193,7 @@ static void run_test (int fd, int count)
 		intel_buf_init(bops, &bufs[i], WIDTH, HEIGHT, 32, 0,
 			       tiling, I915_COMPRESSION_NONE);
 		start_val[i] = start;
-		igt_debug("buf init: [w: %u, h: %u, tiling: %u, start val: %u]\n",
+		igt_info("buf init: [w: %u, h: %u, tiling: %u, start val: %u]\n",
 			  WIDTH, HEIGHT, tiling, start);
 
 		ptr = gem_mmap__gtt(fd, bufs[i].handle,
@@ -274,6 +279,7 @@ igt_main
 		fd = drm_open_driver(DRIVER_INTEL);
 		igt_require_gem(fd);
 		igt_require(gem_available_fences(fd) > 0);
+		igt_log_level = IGT_LOG_DEBUG;
 	}
 
 	igt_subtest("basic") {
-- 
2.26.0



More information about the igt-dev mailing list