drm/amd/powerplay: add vega20_unforce_dpm_levels for SMU11.
authorChengming Gui <Jack.Gui@amd.com>
Fri, 18 Jan 2019 02:15:22 +0000 (10:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:04:00 +0000 (15:04 -0500)
add vega20_unforce_dpm_levels to support sys interface for SMU11.

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/vega20_ppt.c

index 15fc30fe75ddf6da0aa2c8257632864a23db36a5..5de0eabbeb2938b1ef9e45d271dcc3ef4f253089 100644 (file)
@@ -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,