From: Maximilian Luz <luzmaximilian@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Maximilian Luz <luzmaximilian@gmail.com>,
Mark Gross <mgross@linux.intel.com>, Len Brown <lenb@kernel.org>,
Mark Pearson <markpearson@lenovo.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/4] ACPI: platform: Add balanced-performance platform profile
Date: Thu, 11 Feb 2021 21:17:02 +0100 [thread overview]
Message-ID: <20210211201703.658240-4-luzmaximilian@gmail.com> (raw)
In-Reply-To: <20210211201703.658240-1-luzmaximilian@gmail.com>
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>
---
.../ABI/testing/sysfs-platform_profile | 18 +++++++++++-------
drivers/acpi/platform_profile.c | 1 +
include/linux/platform_profile.h | 1 +
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-platform_profile b/Documentation/ABI/testing/sysfs-platform_profile
index 9d6b89b66cca..dae9c8941905 100644
--- a/Documentation/ABI/testing/sysfs-platform_profile
+++ b/Documentation/ABI/testing/sysfs-platform_profile
@@ -5,13 +5,17 @@ Description: This file contains a space-separated list of profiles supported for
Drivers must use the following standard profile-names:
- ============ ============================================
- low-power Low power consumption
- cool Cooler operation
- quiet Quieter operation
- balanced Balance between low power consumption and performance
- performance High performance operation
- ============ ============================================
+ ==================== ========================================
+ low-power Low power consumption
+ cool Cooler operation
+ quiet Quieter operation
+ balanced Balance between low power consumption
+ 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
standard profile names.
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index 4a59c5993bde..dd2fbf38e414 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -17,6 +17,7 @@ static const char * const profile_names[] = {
[PLATFORM_PROFILE_COOL] = "cool",
[PLATFORM_PROFILE_QUIET] = "quiet",
[PLATFORM_PROFILE_BALANCED] = "balanced",
+ [PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
[PLATFORM_PROFILE_PERFORMANCE] = "performance",
};
static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
index b4794027e759..a6329003aee7 100644
--- a/include/linux/platform_profile.h
+++ b/include/linux/platform_profile.h
@@ -21,6 +21,7 @@ enum platform_profile_option {
PLATFORM_PROFILE_COOL,
PLATFORM_PROFILE_QUIET,
PLATFORM_PROFILE_BALANCED,
+ PLATFORM_PROFILE_BALANCED_PERFORMANCE,
PLATFORM_PROFILE_PERFORMANCE,
PLATFORM_PROFILE_LAST, /*must always be last */
};
--
2.30.0
next prev parent reply other threads:[~2021-02-11 20:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 20:16 [PATCH v2 0/4] platform/surface: Add platform profile driver for Surface devices Maximilian Luz
2021-02-11 20:17 ` [PATCH v2 1/4] ACPI: platform: Hide ACPI_PLATFORM_PROFILE option Maximilian Luz
2021-02-11 20:17 ` [PATCH v2 2/4] ACPI: platform: Fix file references in comment Maximilian Luz
2021-02-11 20:17 ` Maximilian Luz [this message]
2021-02-11 20:17 ` [PATCH v2 4/4] platform/surface: Add platform profile driver Maximilian Luz
2021-03-04 11:01 ` Hans de Goede
2021-02-12 15:29 ` [External] [PATCH v2 0/4] platform/surface: Add platform profile driver for Surface devices Mark Pearson
2021-02-15 14:34 ` Hans de Goede
2021-02-15 14:54 ` Rafael J. Wysocki
2021-02-15 14:56 ` Hans de Goede
2021-02-15 15:22 ` Hans de Goede
2021-02-15 15:29 ` Rafael J. Wysocki
2021-02-15 16:36 ` Hans de Goede
2021-02-15 18:40 ` Rafael J. Wysocki
2021-02-24 14:13 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210211201703.658240-4-luzmaximilian@gmail.com \
--to=luzmaximilian@gmail.com \
--cc=hdegoede@redhat.com \
--cc=jiaxun.yang@flygoat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markpearson@lenovo.com \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).