[PATCH v2 1/3] acpi: platform_profile - Add Extreme profile option

Derek J. Clark posted 3 patches 1 month, 1 week ago
[PATCH v2 1/3] acpi: platform_profile - Add Extreme profile option
Posted by Derek J. Clark 1 month, 1 week ago
Some devices, namely Lenovo Legion devices, have an "extreme" mode where
power draw is at the maximum limit of the cooling hardware. Add a new
"extreme" platform profile to properly reflect this operating mode.

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
---
 Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
 drivers/acpi/platform_profile.c                        | 1 +
 include/linux/platform_profile.h                       | 1 +
 3 files changed, 4 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
index dc72adfb830a..9bee8deb4dc9 100644
--- a/Documentation/ABI/testing/sysfs-class-platform-profile
+++ b/Documentation/ABI/testing/sysfs-class-platform-profile
@@ -23,6 +23,8 @@ Description:	This file contains a space-separated list of profiles supported
 					power consumption with a slight bias
 					towards performance
 		performance		High performance operation
+		extreme			Higher performance operation that may exceed
+					internal battery draw limits when on AC power
 		custom			Driver defined custom profile
 		====================	========================================
 
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index b43f4459a4f6..78da17e16d9b 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -37,6 +37,7 @@ static const char * const profile_names[] = {
 	[PLATFORM_PROFILE_BALANCED] = "balanced",
 	[PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
 	[PLATFORM_PROFILE_PERFORMANCE] = "performance",
+	[PLATFORM_PROFILE_EXTREME] = "extreme",
 	[PLATFORM_PROFILE_CUSTOM] = "custom",
 };
 static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
index a299225ab92e..2bf178bde2b5 100644
--- a/include/linux/platform_profile.h
+++ b/include/linux/platform_profile.h
@@ -24,6 +24,7 @@ enum platform_profile_option {
 	PLATFORM_PROFILE_BALANCED,
 	PLATFORM_PROFILE_BALANCED_PERFORMANCE,
 	PLATFORM_PROFILE_PERFORMANCE,
+	PLATFORM_PROFILE_EXTREME,
 	PLATFORM_PROFILE_CUSTOM,
 	PLATFORM_PROFILE_LAST, /*must always be last */
 };
-- 
2.51.1
Re: [PATCH v2 1/3] acpi: platform_profile - Add Extreme profile option
Posted by Ilpo Järvinen 1 month, 1 week ago
On Thu, 6 Nov 2025, Derek J. Clark wrote:

> Some devices, namely Lenovo Legion devices, have an "extreme" mode where
> power draw is at the maximum limit of the cooling hardware. Add a new
> "extreme" platform profile to properly reflect this operating mode.
> 
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
> ---
>  Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
>  drivers/acpi/platform_profile.c                        | 1 +
>  include/linux/platform_profile.h                       | 1 +
>  3 files changed, 4 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
> index dc72adfb830a..9bee8deb4dc9 100644
> --- a/Documentation/ABI/testing/sysfs-class-platform-profile
> +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
> @@ -23,6 +23,8 @@ Description:	This file contains a space-separated list of profiles supported
>  					power consumption with a slight bias
>  					towards performance
>  		performance		High performance operation
> +		extreme			Higher performance operation that may exceed
> +					internal battery draw limits when on AC power
>  		custom			Driver defined custom profile
>  		====================	========================================
>  
> diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
> index b43f4459a4f6..78da17e16d9b 100644
> --- a/drivers/acpi/platform_profile.c
> +++ b/drivers/acpi/platform_profile.c
> @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
>  	[PLATFORM_PROFILE_BALANCED] = "balanced",
>  	[PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
>  	[PLATFORM_PROFILE_PERFORMANCE] = "performance",
> +	[PLATFORM_PROFILE_EXTREME] = "extreme",
>  	[PLATFORM_PROFILE_CUSTOM] = "custom",
>  };
>  static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
> diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
> index a299225ab92e..2bf178bde2b5 100644
> --- a/include/linux/platform_profile.h
> +++ b/include/linux/platform_profile.h
> @@ -24,6 +24,7 @@ enum platform_profile_option {
>  	PLATFORM_PROFILE_BALANCED,
>  	PLATFORM_PROFILE_BALANCED_PERFORMANCE,
>  	PLATFORM_PROFILE_PERFORMANCE,
> +	PLATFORM_PROFILE_EXTREME,
>  	PLATFORM_PROFILE_CUSTOM,
>  	PLATFORM_PROFILE_LAST, /*must always be last */
>  };
> 

I wonder if "extreme" is the best name for this? Given the description you 
gave above, perhaps "max-power" would be more descriptive (and we already 
have "low-power" so it kind of feels fitting the theme too).

I don't have strong opinion on this so if you guys feel this suggestion 
would not make things better, feel free to voice it. :-)

-- 
 i.
Re: [PATCH v2 1/3] acpi: platform_profile - Add Extreme profile option
Posted by Mario Limonciello 1 month, 1 week ago

