platform/x86/amd: pmf: Fix missing hidden options for Smart PC

JIRA: https://issues.redhat.com/browse/RHEL-105420

commit 4490fe973669360efaef7350aeb9706f70164176
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Wed Mar 5 21:44:02 2025 -0600

    platform/x86/amd: pmf: Fix missing hidden options for Smart PC

    amd_pmf_get_slider_info() checks the current profile to report correct
    value to the TA inputs.  If hidden options are in use then the wrong
    values will be reported to TA.

    Add the two compat options PLATFORM_PROFILE_BALANCED_PERFORMANCE and
    PLATFORM_PROFILE_QUIET for this use.

    Reported-by: Yijun Shen <Yijun.Shen@dell.com>
    Fixes: 9a43102daf64d ("platform/x86/amd: pmf: Add balanced-performance to hidden choices")
    Fixes: 44e94fece5170 ("platform/x86/amd: pmf: Add 'quiet' to hidden choices")
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
    Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
    Link: https://lore.kernel.org/r/20250306034402.50478-1-superm1@kernel.org
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
This commit is contained in:
David Arcari 2025-09-18 15:17:51 -04:00
parent f253124ccc
commit 45f2db52c6
1 changed files with 2 additions and 0 deletions

View File

@ -219,12 +219,14 @@ 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_QUIET:
val = TA_BEST_BATTERY;
break;
default: