mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 09:42:17 +07:00
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>
This commit is contained in:
parent
f9135b086b
commit
7adf5619ae
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user