]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu/powerplay: fix AVFS handling with custom powerplay table
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Nov 2019 14:50:18 +0000 (09:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Nov 2019 17:30:24 +0000 (12:30 -0500)
When a custom powerplay table is provided, we need to update
the OD VDDC flag to avoid AVFS being enabled when it shouldn't be.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c

index d3229c274a36158d106349e763822605ab7fa174..d71a492c87a325f975121fc656c05d3598c7f42e 100644 (file)
@@ -3689,6 +3689,13 @@ static int vega10_set_power_state_tasks(struct pp_hwmgr *hwmgr,
        PP_ASSERT_WITH_CODE(!result,
                        "Failed to upload PPtable!", return result);
 
+       /*
+        * If a custom pp table is loaded, set DPMTABLE_OD_UPDATE_VDDC flag.
+        * That effectively disables AVFS feature.
+        */
+       if(hwmgr->hardcode_pp_table != NULL)
+               data->need_update_dpm_table |= DPMTABLE_OD_UPDATE_VDDC;
+
        vega10_update_avfs(hwmgr);
 
        /*