Skip to content

Commit 31729e8

Browse files
timhuang-amdalexdeucher
authored andcommitted
drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11
While doing multiple S4 stress tests, GC/RLC/PMFW get into an invalid state resulting into hard hangs. Adding a GFX reset as workaround just before sending the MP1_UNLOAD message avoids this failure. Signed-off-by: Tim Huang <Tim.Huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d439692 commit 31729e8

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,18 @@ static int smu_v13_0_4_system_features_control(struct smu_context *smu, bool en)
226226
struct amdgpu_device *adev = smu->adev;
227227
int ret = 0;
228228

229-
if (!en && !adev->in_s0ix)
229+
if (!en && !adev->in_s0ix) {
230+
/* Adds a GFX reset as workaround just before sending the
231+
* MP1_UNLOAD message to prevent GC/RLC/PMFW from entering
232+
* an invalid state.
233+
*/
234+
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset,
235+
SMU_RESET_MODE_2, NULL);
236+
if (ret)
237+
return ret;
238+
230239
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PrepareMp1ForUnload, NULL);
240+
}
231241

232242
return ret;
233243
}

0 commit comments

Comments
 (0)