drm/amdgpu/swsmu: set workload profile to bootup default
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jan 2025 21:11:42 +0000 (16:11 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 13 Feb 2025 02:02:56 +0000 (21:02 -0500)
Now that we can select a workload profile dynamically when
we submit work, it's best to default to the bootup
default workload profile.  Defaulting to other profiles
prevents some power management features from kicking in
during idle periods.  Once all jobs have finished, the
workload profile will automatically move back to default
bootup for max power savings.

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

index 167839f4dd2f7b5f30fcf785e0709df83d57c52d..488360d2aaae3ffb83702d3394dffec274ed8354 100644 (file)
@@ -1253,26 +1253,11 @@ static void smu_init_xgmi_plpd_mode(struct smu_context *smu)
        }
 }
 
-static bool smu_is_workload_profile_available(struct smu_context *smu,
-                                             u32 profile)
-{
-       if (profile >= PP_SMC_POWER_PROFILE_COUNT)
-               return false;
-       return smu->workload_map && smu->workload_map[profile].valid_mapping;
-}
-
 static void smu_init_power_profile(struct smu_context *smu)
 {
-       if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_UNKNOWN) {
-               if (smu->is_apu ||
-                   !smu_is_workload_profile_available(
-                           smu, PP_SMC_POWER_PROFILE_FULLSCREEN3D))
-                       smu->power_profile_mode =
-                               PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
-               else
-                       smu->power_profile_mode =
-                               PP_SMC_POWER_PROFILE_FULLSCREEN3D;
-       }
+       if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_UNKNOWN)
+               smu->power_profile_mode =
+                       PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
        smu_power_profile_mode_get(smu, smu->power_profile_mode);
 }
 
index 55ef18517b0fcba58f3357320799e3c6345645cb..19f47811f6db2d25b24b2cf7f3654b1d33343827 100644 (file)
@@ -2811,5 +2811,4 @@ void smu_v13_0_7_set_ppt_funcs(struct smu_context *smu)
        smu->workload_map = smu_v13_0_7_workload_map;
        smu->smc_driver_if_version = SMU13_0_7_DRIVER_IF_VERSION;
        smu_v13_0_set_smu_mailbox_registers(smu);
-       smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
 }