On 11/10/25 5:14 AM, Ilpo Järvinen wrote:
> On Thu, 6 Nov 2025, Derek J. Clark wrote:
> 
>> Some devices, namely Lenovo Legion devices, have an "extreme" mode where
>> power draw is at the maximum limit of the cooling hardware. Add a new
>> "extreme" platform profile to properly reflect this operating mode.
>>
>> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>> Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
>> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>> ---
>>   Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
>>   drivers/acpi/platform_profile.c                        | 1 +
>>   include/linux/platform_profile.h                       | 1 +
>>   3 files changed, 4 insertions(+)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
>> index dc72adfb830a..9bee8deb4dc9 100644
>> --- a/Documentation/ABI/testing/sysfs-class-platform-profile
>> +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
>> @@ -23,6 +23,8 @@ Description:	This file contains a space-separated list of profiles supported
>>   					power consumption with a slight bias
>>   					towards performance
>>   		performance		High performance operation
>> +		extreme			Higher performance operation that may exceed
>> +					internal battery draw limits when on AC power
>>   		custom			Driver defined custom profile
>>   		====================	========================================
>>   
>> diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
>> index b43f4459a4f6..78da17e16d9b 100644
>> --- a/drivers/acpi/platform_profile.c
>> +++ b/drivers/acpi/platform_profile.c
>> @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
>>   	[PLATFORM_PROFILE_BALANCED] = "balanced",
>>   	[PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
>>   	[PLATFORM_PROFILE_PERFORMANCE] = "performance",
>> +	[PLATFORM_PROFILE_EXTREME] = "extreme",
>>   	[PLATFORM_PROFILE_CUSTOM] = "custom",
>>   };
>>   static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
>> diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
>> index a299225ab92e..2bf178bde2b5 100644
>> --- a/include/linux/platform_profile.h
>> +++ b/include/linux/platform_profile.h
>> @@ -24,6 +24,7 @@ enum platform_profile_option {
>>   	PLATFORM_PROFILE_BALANCED,
>>   	PLATFORM_PROFILE_BALANCED_PERFORMANCE,
>>   	PLATFORM_PROFILE_PERFORMANCE,
>> +	PLATFORM_PROFILE_EXTREME,
>>   	PLATFORM_PROFILE_CUSTOM,
>>   	PLATFORM_PROFILE_LAST, /*must always be last */
>>   };
>>
> 
> I wonder if "extreme" is the best name for this? Given the description you
> gave above, perhaps "max-power" would be more descriptive (and we already
> have "low-power" so it kind of feels fitting the theme too).
> 
> I don't have strong opinion on this so if you guys feel this suggestion
> would not make things better, feel free to voice it. :-)
> 

I don't feel strongly here, either sound find to me.

Re: [PATCH v2 1/3] acpi: platform_profile - Add Extreme profile option
Posted by Derek J. Clark 1 month ago
On November 10, 2025 9:17:12 PM PST, Mario Limonciello <superm1@kernel.org> wrote:
>
>
>On 11/10/25 5:14 AM, Ilpo Järvinen wrote:
>> On Thu, 6 Nov 2025, Derek J. Clark wrote:
>> 
>>> Some devices, namely Lenovo Legion devices, have an "extreme" mode where
>>> power draw is at the maximum limit of the cooling hardware. Add a new
>>> "extreme" platform profile to properly reflect this operating mode.
>>> 
>>> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>>> Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
>>> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>>> ---
>>>   Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
>>>   drivers/acpi/platform_profile.c                        | 1 +
>>>   include/linux/platform_profile.h                       | 1 +
>>>   3 files changed, 4 insertions(+)
>>> 
>>> diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
>>> index dc72adfb830a..9bee8deb4dc9 100644
>>> --- a/Documentation/ABI/testing/sysfs-class-platform-profile
>>> +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
>>> @@ -23,6 +23,8 @@ Description:	This file contains a space-separated list of profiles supported
>>>   					power consumption with a slight bias
>>>   					towards performance
>>>   		performance		High performance operation
>>> +		extreme			Higher performance operation that may exceed
>>> +					internal battery draw limits when on AC power
>>>   		custom			Driver defined custom profile
>>>   		====================	========================================
>>>   diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
>>> index b43f4459a4f6..78da17e16d9b 100644
>>> --- a/drivers/acpi/platform_profile.c
>>> +++ b/drivers/acpi/platform_profile.c
>>> @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
>>>   	[PLATFORM_PROFILE_BALANCED] = "balanced",
>>>   	[PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
>>>   	[PLATFORM_PROFILE_PERFORMANCE] = "performance",
>>> +	[PLATFORM_PROFILE_EXTREME] = "extreme",
>>>   	[PLATFORM_PROFILE_CUSTOM] = "custom",
>>>   };
>>>   static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
>>> diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
>>> index a299225ab92e..2bf178bde2b5 100644
>>> --- a/include/linux/platform_profile.h
>>> +++ b/include/linux/platform_profile.h
>>> @@ -24,6 +24,7 @@ enum platform_profile_option {
>>>   	PLATFORM_PROFILE_BALANCED,
>>>   	PLATFORM_PROFILE_BALANCED_PERFORMANCE,
>>>   	PLATFORM_PROFILE_PERFORMANCE,
>>> +	PLATFORM_PROFILE_EXTREME,
>>>   	PLATFORM_PROFILE_CUSTOM,
>>>   	PLATFORM_PROFILE_LAST, /*must always be last */
>>>   };
>>> 
>> 
>> I wonder if "extreme" is the best name for this? Given the description you
>> gave above, perhaps "max-power" would be more descriptive (and we already
>> have "low-power" so it kind of feels fitting the theme too).
>> 
>> I don't have strong opinion on this so if you guys feel this suggestion
>> would not make things better, feel free to voice it. :-)
>> 
>
>I don't feel strongly here, either sound find to me.
>
Fine with me. Extreme is the vendor (marketing) specific phrase but the low/max-power symmetry is nicer. I'll try to spin a v3 today or tomorrow.

Thanks,
Derek