Skip to content

Commit 267cace

Browse files
superm1alexdeucher
authored andcommitted
drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms
commit cd94d1b ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users") attempted to fix shutdown issues that were reported since commit 31729e8 ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11") but caused issues for some people. Adjust the workaround flow to properly only apply in the S4 case: -> For shutdown go through SMU_MSG_PrepareMp1ForUnload -> For S4 go through SMU_MSG_GfxDeviceDriverReset and SMU_MSG_PrepareMp1ForUnload Reported-and-tested-by: lectrode <[email protected]> Closes: void-linux/void-packages#50417 Cc: [email protected] Fixes: cd94d1b ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users") Reviewed-by: Tim Huang <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent c3f38fa commit 267cace

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,17 @@ 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_s4) {
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;
229+
if (!en && !adev->in_s0ix) {
230+
if (adev->in_s4) {
231+
/* Adds a GFX reset as workaround just before sending the
232+
* MP1_UNLOAD message to prevent GC/RLC/PMFW from entering
233+
* an invalid state.
234+
*/
235+
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset,
236+
SMU_RESET_MODE_2, NULL);
237+
if (ret)
238+
return ret;
239+
}
238240

239241
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PrepareMp1ForUnload, NULL);
240242
}

0 commit comments

Comments
 (0)