drm/amd/powerplay: A workaround to GPU RESET on APU

BugLink: https://bugs.launchpad.net/bugs/1858428

[ Upstream commit 068ad870bb ]

Changes to function "smu_suspend" in amdgpu_smu.c is a workaround.

We should get real information about if baco is enabled or not, while we
always consider APU SMU feature as enabled in current code.

I know APU do not support baco mode for GPU reset, so I use
"adev->flags" to skip function "smu_feature_is_enabled".

Signed-off-by: chen gong <curry.gong@amd.com>
Reviewed-by: Aaron Liu <aaron.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
This commit is contained in:
chen gong 2019-09-23 15:02:56 +08:00 committed by Seth Forshee
parent 59b65ed844
commit 062726eb3e
1 changed files with 4 additions and 1 deletions

View File

@ -1344,7 +1344,10 @@ static int smu_suspend(void *handle)
int ret;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = &adev->smu;
bool baco_feature_is_enabled = smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT);
bool baco_feature_is_enabled = false;
if(!(adev->flags & AMD_IS_APU))
baco_feature_is_enabled = smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT);
ret = smu_system_features_control(smu, false);
if (ret)