Commit f67644b2 authored by Kenneth Feng's avatar Kenneth Feng Committed by Alex Deucher
Browse files

drm/amd/pm: update deep sleep status on smu v14.0.2/3



disable deep sleep during the compute workload for the
potential performance loss on smu v14.0.2/3

Signed-off-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7d9af459)
parent f888e3d3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1799,7 +1799,7 @@ static int smu_v14_0_2_set_power_profile_mode(struct smu_context *smu,
	DpmActivityMonitorCoeffInt_t *activity_monitor =
		&(activity_monitor_external.DpmActivityMonitorCoeffInt);
	int workload_type, ret = 0;

	uint32_t current_profile_mode = smu->power_profile_mode;
	smu->power_profile_mode = input[size];

	if (smu->power_profile_mode >= PP_SMC_POWER_PROFILE_COUNT) {
@@ -1857,6 +1857,11 @@ static int smu_v14_0_2_set_power_profile_mode(struct smu_context *smu,
		}
	}

	if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_COMPUTE)
		smu_v14_0_deep_sleep_control(smu, false);
	else if (current_profile_mode == PP_SMC_POWER_PROFILE_COMPUTE)
		smu_v14_0_deep_sleep_control(smu, true);

	/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
	workload_type = smu_cmn_to_asic_specific_index(smu,
						       CMN2ASIC_MAPPING_WORKLOAD,