Skip to contentSkip to conversation

dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users

PATCH In review Mario Limonciello 2 participants 2 messages May 2, 2024 – May 3, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users

Limit the workaround introduced by commit 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11") to only run in the s4 path.

Cc Tim Huang <[email protected]>
Fixes 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11")

---
I tested this on SMU 13.0.4 for ~85 cycles with this script, BIOS 1.1.0.2a and didn't observe any hangs.

```
#!/bin/sh
echo test_resume > /sys/power/disk
i=1
while [ : ]; do

  echo "Starting cycle $i"
  echo disk > /sys/power/state
  echo "Ending cycle $i"
  i=$((i+1))
  sleep 5
done
```
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +1 -1
index 949131bd1ecb..4abfcd32747d 100644
@@ -226,7 +226,7 @@ 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_s0ix) {
+	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.
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Mario Limonciello

Limit the workaround introduced by commit 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11") to only run in the s4 path.

Cc Tim Huang <[email protected]>
Fixes 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11")
Quoted 37 lines

---
I tested this on SMU 13.0.4 for ~85 cycles with this script, BIOS 1.1.0.2a and didn't observe any hangs.

```
#!/bin/sh
echo test_resume > /sys/power/disk
i=1
while [ : ]; do

  echo "Starting cycle $i"
  echo disk > /sys/power/state
  echo "Ending cycle $i"
  i=$((i+1))
  sleep 5
done
```
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +1 -2
index 949131bd1ecb..4abfcd32747d 100644
@@ -226,7 +226,7 @@ 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_s0ix) {
+       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.
--

2.43.0