drm/amdgpu/sriov Don't send msg when smu suspend
For sriov and pp_onevf_mode, do not send message to set smu status, because smu doesn't support these messages under VF. Besides, it should skip smu_suspend when pp_onevf_mode is disabled. Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1461,21 +1461,26 @@ static int smu_suspend(void *handle)
|
||||
struct smu_context *smu = &adev->smu;
|
||||
bool baco_feature_is_enabled = false;
|
||||
|
||||
if (amdgpu_sriov_vf(adev)&& !amdgpu_sriov_is_pp_one_vf(adev))
|
||||
return 0;
|
||||
|
||||
if (!smu->pm_enabled)
|
||||
return 0;
|
||||
|
||||
if(!smu->is_apu)
|
||||
baco_feature_is_enabled = smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT);
|
||||
|
||||
ret = smu_system_features_control(smu, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (baco_feature_is_enabled) {
|
||||
ret = smu_feature_set_enabled(smu, SMU_FEATURE_BACO_BIT, true);
|
||||
if (ret) {
|
||||
pr_warn("set BACO feature enabled failed, return %d\n", ret);
|
||||
if(!amdgpu_sriov_vf(adev)) {
|
||||
ret = smu_system_features_control(smu, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (baco_feature_is_enabled) {
|
||||
ret = smu_feature_set_enabled(smu, SMU_FEATURE_BACO_BIT, true);
|
||||
if (ret) {
|
||||
pr_warn("set BACO feature enabled failed, return %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user