From: Chengming Gui Date: Fri, 18 Jan 2019 02:15:22 +0000 (+0800) Subject: drm/amd/powerplay: add vega20_unforce_dpm_levels for SMU11. X-Git-Tag: microblaze-v5.4-rc1~702^2~36^2~238 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=f277ff0feacc09c11b26654df9d2b8f1b339cbd8;p=linux-2.6-microblaze.git drm/amd/powerplay: add vega20_unforce_dpm_levels for SMU11. add vega20_unforce_dpm_levels to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c index 15fc30fe75dd..5de0eabbeb29 100644 --- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c @@ -1725,6 +1725,25 @@ static int vega20_force_dpm_lowest(struct smu_context *smu) return ret; } +static int vega20_unforce_dpm_levels(struct smu_context *smu) +{ + int ret = 0; + + ret = vega20_upload_dpm_min_level(smu); + if (ret) { + pr_err("Failed to upload DPM Bootup Levels!"); + return ret; + } + + ret = vega20_upload_dpm_max_level(smu); + if (ret) { + pr_err("Failed to upload DPM Max Levels!"); + return ret; + } + + return ret; +} + static const struct pptable_funcs vega20_ppt_funcs = { .alloc_dpm_context = vega20_allocate_dpm_context, .store_powerplay_table = vega20_store_powerplay_table,