From: <vitaly.prosyak@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: Pierre-eric Pelloux-prayer <Pierre-eric.Pelloux-prayer@amd.com>,
marek.olsak@amd.com, christian.koenig@amd.com
Subject: [igt-dev] [PATCH 5/9] tests/amdgpu: add GPU reset tests for gfx, compute and sdma.
Date: Fri, 11 Nov 2022 16:52:09 -0500 [thread overview]
Message-ID: <20221111215213.48679-5-vitaly.prosyak@amd.com> (raw)
In-Reply-To: <20221111215213.48679-1-vitaly.prosyak@amd.com>
From: Vitaly Prosyak <vitaly.prosyak@amd.com>
Use the shared amdgpu_wait_memory_helper.
The GPU reset is occurred due to the wait for the register
in memory to be changed is not executed on time.
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Pierre-eric Pelloux-prayer <Pierre-eric.Pelloux-prayer@amd.com>
---
tests/amdgpu/amd_deadlock.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tests/amdgpu/amd_deadlock.c b/tests/amdgpu/amd_deadlock.c
index 109aaac18..d4de20114 100644
--- a/tests/amdgpu/amd_deadlock.c
+++ b/tests/amdgpu/amd_deadlock.c
@@ -26,6 +26,7 @@
#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 void
amdgpu_dispatch_hang_slow_gfx(amdgpu_device_handle device_handle)
@@ -39,6 +40,24 @@ amdgpu_dispatch_hang_slow_compute(amdgpu_device_handle device_handle)
amdgpu_dispatch_hang_slow_helper(device_handle, AMDGPU_HW_IP_COMPUTE);
}
+static void
+amdgpu_deadlock_gfx(amdgpu_device_handle device_handle)
+{
+ amdgpu_wait_memory_helper(device_handle, AMDGPU_HW_IP_GFX);
+}
+
+static void
+amdgpu_deadlock_compute(amdgpu_device_handle device_handle)
+{
+ amdgpu_wait_memory_helper(device_handle, AMDGPU_HW_IP_COMPUTE);
+}
+
+static void
+amdgpu_deadlock_sdma(amdgpu_device_handle device_handle)
+{
+ amdgpu_wait_memory_helper(device_handle, AMDGPU_HW_IP_DMA);
+}
+
igt_main
{
amdgpu_device_handle device;
@@ -64,6 +83,14 @@ igt_main
igt_assert_eq(r, 0);
}
+ igt_subtest("amdgpu_deadlock_sdma")
+ amdgpu_deadlock_sdma(device);
+
+ igt_subtest("amdgpu_deadlock_gfx")
+ amdgpu_deadlock_gfx(device);
+
+ igt_subtest("amdgpu_deadlock_compute")
+ amdgpu_deadlock_compute(device);
igt_subtest("dispatch_hang_slow_compute")
amdgpu_dispatch_hang_slow_compute(device);
--
2.25.1
next prev parent reply other threads:[~2022-11-11 21:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 21:52 [igt-dev] [PATCH 1/9] lib/amdgpu: add SPDX-License-Identifier: MIT vitaly.prosyak
2022-11-11 21:52 ` [igt-dev] [PATCH 2/9] lib/amdgpu: add predefined constants for PM4 and SDMA vitaly.prosyak
2022-11-11 21:52 ` [igt-dev] [PATCH 3/9] lib/amdgpu: add amdgpu_bo_alloc_and_map_raw helper vitaly.prosyak
2022-11-11 21:52 ` [igt-dev] [PATCH 4/9] lib/amdgpu: add deadlock helper vitaly.prosyak
2022-11-11 21:52 ` vitaly.prosyak [this message]
2022-11-11 21:52 ` [igt-dev] [PATCH 6/9] lib/amdgpu: add memory and reg. access helper function vitaly.prosyak
2022-11-11 21:52 ` [igt-dev] [PATCH 7/9] tests/amdgpu: add tests for invalid memory and register access vitaly.prosyak
2022-11-11 21:52 ` [igt-dev] [PATCH 8/9] tests/amdgpu: reuse predefined const GFX_COMPUTE_NOP vitaly.prosyak
2022-11-11 21:52 ` [igt-dev] [PATCH 9/9] tests/amdgpu: PCI unplug 4 tests for different scenario vitaly.prosyak
2022-11-11 22:27 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/9] lib/amdgpu: add SPDX-License-Identifier: MIT Patchwork
2022-11-12 14:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-11-12 18:28 ` [igt-dev] [PATCH 1/9] " Christian König
2022-11-12 18:30 ` vitaly prosyak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221111215213.48679-5-vitaly.prosyak@amd.com \
--to=vitaly.prosyak@amd.com \
--cc=Pierre-eric.Pelloux-prayer@amd.com \
--cc=christian.koenig@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=marek.olsak@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox