aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
diff options
context:
space:
mode:
authorPrike Liang <Prike.Liang@amd.com>2020-04-15 21:43:41 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-04-17 17:31:36 -0400
commit45a5e639548c459a5accebad340078e4e6e0e512 (patch)
treec53a5aceae4ce26220b7387116c1c75f5d900b41 /drivers/gpu/drm/amd/powerplay/renoir_ppt.c
parentMerge branch 'linux-5.7' of git://github.com/skeggsb/linux into drm-fixes (diff)
downloadwireguard-linux-45a5e639548c459a5accebad340078e4e6e0e512.tar.xz
wireguard-linux-45a5e639548c459a5accebad340078e4e6e0e512.zip
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>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/renoir_ppt.c')
-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 ff73a735b888..b0ed1b3fe79a 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;
+
/*
* Util 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;
}