From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796504829; b=TdcXi8ee0wpW93k3+94PRS6x3cbpF52IMkVLfm5W8EADTAILTpX85J0XBEaxqnxiucHc Ii01EMySdiM8E9yliEagag9vWZ/RvoT4IcfzjiO6QVDXeIEvUzbRP0GUJOQ9cGZHwgRjH AVsqdNRRCBGhIIC7kw5vMlAzQrqB7ZcOlXsM+bgx+IlaHMJ1ljE4WgxwOWQGZhBHro4zW xBHcOzwIFhK0niu86fmysQJSD6pJVA2QO2QViwh4+HZXZi6pj9hPt0ejrk6xdBHoLkaXw +JbIVBDppb8sEgSEVC481YvcR24YZZj9uqLYmb3A1RSGECJ3W2UE2PVZhv0RFqDWfqQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796504829; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Sender:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; bh=576/mJb/5Y0OY1ZxLUQcIaiY8PLP2P6odQknw/gRb80=; b=ulRcXRvsUrAONOuPwpTGWO+eMz2QMcMhHq6yAj57rk19hAGWo9jhVAq1uYcsDUcJd1HG zeZWADtOEhFgJL7Ki2jRJ2AHbysRDR7VjMCiCuBENyG79nDASw7QV9sOFVeTrHjW0AtPK qgqsQHRBU2WORd8rmed1gjqo8vRz57HnAJ/zGT/XMMePMqGVFIu4Y9iWeEngQF2tYrP7v 0zKHYJZt56VpciaNQQNGQTpELah+up8zhh0DDIDHUA5X48+HzANzQoZATqj7P+0NAf/Hg FOjKvymTKGzfJ7axGA5HBJ+Tod/L/ZWfhM4plgXGd8RVFAHKneVjC5qUl0EkZc6yinw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lkUFZyJ3; arc=none smtp.remote-ip=209.85.218.44 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A3CD606A32F for ; Sat, 5 Dec 2026 21:07:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9A3CD606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lkUFZyJ3 Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-c524b13b820so38362566b.1 for ; Sat, 05 Dec 2026 13:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796504827; x=1797109627; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to:content-type; bh=576/mJb/5Y0OY1ZxLUQcIaiY8PLP2P6odQknw/gRb80=; b=lkUFZyJ3GoMIpYR/0RO+G8lnBgQdChKP9V2QwHHm8sIQ1xNuTBy91px20o2WA49wpR bzxtBKrTjESlZ5cwFvRR1Big1E8LBuTg2Iur7CybTjkT85P8FMbxvu1S+dqLleMVd+KC w6uE0mW4E4pfaQyLsFUHr2r+57bEDOn6Gz1ca1uielFR34ZzffNUHDVSkOyMewGrjTRf HgUaOQ7t3hP9hyXRRzlD1zjytiUI8yCrbqDVmKv23qRaxBB0UT5QWWOO18XZjD0okctU cgrodQ4ApTyIDDH7s4kB0hxQ5FCchtBwBRa0EBi3RvNdsxi8MAmQ0n2krfsKSin8ueC3 CLJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796504827; x=1797109627; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=576/mJb/5Y0OY1ZxLUQcIaiY8PLP2P6odQknw/gRb80=; b=OeOOcVE2OyVmrG07B8RNUhPV3cUMcXfXpG51abI4YLo17eqdXNOsrqAdhnd3Us16Ab LNAgV/37okvW8RufkvJXGJk9AWLaO8NkpGf+SPpoz0Wo8SeQ2FAc0XB5HCT5zluBHLRs gpufkgVMFq1k49u6j1EUzR3CroGJrfGo6JJIXe1XbHBb563TWHJEwDOPccDMcOvA5ar+ GXm/OTAHes4M2qKCwABYsvbFOgJk4c5iqdQgRSAc8XA/qFZOX5sErGMXMu1wQbRAKzHn hSTuo291VB5dJao9upZHWHoXQZ8SeMzABjjXElLTtXO24vdhhG8o0L12JHotiTiSFoq1 G0iA== X-Forwarded-Encrypted: i=1; AL+hErGc6K/bF2rpFTmKVHwC8e3+9x9Xfym5icADBG5Z8/6eVkCZL0jo4Dtq9jqP6mCuNm1JUVknrcYdNtWES1s=@vger.kernel.org X-Gm-Message-State: APuU4Z8ezT8upzcevN6IWH25USQ811snmVRSXcnPp+fXaqdim9tVxkjR RM5vZn8xBc6NwQKsvxOqjkPmEtmOM4qhGBWuIaOWKrWupgsP8ykx8Fb+ViYafkHm X-Gm-Gg: AZFdTZd6pXr3jpveOta7SOOgZ+hGUpLEtGxK5zqTFG1cEjuh0zqwuvFDrDejTZ8+neV Ww7keWUDyv3jca1B1lJkB6rvkVKE+OCMz4h64Sp8b5440C3OnnvVSLx4yRCpSry2t/5fLv3fiA3 E7pTPepccK5wBwDrHVY3/kPv5q9AipnqEV/tz3N9bpCSwk53WuUPwq41ExMwB73tHUArSZSFjUQ BE2Wjss5PapraZ2RcqGglp4WiGIcxFbsK/JD4I9HqpCU4gvEdV3UvxpkpVFm9njxkEiBX0n9fn1 uqXOYaY45fISc/o79IvLQutmlzDchZefYnVJmsu/1atYgxdtgj9EEPBDM1C7EKBVL4Vw4mA8q9B LrAbC5CdmvCJgTNN0lTfzVihHFKF7pd0dRe6TKlsaVtk9meLgn4dIQS1tBseZOwJvRZOUmTFoAN +rwv1MlMDYRoKPZnMo0gzVuFjTEFxrVpnuLsB3SwlI7rdFoHwEjSgkw5Rz8b6w78SjvAsHuQYOI RGUjlWcT8+P2Bcu3A7lncBcPKAp06PFndt2x84IQ/qwn3a+jpPzyNWkxyoNCjhKB0VNUJiJ38y5 /FkrohycuouFis0YqiqX0z9vyOL6Rc2uGwg36wwP95NPSfpFjHNapgFG8cktQbEHf6qjJNiOF/M i89NECHodvSorBolXXkGesqXbjruFPTmuZtE7 X-Received: by 2002:a17:906:a452:b0:c51:3b84:6fb8 with SMTP id a640c23a62f3a-c52a41bff67mr239532766b.4.1796504826873; Sat, 05 Dec 2026 13:07:06 -0800 (PST) Received: from kekw.tail0edbdb.ts.net (c-78-82-86-71.bbcust.telenor.se. [78.82.86.71]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c553fd43c8dsm65249366b.62.2026.12.05.13.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 13:07:06 -0800 (PST) Sender: Gustaf Bergqvist From: Gustaf Bergqvist To: Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Corentin Chary , "Luke D. Jones" , Denis Benato Cc: Armandas Kvietkus , Gustaf Bergqvist , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] platform/asus: asus-armoury: Don't warn about power limits without tunables Date: Sat, 5 Dec 2026 22:06:54 +0100 Message-ID: <20261205210655.231747-2-gurra.bergqvist@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261205210655.231747-1-gurra.bergqvist@gmail.com> References: <20261205210655.231747-1-gurra.bergqvist@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit init_rog_tunables() prints "No matching power limits found for this system" whenever the machine has no entry in the power_limits DMI table. The warning exists to point owners of ROG/TUF models at the missing table entry, which is why the ppt_* and nv_* attributes lack min/max limits. The driver also loads on ASUS laptops whose firmware supports none of these tunables, such as the Vivobook S 14 M5406WA. On those machines a table entry would change nothing, because every attribute gated by __ASUS_POWER_TUNABLE_GROUP_VISIBLE() also requires the firmware to report the WMI device ID as present. The warning is still printed on every boot. Users take it as a fault and file reports asking for their model to be added. Before warning, query the firmware for the device IDs behind those attributes. Keep the warning if any of them is present, since that is the case where a table entry helps. Otherwise log only at debug level. Systems with a table entry, and systems whose firmware exposes at least one tunable, behave exactly as before. The extra cost is at most nine DSTS WMI calls at probe time, and only on systems without a table entry. An earlier attempt to lower the warning to pr_debug()/pr_info() for all systems was objected to because the warning helps users with missing sliders [1]. This change keeps it for exactly those users. [1] https://lore.kernel.org/platform-driver-x86/20260503175734.27795-1-armundunelis@gmail.com/T/ Tested on an ASUS Vivobook S 14 M5406WA (BIOS M5406WA.316) by booting this tree. The firmware returns ASUS_WMI_UNSUPPORTED_METHOD for all nine device IDs. The warning is no longer printed, the debug message appears with asus_armoury.dyndbg=+p, and the exposed attributes are unchanged (charge_mode, pending_reboot). This change was developed with the help of an AI coding assistant (Claude Code). I wrote and reviewed the code myself. Signed-off-by: Gustaf Bergqvist --- drivers/platform/asus/asus-armoury.c | 34 +++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/platform/asus/asus-armoury.c b/drivers/platform/asus/asus-armoury.c index 721121982cc5..1c38a798fd6d 100644 --- a/drivers/platform/asus/asus-armoury.c +++ b/drivers/platform/asus/asus-armoury.c @@ -973,6 +973,35 @@ static int asus_fw_attr_add(void) return err; } +/* + * WMI device IDs of all attributes gated by __ASUS_POWER_TUNABLE_GROUP_VISIBLE(), + * i.e. those that need a power_limits table entry. Keep in sync with the + * attribute declarations above. + */ +static const u32 rog_tunable_dev_ids[] = { + ASUS_WMI_DEVID_PPT_PL1_SPL, + ASUS_WMI_DEVID_PPT_PL2_SPPT, + ASUS_WMI_DEVID_PPT_PL3_FPPT, + ASUS_WMI_DEVID_PPT_APU_SPPT, + ASUS_WMI_DEVID_PPT_PLAT_SPPT, + ASUS_WMI_DEVID_NV_DYN_BOOST, + ASUS_WMI_DEVID_NV_THERM_TARGET, + ASUS_WMI_DEVID_DGPU_BASE_TGP, + ASUS_WMI_DEVID_DGPU_SET_TGP, +}; + +static bool armoury_has_rog_tunables(void) +{ + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(rog_tunable_dev_ids); i++) { + if (armoury_has_devstate(rog_tunable_dev_ids[i])) + return true; + } + + return false; +} + /* Init / exit ****************************************************************/ /* Set up the min/max and defaults for ROG tunables */ @@ -987,7 +1016,10 @@ static int init_rog_tunables(void) /* Match the system against the power_limits table */ dmi_id = dmi_first_match(power_limits); if (!dmi_id) { - pr_warn("No matching power limits found for this system\n"); + if (armoury_has_rog_tunables()) + pr_warn("No matching power limits found for this system\n"); + else + pr_debug("Firmware exposes no ROG power tunables\n"); return 0; } -- 2.56.1