aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrike Liang <[email protected]>2020-04-15 21:43:41 +0800
committerAlex Deucher <[email protected]>2020-04-22 18:11:46 -0400
commit4e2fec3321d5c0a80b894c05eb2de51d06fa5c03 (patch)
treefc7a17ed07327f99fee4b644e2b5d4a064dfcef7
parent53c9c89ac118c93cb5cf352f9cb12a1494715348 (diff)
drm/amd/powerplay: fix resume failed as smu table initialize early exit
When the amdgpu in the suspend/resume loop need notify the dpm disabled, otherwise the smu table will be uninitialize and result in resume failed. Signed-off-by: Prike Liang <[email protected]> Tested-by: Mengbing Wang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/powerplay/renoir_ppt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
index 281b7b6cf1a4..16ed32f76954 100644
--- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
@@ -895,12 +895,17 @@ static int renoir_read_sensor(struct smu_context *smu,
static bool renoir_is_dpm_running(struct smu_context *smu)
{
+ struct amdgpu_device *adev = smu->adev;
+
/*
* Until now, the pmfw hasn't exported the interface of SMU
* feature mask to APU SKU so just force on all the feature
* at early initial stage.
*/
- return true;
+ if (adev->in_suspend)
+ return false;
+ else
+ return true;
}