@@ -219,12 +219,15 @@ static int amd_pmf_get_slider_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_
switch (dev->current_profile) {
case PLATFORM_PROFILE_PERFORMANCE:
+ case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
val = TA_BEST_PERFORMANCE;
break;
case PLATFORM_PROFILE_BALANCED:
val = TA_BETTER_PERFORMANCE;
break;
case PLATFORM_PROFILE_LOW_POWER:
+ case PLATFORM_PROFILE_COOL:
+ case PLATFORM_PROFILE_QUIET:
val = TA_BEST_BATTERY;
break;
default:
@@ -297,12 +297,15 @@ int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf)
switch (pmf->current_profile) {
case PLATFORM_PROFILE_PERFORMANCE:
+ case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
mode = POWER_MODE_PERFORMANCE;
break;
case PLATFORM_PROFILE_BALANCED:
mode = POWER_MODE_BALANCED_POWER;
break;
case PLATFORM_PROFILE_LOW_POWER:
+ case PLATFORM_PROFILE_COOL:
+ case PLATFORM_PROFILE_QUIET:
mode = POWER_MODE_POWER_SAVER;
break;
default:
@@ -369,6 +372,10 @@ static int amd_pmf_profile_set(struct device *dev,
struct amd_pmf_dev *pmf = dev_get_drvdata(dev);
int ret = 0;
+ /* If the profile is custom, bail without an error. */
+ if (profile == PLATFORM_PROFILE_CUSTOM)
+ return 0;
+
pmf->current_profile = profile;
/* Notify EC about the slider position change */
As a secondary handler, the amd-pmf module should be able to accept all platform profiles. In the case of a custom profile, it should NOOP without an error to allow primary handlers to receive a custom profile. The sysfs endpoint will still report custom, after all. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/platform/x86/amd/pmf/spc.c | 3 +++ drivers/platform/x86/amd/pmf/sps.c | 7 +++++++ 2 files changed, 10 insertions(+)