mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: dell-pc: Read the AAC mode from cbRes3
@ 2026-11-14  6:26 Rosen Penev
  0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-11-14  6:26 UTC (permalink / raw)
  To: Lyndon Sanche, Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel

thermal_set_mode() keeps the current Active Acoustic Controller (AAC)
mode when changing the thermal mode, by reading it back with
thermal_get_acc_mode() and passing it in byte 1 of cbArg2. As
documented at the top of the driver, and as libsmbios'
smbios-thermal-ctl implements it, the current AAC mode is byte 2 of
cbRes3, which is output[2]. thermal_get_acc_mode() reads output[3]
(cbRes4) instead, so every profile change, including the one done at
probe to sync the mode, writes back an AAC mode taken from the wrong
register.

Read it from output[2].

Fixes: 996ad4129810 ("platform/x86: dell-pc: Implement platform_profile")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
Developed with the help of an AI coding assistant (Claude Opus 5.5),
which found the issue and drafted the fix; I reviewed it and am
responsible for it. Builds cleanly with W=1.
Tested on a Dell Precision M4800 running v7.2.15, using the equivalent
backports built as out-of-tree modules: switching between all four platform profiles works.
I did not independently verify the AAC value read back.

 drivers/platform/x86/dell/dell-pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/dell/dell-pc.c b/drivers/platform/x86/dell/dell-pc.c
index becdd9aaef29..3b2089e5cf6c 100644
--- a/drivers/platform/x86/dell/dell-pc.c
+++ b/drivers/platform/x86/dell/dell-pc.c
@@ -162,7 +162,7 @@ static int thermal_get_acc_mode(int *acc_mode)
 	ret = dell_send_request(&buffer, CLASS_INFO, SELECT_THERMAL_MANAGEMENT);
 	if (ret)
 		return ret;
-	*acc_mode = FIELD_GET(DELL_ACC_GET_FIELD, buffer.output[3]);
+	*acc_mode = FIELD_GET(DELL_ACC_GET_FIELD, buffer.output[2]);
 	return 0;
 }
 

base-commit: 2800868f63227c8237d70c41e70d441c919620d6
-- 
2.56.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-14  6:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14  6:26 [PATCH] platform/x86: dell-pc: Read the AAC mode from cbRes3 Rosen Penev

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®