Skip to content

Commit f67644b

Browse files
Kenneth Fengalexdeucher
authored andcommitted
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: Kenneth Feng <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 7d9af45)
1 parent f888e3d commit f67644b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ static int smu_v14_0_2_set_power_profile_mode(struct smu_context *smu,
17991799
DpmActivityMonitorCoeffInt_t *activity_monitor =
18001800
&(activity_monitor_external.DpmActivityMonitorCoeffInt);
18011801
int workload_type, ret = 0;
1802-
1802+
uint32_t current_profile_mode = smu->power_profile_mode;
18031803
smu->power_profile_mode = input[size];
18041804

18051805
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,
18571857
}
18581858
}
18591859

1860+
if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_COMPUTE)
1861+
smu_v14_0_deep_sleep_control(smu, false);
1862+
else if (current_profile_mode == PP_SMC_POWER_PROFILE_COMPUTE)
1863+
smu_v14_0_deep_sleep_control(smu, true);
1864+
18601865
/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
18611866
workload_type = smu_cmn_to_asic_specific_index(smu,
18621867
CMN2ASIC_MAPPING_WORKLOAD,

0 commit comments

Comments
 (0)