From bab52763f45860fba90116e553df5cd8a510282f Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Wed, 31 Jan 2024 09:08:36 +0000 Subject: [PATCH] intel/hang_replay: fix batch address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also capture all buffers so that we can compare replay run with the original error state. Signed-off-by: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin Reviewed-by: José Roberto de Souza Part-of: --- src/intel/tools/intel_hang_replay.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/intel/tools/intel_hang_replay.c b/src/intel/tools/intel_hang_replay.c index 5baa3476bf3..8ca657c9dfa 100644 --- a/src/intel/tools/intel_hang_replay.c +++ b/src/intel/tools/intel_hang_replay.c @@ -600,8 +600,9 @@ main(int argc, char *argv[]) .relocation_count = 0, .relocs_ptr = 0, .flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | - EXEC_OBJECT_PINNED, - .offset = bo->offset, + EXEC_OBJECT_PINNED | + EXEC_OBJECT_CAPTURE, + .offset = intel_canonical_address(bo->offset), }; } @@ -620,8 +621,9 @@ main(int argc, char *argv[]) .relocs_ptr = 0, .flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED | - EXEC_OBJECT_WRITE /* to be able to wait on the BO */, - .offset = init_bo->offset, + EXEC_OBJECT_WRITE /* to be able to wait on the BO */ | + EXEC_OBJECT_CAPTURE, + .offset = intel_canonical_address(init_bo->offset), }; ret = execbuffer(drm_fd, ctx_id, &execbuffer_bos, init_bo, init.offset); if (ret != 0) { @@ -641,8 +643,9 @@ main(int argc, char *argv[]) .relocs_ptr = 0, .flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED | - EXEC_OBJECT_WRITE /* to be able to wait on the BO */, - .offset = batch_bo->offset, + EXEC_OBJECT_WRITE /* to be able to wait on the BO */ | + EXEC_OBJECT_CAPTURE, + .offset = intel_canonical_address(batch_bo->offset), }; ret = execbuffer(drm_fd, ctx_id, &execbuffer_bos, batch_bo, exec.offset); if (ret != 0) {