Skip to contentSkip to conversation

drm/amdgpu: don't use BACO for reset in S3

PATCH In review Alex Deucher 2 participants 2 messages Apr 1, 2022

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH v2 1/1 drm/amdgpu: don't use BACO for reset in S3

Seems to cause a reboots or hangs on some systems.

Fixes daf8de0874ab5b ("drm/amdgpu: always reset the asic in suspend (v2)")
---
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +7 -0
index c73fb73e9628..ee62c74685ae 100644
@@ -173,6 +173,13 @@ bool amdgpu_dpm_is_baco_supported(struct amdgpu_device *adev)
 
 	if (!pp_funcs || !pp_funcs->get_asic_baco_capability)
 		return false;
+	/* Don't use baco for reset in S3.
+	 * This is a workaround for some platforms
+	 * where entering BACO during suspend
+	 * seems to cause reboots or hangs.
+	 */
+	if (adev->in_s3)
+		return false;
 
 	mutex_lock(&adev->pm.mutex);
 
Signature · 1 line
2.35.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 16 lines · Alex Deucher

Seems to cause a reboots or hangs on some systems.

Fixes daf8de0874ab5b ("drm/amdgpu: always reset the asic in suspend (v2)")
---
  drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +0 -0
index c73fb73e9628..ee62c74685ae 100644
@@ -173,6 +173,13 @@ bool amdgpu_dpm_is_baco_supported(struct amdgpu_device *adev)
 

drivers/gpu/drm/amd/pm/amdgpu_dpm.c bool amdgpu_dpm_is_baco_supported(struct amdgpu_device *adev) · line 183

Quoted 10 lines
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +7 -0
  	if (!pp_funcs || !pp_funcs->get_asic_baco_capability)
  		return false;
+	/* Don't use baco for reset in S3.
+	 * This is a workaround for some platforms
+	 * where entering BACO during suspend
+	 * seems to cause reboots or hangs.
+	 */
+	if (adev->in_s3)
+		return false;
 

You may also mention about the thing that there is no device link checks during suspend, so it is not a safe thing to forcefully power off through BACO.

Thanks,
Lijo

Quoted 3 lines
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +0 -0
  	mutex_lock(&adev->pm.mutex);