diff options
author | Evan Quan <evan.quan@amd.com> | 2018-10-18 17:54:06 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-10-22 14:42:46 -0500 |
commit | b44ec6a3eb386d398c6c8b8c60d1c8473ff9cb7e (patch) | |
tree | 0177c1bc42d7499c3e774ad9cf24d403b2260a12 | |
parent | f7becf9a0803030ae125189823328e2d62b90f7b (diff) | |
download | linux-stable-b44ec6a3eb386d398c6c8b8c60d1c8473ff9cb7e.tar.gz linux-stable-b44ec6a3eb386d398c6c8b8c60d1c8473ff9cb7e.tar.bz2 linux-stable-b44ec6a3eb386d398c6c8b8c60d1c8473ff9cb7e.zip |
drm/amd/powerplay: drop highest UCLK setting after display configuration change
The UCLK is forced to highest at the start of display configuration
change. Downgrade the UCLK from highest after display configuration change.
Otherwise, we may see the UCLK stuck in the highest in some cases.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c index b4dbbb7c334c..6e0b2b8df455 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c @@ -2046,6 +2046,8 @@ static int vega20_notify_smc_display_config_after_ps_adjustment( { struct vega20_hwmgr *data = (struct vega20_hwmgr *)(hwmgr->backend); + struct vega20_single_dpm_table *dpm_table = + &data->dpm_table.mem_table; struct PP_Clocks min_clocks = {0}; struct pp_display_clock_request clock_req; int ret = 0; @@ -2076,6 +2078,15 @@ static int vega20_notify_smc_display_config_after_ps_adjustment( } } + if (data->smu_features[GNLD_DPM_UCLK].enabled) { + dpm_table->dpm_state.hard_min_level = min_clocks.memoryClock / 100; + PP_ASSERT_WITH_CODE(!(ret = smum_send_msg_to_smc_with_parameter(hwmgr, + PPSMC_MSG_SetHardMinByFreq, + (PPCLK_UCLK << 16 ) | dpm_table->dpm_state.hard_min_level)), + "[SetHardMinFreq] Set hard min uclk failed!", + return ret); + } + return 0; } |