ACPI: platform: Add balanced-performance platform profile

Some devices, including most Microsoft Surface devices, have a platform
profile somewhere inbetween balanced and performance. More specifically,
adding this profile allows the following mapping on Surface devices:

  Vendor Name           Platform Profile
  ------------------------------------------
  Battery Saver         low-power
  Recommended           balanced
  Better Performance    balanced-performance
  Best Performance      performance

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Maximilian Luz
2021-02-11 21:17:02 +01:00
committed by Rafael J. Wysocki
parent 6120484ef2
commit 6c0b5e3fc6
3 changed files with 13 additions and 7 deletions

View File

@@ -5,13 +5,17 @@ Description: This file contains a space-separated list of profiles supported for
Drivers must use the following standard profile-names: Drivers must use the following standard profile-names:
============ ============================================ ==================== ========================================
low-power Low power consumption low-power Low power consumption
cool Cooler operation cool Cooler operation
quiet Quieter operation quiet Quieter operation
balanced Balance between low power consumption and performance balanced Balance between low power consumption
performance High performance operation and performance
============ ============================================ balanced-performance Balance between performance and low
power consumption with a slight bias
towards performance
performance High performance operation
==================== ========================================
Userspace may expect drivers to offer more than one of these Userspace may expect drivers to offer more than one of these
standard profile names. standard profile names.

View File

@@ -17,6 +17,7 @@ static const char * const profile_names[] = {
[PLATFORM_PROFILE_COOL] = "cool", [PLATFORM_PROFILE_COOL] = "cool",
[PLATFORM_PROFILE_QUIET] = "quiet", [PLATFORM_PROFILE_QUIET] = "quiet",
[PLATFORM_PROFILE_BALANCED] = "balanced", [PLATFORM_PROFILE_BALANCED] = "balanced",
[PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
[PLATFORM_PROFILE_PERFORMANCE] = "performance", [PLATFORM_PROFILE_PERFORMANCE] = "performance",
}; };
static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST); static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);

View File

@@ -21,6 +21,7 @@ enum platform_profile_option {
PLATFORM_PROFILE_COOL, PLATFORM_PROFILE_COOL,
PLATFORM_PROFILE_QUIET, PLATFORM_PROFILE_QUIET,
PLATFORM_PROFILE_BALANCED, PLATFORM_PROFILE_BALANCED,
PLATFORM_PROFILE_BALANCED_PERFORMANCE,
PLATFORM_PROFILE_PERFORMANCE, PLATFORM_PROFILE_PERFORMANCE,
PLATFORM_PROFILE_LAST, /*must always be last */ PLATFORM_PROFILE_LAST, /*must always be last */
}; };