drm/amd/powerplay: fix resume failed as smu table initialize early exit
authorPrike Liang <Prike.Liang@amd.com>
Wed, 15 Apr 2020 13:43:41 +0000 (21:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Apr 2020 21:31:36 +0000 (17:31 -0400)
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>
drivers/gpu/drm/amd/powerplay/renoir_ppt.c

index ff73a735b8882a4844ac87dda3ca75588e6fe453..b0ed1b3fe79a351a82ab984aac7ccee57aff89fd 100644 (file)
@@ -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;
 
 }