Commit 8c7f0a44 authored by Sergei Lopatin's avatar Sergei Lopatin Committed by Alex Deucher
Browse files

drm/amd/powerplay: force the trim of the mclk dpm_levels if OD is enabled

parent bfa5807d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3804,9 +3804,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