Re: [PATCH v3 1/4] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk
From: Chris Taraszka
Date: Fri Nov 06 2026 - 06:24:13 EST
On Mon, 2 Nov 2026, Mingyou Chen wrote:
> I'd prefer to have this applied on top of patch 3/4 instead, so the
> infrastructure is in place first.
Sure, v4 will add the quirk after the battery support, with 0x03 as
the battery entry from the start.
Thanks,
Chris
On Mon, Nov 2, 2026 at 12:31 PM Mingyou Chen <qby140326@xxxxxxxxx> wrote:
>
> On 11/2/26 00:18, Chris Taraszka wrote:
> > The Xiaomi Book Pro 14 (board TM2424) implements SystemPerMode with
> > its own values. Its firmware ignores 0x00 and 0x01, and GET returns one
> > of 0x02, 0x03, 0x04, 0x09 or 0x0a, so with the default table balanced
> > and balanced-performance are no-ops and reading the profile fails with
> > -EINVAL whenever the firmware is in 0x04, 0x09 or 0x0a. The failed read
> > also aborts system suspend.
> >
> > The firmware passes the mode to Intel DTT as an OEM design variable.
> > The DTT tables in its data vault name the modes and set the sustained
> > package power limit (PL1) for each, by power source. For the H484 CPU
> > variant (H404 has the same layout with lower limits):
> >
> > value AC battery
> > 0x02 Silent 15-25 W Silent 15-25 W
> > 0x0a Silent 15-25 W Silent 15-25 W
> > 0x09 Balance 35-45 W Balance 32-40 W
> > 0x03 Smart 36-37 W Turbo 50-58 W
> > 0x04 Crazy 50-58 W no entry
> >
> > Map low-power, balanced and performance to 0x02, 0x09 and 0x04. 0x0a
> > selects the same tables as 0x02, and 0x03 gives on battery what 0x04
> > gives on AC, so report them as low-power and performance without
> > offering them for SET. There is no balanced-performance mode.
> >
> > The machine is USB-C only and WMI_FN_SYSTEM_AC_TYPE is not implemented,
> > so skip the AC type check.
> >
> > Signed-off-by: Chris Taraszka <chris@xxxxxxxxx>
> > ---
> >
> > Notes:
> > Tested on the Xiaomi Book Pro 14 (TM2424, BIOS XMAPT4B0P0A0A, H484)
> > with this series on top of v15, loaded on v7.3. Firmware mode (EC 0x68),
> > DTT OEM variable 1 and PL1 a few seconds after each set:
> >
> > AC low-power 0x02 ODV1 2 25 W
> > balanced 0x09 ODV1 0 45 W
> > performance 0x04 ODV1 4 58 W
> > battery low-power 0x02 ODV1 2 25 W
> > performance 0x03 ODV1 1 58 W (with patch 3)
> >
> > With v2 on battery, balanced set 0x03 and PL1 went to 54 W.
> >
> > drivers/platform/x86/bitland-mifs-wmi.c | 21 +++++++++++++++++++++
> > 1 file changed, 21 insertions(+)
> >
> > diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
> > index a431d3fef774..63fae12ebd83 100644
> > --- a/drivers/platform/x86/bitland-mifs-wmi.c
> > +++ b/drivers/platform/x86/bitland-mifs-wmi.c
> > @@ -113,7 +113,28 @@ static const struct bitland_mifs_quirks default_quirks = {
> > .num_profile_entries = ARRAY_SIZE(default_profile_entries),
> > };
> >
> > +static const struct bitland_profile_entry tm2424_profile_entries[] = {
> > + { PLATFORM_PROFILE_LOW_POWER, 0x02 },
> > + { PLATFORM_PROFILE_LOW_POWER, 0x0a, true },
> > + { PLATFORM_PROFILE_BALANCED, 0x09 },
> > + { PLATFORM_PROFILE_PERFORMANCE, 0x04 },
> > + { PLATFORM_PROFILE_PERFORMANCE, 0x03, true },
> > +};
> > +
> > +static const struct bitland_mifs_quirks tm2424_quirks = {
> > + .profile_entries = tm2424_profile_entries,
> > + .num_profile_entries = ARRAY_SIZE(tm2424_profile_entries),
> > + .skip_ac_type_check = true,
> > +};
> > +
> > static const struct dmi_system_id bitland_mifs_dmi_table[] = {
> > + {
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
> > + DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2424"),
> > + },
> > + .driver_data = (void *)&tm2424_quirks,
> > + },
> > {}
> > };
> >
> I'd prefer to have this applied on top of patch 3/4 instead, so the
> infrastructure is in place first.