summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrike Liang <Prike.Liang@amd.com>2020-04-15 16:43:41 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-04-23 01:11:46 +0300
commit4e2fec3321d5c0a80b894c05eb2de51d06fa5c03 (patch)
treefc7a17ed07327f99fee4b644e2b5d4a064dfcef7
parent53c9c89ac118c93cb5cf352f9cb12a1494715348 (diff)
downloadlinux-4e2fec3321d5c0a80b894c05eb2de51d06fa5c03.tar.xz
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 <Prike.Liang@amd.com> Tested-by: Mengbing Wang <Mengbing.Wang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-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;
}