From: Huang Rui Date: Wed, 20 Feb 2019 11:58:11 +0000 (+0800) Subject: drm/amd/powerplay: move setting allowed mask and feature enabling together X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d4631cba9ebe6743df123e7c99372dfb2f840d1f;p=openwrt%2Fstaging%2Fblogic.git drm/amd/powerplay: move setting allowed mask and feature enabling together This patch moves setting allowed mask and feature enabling together to refine the programming sequence. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index 7857ceb7403f..fa6248d8adf9 100644 --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c @@ -586,10 +586,6 @@ static int smu_smc_table_hw_init(struct smu_context *smu, if (ret) return ret; - ret = smu_feature_set_allowed_mask(smu); - if (ret) - return ret; - if (initialize) { ret = smu_read_pptable_from_vbios(smu); if (ret) @@ -654,6 +650,10 @@ static int smu_smc_table_hw_init(struct smu_context *smu, if (ret) return ret; + ret = smu_feature_set_allowed_mask(smu); + if (ret) + return ret; + ret = smu_system_features_control(smu, true); if (ret) return ret;