Commit 068ad870 authored by chen gong's avatar chen gong Committed by Alex Deucher

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

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: default avatarchen gong <curry.gong@amd.com>
Reviewed-by: default avatarAaron Liu <aaron.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 80f9bfe4
...@@ -1363,7 +1363,10 @@ static int smu_suspend(void *handle) ...@@ -1363,7 +1363,10 @@ static int smu_suspend(void *handle)
int ret; int ret;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = &adev->smu; 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); ret = smu_system_features_control(smu, false);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment