[igt-dev] [PATCH 4/6] tests/amdgpu: add deadlock test for gfx, compute and sdma

vitaly.prosyak at amd.com vitaly.prosyak at amd.com
Thu Oct 13 13:25:25 UTC 2022


From: Vitaly Prosyak <vitaly.prosyak at amd.com>

Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
---
 tests/amdgpu/amd_deadlock.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/tests/amdgpu/amd_deadlock.c b/tests/amdgpu/amd_deadlock.c
index e1b508fcf..c7e8e05e9 100644
--- a/tests/amdgpu/amd_deadlock.c
+++ b/tests/amdgpu/amd_deadlock.c
@@ -26,7 +26,21 @@
 #include "lib/amdgpu/amd_memory.h"
 #include "lib/amdgpu/amd_command_submission.h"
 #include "lib/amdgpu/amd_dispatch.h"
+#include "lib/amdgpu/amd_deadlock_helpers.h"
+
+static bool with_thread = true;
+
+static void
+amdgpu_deadlock_gfx(amdgpu_device_handle device_handle)
+{
+	amdgpu_deadlock_helper(device_handle, AMDGPU_HW_IP_GFX, with_thread);
+}
 
+static void
+amdgpu_deadlock_compute(amdgpu_device_handle device_handle)
+{
+	amdgpu_deadlock_helper(device_handle, AMDGPU_HW_IP_COMPUTE, with_thread);
+}
 static void
 amdgpu_dispatch_hang_slow_gfx(amdgpu_device_handle device_handle)
 {
@@ -65,6 +79,15 @@ igt_main
 
 	}
 
+	igt_subtest("amdgpu_deadlock_gfx")
+	amdgpu_deadlock_gfx(device);
+
+	igt_subtest("amdgpu_deadlock_sdma")
+	amdgpu_deadlock_sdma(device, with_thread);
+
+	igt_subtest("amdgpu_deadlock_compute")
+	amdgpu_deadlock_compute(device);
+
 	igt_subtest("dispatch_hang_slow_compute")
 	amdgpu_dispatch_hang_slow_compute(device);
 
-- 
2.25.1



More information about the igt-dev mailing list