From: Musaev Ibragim <atomicus.xyz@gmail.com>
To: Mingyou Chen <qby140326@gmail.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>,
Hans de Goede <hansg@kernel.org>,
Gladyshev Ilya <foxido@foxido.dev>,
Nika Krasnova <nika@nikableh.moe>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/4] platform/x86: bitland-mifs-wmi: Merge the function of redmi-wmi into the bitland driver
Date: Sun, 19 Jul 2026 11:59:26 +0600 [thread overview]
Message-ID: <178444076601.4076.16818759313258005640@gmail.com> (raw)
In-Reply-To: <20260709122337.17417-3-qby140326@gmail.com>
On Thu, 9 Jul 2026 20:23:35 +0800, Mingyou Chen wrote:
Hi Mingyou,
I own a Redmi Book Pro 15 2023 (TM2209), one of the machines redmi-wmi
currently serves, and did a live test pass over the Redmibook side of
this series against WMI event traces from the actual firmware. A few
issues below, on top of what Nika already found. Happy to test v2 on
this hardware — just Cc me.
> + { KE_IGNORE, BI_HOTKEY_CODE(WMI_EVENT_KBD_BRIGHTNESS, 0, 0), {} },
> + { KE_IGNORE, BI_HOTKEY_CODE(WMI_EVENT_KBD_BRIGHTNESS, 0, 0x80), {} },
> + { KE_IGNORE, BI_HOTKEY_CODE(WMI_EVENT_KBD_BRIGHTNESS, 5, 0), {} },
> + { KE_IGNORE, BI_HOTKEY_CODE(WMI_EVENT_KBD_BRIGHTNESS, 0x0a, 0), {} },
The Auto entry has its value in the wrong byte. On the TM2209 the
backlight state arrives in value_low as 0x00 / 0x05 / 0x0a / 0x80;
a live trace of the backlight key cycling (payload bytes are
[type, id, value_low, value_high]):
01 05 00 00 Off
01 05 05 00 Low
01 05 0a 00 High
01 05 80 00 Auto
so the second entry needs to be
BI_HOTKEY_CODE(WMI_EVENT_KBD_BRIGHTNESS, 0x80, 0), otherwise the Auto
press falls through to the unknown-hotkey path.
> case WMI_EVENT_KBD_BRIGHTNESS:
> brightness = event->value_low;
> blocking_notifier_call_chain(&bitland_notifier_list,
> BITLAND_NOTIFY_KBD_BRIGHTNESS,
> &brightness);
Related: on the TM2209 these raw values (up to 0x80) end up in
led_classdev_notify_brightness_hw_changed() against a LED registered
with max_brightness = 3 — and the MIFS control methods behind that LED
do not work on this machine at all (the profile SET fails with
EOPNOTSUPP and the LED GET always returns 0; the SMM interface differs
from the gaming models). Both the LED and the platform profile probably
want to be gated on DMI (or on a probe-time functionality check) before
the event GUID starts feeding them.
> + /* Redmi refresh rate toggle quirk */
> + if (event->event_id == WMI_EVENT_CPU_FAN_SPEED &&
> + event->value_low == 0 && event->value_high == 0) {
Confirming the Redmibook side of Nika's concern: on the TM2209 Fn+S
really is event 0x1a with value_low always 0, so the quirk does work
here — but the event id spaces of the two device generations genuinely
collide (0x19 is the AI-button break event on Redmibooks vs
WMI_EVENT_REFRESH_RATE on yours; 0x1a is Fn+S here vs CPU fan speed on
yours). Rather than value-based quirks in the notify path, have you
considered selecting one of two keymaps at probe time by DMI? A single
merged table will keep growing special cases.
One more thing worth a comment somewhere in the merged driver: on the
TM2209 the ACPI event handler (EV20 in an OEM SSDT) cycles the EC
performance mode as a side effect of building the _WED payload for the
Fn+K event. Whatever driver owns the event GUID must keep reading
events, or Fn+K mode switching physically stops working.
Related: I have a pending redmi-wmi patch that reports these EC state
events (backlight / power mode / Fn lock) as input events so userspace
OSDs can react [1]. Whatever form the merged driver takes, please keep
these events observable rather than KE_IGNOREd.
[1] https://lore.kernel.org/r/178405473606.25865.4048095379503614221@gmail.com
Tested on Redmi Book Pro 15 2023 (TM2209, BIOS RMAPH5B0P0909).
--
Musaev Ibragim
next prev parent reply other threads:[~2026-07-19 5:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 12:23 [PATCH v1 0/4] Merge redmi-wmi into bitland-mifs-wmi Mingyou Chen
2026-07-09 12:23 ` [PATCH v1 1/4] platform/x86: redmi-wmi: Drop redmi-wmi driver Mingyou Chen
2026-07-10 10:24 ` Ilpo Järvinen
2026-07-09 12:23 ` [PATCH v1 2/4] platform/x86: bitland-mifs-wmi: Merge the function of redmi-wmi into the bitland driver Mingyou Chen
2026-07-09 16:07 ` Nika Krasnova
2026-07-10 3:41 ` Mingyou Chen
2026-07-09 16:21 ` Nika Krasnova
2026-07-10 10:20 ` Ilpo Järvinen
2026-07-19 5:59 ` Musaev Ibragim [this message]
2026-07-09 12:23 ` [PATCH v1 3/4] MAINTAINERS: Add maintainer entry of bitland-mifs-wmi driver Mingyou Chen
2026-07-10 10:25 ` Ilpo Järvinen
2026-07-09 12:23 ` [PATCH v1 4/4] platform/x86: bitland-mifs-wmi: Add Redmi mic-mute key entries Mingyou Chen
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=178444076601.4076.16818759313258005640@gmail.com \
--to=atomicus.xyz@gmail.com \
--cc=foxido@foxido.dev \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nika@nikableh.moe \
--cc=platform-driver-x86@vger.kernel.org \
--cc=qby140326@gmail.com \
/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®