* [PATCH v2] platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup
@ 2022-08-19 18:01 Mario Limonciello
2022-08-26 10:54 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2022-08-19 18:01 UTC (permalink / raw)
To: Mark Pearson, Henrique de Moraes Holschuh, Hans de Goede, Mark Gross
Cc: Mario Limonciello, madcatx, ibm-acpi-devel, platform-driver-x86,
linux-kernel
It was observed that on a Thinkpad T14 Gen1 (AMD) that the platform
profile is starting up in 'low-power' mode after refreshing what the
firmware had. This is most likely a firmware bug, but as a harmless
workaround set the default profile to 'balanced' at thinkpad_acpi startup.
Reported-by: madcatx@atlas.cz
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216347
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v1->v2
* Only run on AMD systems (PSC mode)
drivers/platform/x86/thinkpad_acpi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 22d4e8633e30..2dbb9fc011a7 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -10592,10 +10592,9 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
/* Ensure initial values are correct */
dytc_profile_refresh();
- /* Set AMT correctly now we know current profile */
- if ((dytc_capabilities & BIT(DYTC_FC_PSC)) &&
- (dytc_capabilities & BIT(DYTC_FC_AMT)))
- dytc_control_amt(dytc_current_profile == PLATFORM_PROFILE_BALANCED);
+ /* Workaround for https://bugzilla.kernel.org/show_bug.cgi?id=216347 */
+ if (dytc_capabilities & BIT(DYTC_FC_PSC))
+ dytc_profile_set(NULL, PLATFORM_PROFILE_BALANCED);
return 0;
}
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup
2022-08-19 18:01 [PATCH v2] platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup Mario Limonciello
@ 2022-08-26 10:54 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2022-08-26 10:54 UTC (permalink / raw)
To: Mario Limonciello, Mark Pearson, Henrique de Moraes Holschuh, Mark Gross
Cc: madcatx, ibm-acpi-devel, platform-driver-x86, linux-kernel
Hi,
On 8/19/22 20:01, Mario Limonciello wrote:
> It was observed that on a Thinkpad T14 Gen1 (AMD) that the platform
> profile is starting up in 'low-power' mode after refreshing what the
> firmware had. This is most likely a firmware bug, but as a harmless
> workaround set the default profile to 'balanced' at thinkpad_acpi startup.
>
> Reported-by: madcatx@atlas.cz
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216347
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> v1->v2
> * Only run on AMD systems (PSC mode)
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note I will also add this to the fixes branch and I will
include this in the next fixes pull-req for 6.0 .
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
>
> drivers/platform/x86/thinkpad_acpi.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 22d4e8633e30..2dbb9fc011a7 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -10592,10 +10592,9 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
> /* Ensure initial values are correct */
> dytc_profile_refresh();
>
> - /* Set AMT correctly now we know current profile */
> - if ((dytc_capabilities & BIT(DYTC_FC_PSC)) &&
> - (dytc_capabilities & BIT(DYTC_FC_AMT)))
> - dytc_control_amt(dytc_current_profile == PLATFORM_PROFILE_BALANCED);
> + /* Workaround for https://bugzilla.kernel.org/show_bug.cgi?id=216347 */
> + if (dytc_capabilities & BIT(DYTC_FC_PSC))
> + dytc_profile_set(NULL, PLATFORM_PROFILE_BALANCED);
>
> return 0;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-26 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19 18:01 [PATCH v2] platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup Mario Limonciello
2022-08-26 10:54 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®