Skip to content

Commit 7be3be2

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 daf8de0 commit 7be3be2

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
@@ -2238,12 +2238,27 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
22382238
if (amdgpu_device_supports_px(drm_dev))
22392239
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
22402240

2241+
/*
2242+
* By setting mp1_state as PP_MP1_STATE_UNLOAD, MP1 will do some
2243+
* proper cleanups and put itself into a state ready for PNP. That
2244+
* can address some random resuming failure observed on BOCO capable
2245+
* platforms.
2246+
* TODO: this may be also needed for PX capable platform.
2247+
*/
2248+
if (amdgpu_device_supports_boco(drm_dev))
2249+
adev->mp1_state = PP_MP1_STATE_UNLOAD;
2250+
22412251
ret = amdgpu_device_suspend(drm_dev, false);
22422252
if (ret) {
22432253
adev->in_runpm = false;
2254+
if (amdgpu_device_supports_boco(drm_dev))
2255+
adev->mp1_state = PP_MP1_STATE_NONE;
22442256
return ret;
22452257
}
22462258

2259+
if (amdgpu_device_supports_boco(drm_dev))
2260+
adev->mp1_state = PP_MP1_STATE_NONE;
2261+
22472262
if (amdgpu_device_supports_px(drm_dev)) {
22482263
/* Only need to handle PCI state in the driver for ATPX
22492264
* PCI core handles it for _PR3.

0 commit comments

Comments
 (0)