summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSergei Lopatin <magist3r@gmail.com>2019-06-26 14:56:59 +0500
committerAlex Deucher <alexander.deucher@amd.com>2020-04-13 12:01:40 -0400
commit7adf5619ae82244446e0e9e5199d96c316f3c80d (patch)
tree1b7279e7ef5078890afd3be2febd526ec361bf7f /drivers
parentf9135b086b5863eeb83973fd291a7c30ba62333e (diff)
downloadlinux-stable-7adf5619ae82244446e0e9e5199d96c316f3c80d.tar.gz
linux-stable-7adf5619ae82244446e0e9e5199d96c316f3c80d.tar.bz2
linux-stable-7adf5619ae82244446e0e9e5199d96c316f3c80d.zip
drm/amd/powerplay: force the trim of the mclk dpm_levels if OD is enabled
Should prevent flicker if PP_OVERDRIVE_MASK is set. bug: https://bugs.freedesktop.org/show_bug.cgi?id=102646 bug: https://bugs.freedesktop.org/show_bug.cgi?id=108941 bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1088 bug: https://gitlab.freedesktop.org/drm/amd/-/issues/628 Signed-off-by: Sergei Lopatin <magist3r@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index f1d3254e61c3..753cb2cf6b77 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -3819,9 +3819,12 @@ static int smu7_trim_single_dpm_states(struct pp_hwmgr *hwmgr,
{
uint32_t i;
+ /* force the trim if mclk_switching is disabled to prevent flicker */
+ bool force_trim = (low_limit == high_limit);
for (i = 0; i < dpm_table->count; i++) {
/*skip the trim if od is enabled*/
- if (!hwmgr->od_enabled && (dpm_table->dpm_levels[i].value < low_limit
+ if ((!hwmgr->od_enabled || force_trim)
+ && (dpm_table->dpm_levels[i].value < low_limit
|| dpm_table->dpm_levels[i].value > high_limit))
dpm_table->dpm_levels[i].enabled = false;
else