From: Felix Kuehling <felix.kuehling@amd.com>
To: Graham Sider <Graham.Sider@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/amdgpu: extend halt_if_hws_hang to MES
Date: Tue, 1 Nov 2022 15:16:58 -0400 [thread overview]
Message-ID: <9a73be43-e373-cd65-51c6-19db30e2d1e8@amd.com> (raw)
In-Reply-To: <20221101144621.375662-1-Graham.Sider@amd.com>
On 2022-11-01 10:46, Graham Sider wrote:
> Hang on MES timeout if halt_if_hws_hang is set to 1.
>
> Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++
> drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 4 ++++
> drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4 ++++
> 3 files changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 0e6ddf05c23c..9999c18e7d8e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -219,10 +219,12 @@ extern int amdgpu_use_xgmi_p2p;
> extern int sched_policy;
> extern bool debug_evictions;
> extern bool no_system_mem_limit;
> +extern int halt_if_hws_hang;
> #else
> static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS;
> static const bool __maybe_unused debug_evictions; /* = false */
> static const bool __maybe_unused no_system_mem_limit;
> +static const int __maybe_unused halt_if_hws_hang;
> #endif
> #ifdef CONFIG_HSA_AMD_P2P
> extern bool pcie_p2p;
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c b/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c
> index 1abdf8b7ab50..614394118a53 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c
> @@ -121,6 +121,10 @@ static int mes_v10_1_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
> if (r < 1) {
> DRM_ERROR("MES failed to response msg=%d\n",
> x_pkt->header.opcode);
> +
> + while (halt_if_hws_hang)
> + schedule();
> +
> return -ETIMEDOUT;
> }
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> index 27a330f51c7d..7bfe862aa83e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> @@ -129,6 +129,10 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
> if (r < 1) {
> DRM_ERROR("MES failed to response msg=%d\n",
> x_pkt->header.opcode);
> +
> + while (halt_if_hws_hang)
> + schedule();
> +
> return -ETIMEDOUT;
> }
>
prev parent reply other threads:[~2022-11-01 19:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 14:46 [PATCH v2] drm/amdgpu: extend halt_if_hws_hang to MES Graham Sider
2022-11-01 19:16 ` Felix Kuehling [this message]
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=9a73be43-e373-cd65-51c6-19db30e2d1e8@amd.com \
--to=felix.kuehling@amd.com \
--cc=Graham.Sider@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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