Commit 9a1662f5 authored by Graham Sider's avatar Graham Sider Committed by Alex Deucher

drm/amdgpu: extend halt_if_hws_hang to MES

Hang on MES timeout if halt_if_hws_hang is set to 1.
Signed-off-by: default avatarGraham Sider <Graham.Sider@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 403cea40
...@@ -219,10 +219,12 @@ extern int amdgpu_use_xgmi_p2p; ...@@ -219,10 +219,12 @@ extern int amdgpu_use_xgmi_p2p;
extern int sched_policy; extern int sched_policy;
extern bool debug_evictions; extern bool debug_evictions;
extern bool no_system_mem_limit; extern bool no_system_mem_limit;
extern int halt_if_hws_hang;
#else #else
static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS; static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS;
static const bool __maybe_unused debug_evictions; /* = false */ static const bool __maybe_unused debug_evictions; /* = false */
static const bool __maybe_unused no_system_mem_limit; static const bool __maybe_unused no_system_mem_limit;
static const int __maybe_unused halt_if_hws_hang;
#endif #endif
#ifdef CONFIG_HSA_AMD_P2P #ifdef CONFIG_HSA_AMD_P2P
extern bool pcie_p2p; extern bool pcie_p2p;
......
...@@ -121,6 +121,10 @@ static int mes_v10_1_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, ...@@ -121,6 +121,10 @@ static int mes_v10_1_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
if (r < 1) { if (r < 1) {
DRM_ERROR("MES failed to response msg=%d\n", DRM_ERROR("MES failed to response msg=%d\n",
x_pkt->header.opcode); x_pkt->header.opcode);
while (halt_if_hws_hang)
schedule();
return -ETIMEDOUT; return -ETIMEDOUT;
} }
......
...@@ -129,6 +129,10 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, ...@@ -129,6 +129,10 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
if (r < 1) { if (r < 1) {
DRM_ERROR("MES failed to response msg=%d\n", DRM_ERROR("MES failed to response msg=%d\n",
x_pkt->header.opcode); x_pkt->header.opcode);
while (halt_if_hws_hang)
schedule();
return -ETIMEDOUT; return -ETIMEDOUT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment