mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: "Lyndon Sanche" <lsanche@lyndeno.ca>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] platform/x86: dell-pc: Read the AAC mode from cbRes3
Date: Fri, 13 Nov 2026 22:26:46 -0800	[thread overview]
Message-ID: <4fa7525f8f8d4c85aff4ee7320e5b5a86e79cda8.1794633180.git.rosenp@gmail.com> (raw)

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


                 reply	other threads:[~2026-11-14  6:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4fa7525f8f8d4c85aff4ee7320e5b5a86e79cda8.1794633180.git.rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsanche@lyndeno.ca \
    --cc=platform-driver-x86@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®