[igt-dev] [PATCH i-g-t v23 18/18] tests/kms_psr: trying to fix blt

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Sun Aug 2 16:30:02 UTC 2020


Unfortunately I'm not able to reproduce, so blind shot and to be
squashed if hit.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 tests/kms_psr.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index d2c5c540..7343e270 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -162,19 +162,22 @@ static void fill_blt(data_t *data, const struct igt_fb *fb, unsigned char color)
 
 	ibb = intel_bb_create(data->drm_fd, 4096);
 	dst = create_buf_from_fb(data, fb);
+	intel_bb_add_intel_buf(ibb, dst, true);
 
 	color_blit_start(ibb);
 	intel_bb_out(ibb, (1 << 24) | (0xf0 << 16) | 0);
 	intel_bb_out(ibb, 0);
 	intel_bb_out(ibb, 0xfff << 16 | 0xfff);
 	intel_bb_emit_reloc(ibb, dst->handle, I915_GEM_DOMAIN_RENDER,
-			    I915_GEM_DOMAIN_RENDER, 0, 0x0);
+			    I915_GEM_DOMAIN_RENDER, 0, dst->addr.offset);
 	intel_bb_out(ibb, color);
 
 	intel_bb_flush_blit(ibb);
 	intel_bb_sync(ibb);
 	intel_bb_destroy(ibb);
 	intel_buf_destroy(dst);
+
+	gem_bo_busy(data->drm_fd, fb->gem_handle);
 }
 
 static void fill_render(data_t *data, const struct igt_fb *fb,
@@ -207,6 +210,8 @@ static void fill_render(data_t *data, const struct igt_fb *fb,
 	intel_bb_destroy(ibb);
 	intel_buf_destroy(src);
 	intel_buf_destroy(dst);
+
+	gem_bo_busy(data->drm_fd, fb->gem_handle);
 }
 
 static bool sink_support(data_t *data, enum psr_mode mode)
-- 
2.26.0



More information about the igt-dev mailing list