summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-06-17 07:29:11 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-06-17 07:29:11 +0000
commitcaf87c7db629ef3428f4475408e2096ff17a98e5 (patch)
tree7a43208e47b222f3ba5c8c85f4753cb8395dfbf1 /sys
parenteb536ce61db6debab64aa07025ee5dba9354be89 (diff)
drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms
From Mario Limonciello 7bc52dce073222c1b6dd23a1e76a68495fc14794 in linux-6.6.y/6.6.34 267cace556e8a53d703119f7435ab556209e5b6a in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c b/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c
index cd674ef5adb..1fd4702dc63 100644
--- a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c
+++ b/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c
@@ -226,15 +226,17 @@ static int smu_v13_0_4_system_features_control(struct smu_context *smu, bool en)
struct amdgpu_device *adev = smu->adev;
int ret = 0;
- if (!en && adev->in_s4) {
- /* Adds a GFX reset as workaround just before sending the
- * MP1_UNLOAD message to prevent GC/RLC/PMFW from entering
- * an invalid state.
- */
- ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset,
- SMU_RESET_MODE_2, NULL);
- if (ret)
- return ret;
+ if (!en && !adev->in_s0ix) {
+ if (adev->in_s4) {
+ /* Adds a GFX reset as workaround just before sending the
+ * MP1_UNLOAD message to prevent GC/RLC/PMFW from entering
+ * an invalid state.
+ */
+ ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset,
+ SMU_RESET_MODE_2, NULL);
+ if (ret)
+ return ret;
+ }
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PrepareMp1ForUnload, NULL);
}