Skip to contentSkip to conversation

drm/amdgpu: Fix the runtime resume failure issue

PATCH In review Ma Jun 2 participants 2 messages Feb 21, 2024

Subsystems (2)
lore
Share & tools
lore

Ma Jun

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix the runtime resume failure issue

Don't set power state flag when system enter runtime suspend, or it may cause runtime resume failure issue.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +3 -0
index f754e50e7b43..4f1a4435cee4 100644
@@ -1531,6 +1531,9 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
  */
 void amdgpu_choose_low_power_state(struct amdgpu_device *adev)
 {
+	if (adev->in_runpm)
+		return;
+
 	if (amdgpu_acpi_is_s0ix_active(adev))
 		adev->in_s0ix = true;
 	else if (amdgpu_acpi_is_s3_active(adev))
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Ma Jun

Don't set power state flag when system enter runtime suspend, or it may cause runtime resume failure issue.

Please add a fixes tag for 3a9626c816db901def438dc2513622e281186d39 when committing.

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +3 -0
index f754e50e7b43..4f1a4435cee4 100644
@@ -1531,6 +1531,9 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
   */
  void amdgpu_choose_low_power_state(struct amdgpu_device *adev)
  {
+	if (adev->in_runpm)
+		return;
+
  	if (amdgpu_acpi_is_s0ix_active(adev))
  		adev->in_s0ix = true;
  	else if (amdgpu_acpi_is_s3_active(adev))