Skip to content

Commit 4a70054

Browse files
Evan Quanalexdeucher
authored andcommitted
drm/amdgpu: put SMU into proper state on runpm suspending for BOCO capable platform
By setting mp1_state as PP_MP1_STATE_UNLOAD, MP1 will do some proper cleanups and put itself into a state ready for PNP. That can workaround some random resuming failure observed on BOCO capable platforms. Signed-off-by: Evan Quan <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Guchun Chen <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0726ed3 commit 4a70054

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,12 +2251,27 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
22512251
if (amdgpu_device_supports_px(drm_dev))
22522252
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
22532253

2254+
/*
2255+
* By setting mp1_state as PP_MP1_STATE_UNLOAD, MP1 will do some
2256+
* proper cleanups and put itself into a state ready for PNP. That
2257+
* can address some random resuming failure observed on BOCO capable
2258+
* platforms.
2259+
* TODO: this may be also needed for PX capable platform.
2260+
*/
2261+
if (amdgpu_device_supports_boco(drm_dev))
2262+
adev->mp1_state = PP_MP1_STATE_UNLOAD;
2263+
22542264
ret = amdgpu_device_suspend(drm_dev, false);
22552265
if (ret) {
22562266
adev->in_runpm = false;
2267+
if (amdgpu_device_supports_boco(drm_dev))
2268+
adev->mp1_state = PP_MP1_STATE_NONE;
22572269
return ret;
22582270
}
22592271

2272+
if (amdgpu_device_supports_boco(drm_dev))
2273+
adev->mp1_state = PP_MP1_STATE_NONE;
2274+
22602275
if (amdgpu_device_supports_px(drm_dev)) {
22612276
/* Only need to handle PCI state in the driver for ATPX
22622277
* PCI core handles it for _PR3.

0 commit comments

Comments
 (0)