Skip to content

Commit 8c7f0a4

Browse files
magist3ralexdeucher
authored andcommitted
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent bfa5807 commit 8c7f0a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3804,9 +3804,12 @@ static int smu7_trim_single_dpm_states(struct pp_hwmgr *hwmgr,
38043804
{
38053805
uint32_t i;
38063806

3807+
/* force the trim if mclk_switching is disabled to prevent flicker */
3808+
bool force_trim = (low_limit == high_limit);
38073809
for (i = 0; i < dpm_table->count; i++) {
38083810
/*skip the trim if od is enabled*/
3809-
if (!hwmgr->od_enabled && (dpm_table->dpm_levels[i].value < low_limit
3811+
if ((!hwmgr->od_enabled || force_trim)
3812+
&& (dpm_table->dpm_levels[i].value < low_limit
38103813
|| dpm_table->dpm_levels[i].value > high_limit))
38113814
dpm_table->dpm_levels[i].enabled = false;
38123815
else

0 commit comments

Comments
 (0)