mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] platform/x86: bitland-mifs-wmi: Xiaomi Book Pro 14 support
@ 2026-10-25 19:54 Chris Taraszka
  2026-10-25 19:54 ` [PATCH v2 1/2] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk Chris Taraszka
  2026-10-25 19:54 ` [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors Chris Taraszka
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Taraszka @ 2026-10-25 19:54 UTC (permalink / raw)
  To: Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, Mingyou Chen, Ilya Gladyshev,
	Armin Wolf, KentoNion, Matias Civadda, Chris Taraszka

Two patches on top of Mingyou Chen's v13 "Merge redmi-wmi into
bitland-mifs-wmi" [1], which adds the quirks table they build on.

Patch 1 adds the Xiaomi Book Pro 14 (TM2424) entry. Patch 2 stops
platform profile save/restore errors from failing system suspend or
resume.

Kento proposed a different mapping for the same board [2]: low-power
as 0x0a (which also dims the panel and keyboard backlight), balanced as
0x09, performance as 0x04 with 0x03 as fallback, and no
balanced-performance. This series keeps the four distinct firmware
modes and leaves 0x0a to the firmware's own mode cycling. Kento, if
this is a problem on BIOS 0707 or 0A0A, please say so.

Mingyou, on your v13 question: with 7/7, accept_zero_function is not
needed here. The entry does not set it and every SET succeeds.

Changes since v1 [3][4]:
- Use the quirks table from v13 instead of a DMI conditional in the code
- Match on board name TM2424 (Kento)
- Suspend fix also covers resume and skips the restore when nothing
  was saved

[1] https://lore.kernel.org/all/20261021123414.25516-1-qby140326@gmail.com/
[2] https://lore.kernel.org/all/20260929144703.700966-1-kento@kekto.ru/
[3] https://lore.kernel.org/all/20260928153902.139956-1-chris@miget.com/
[4] https://lore.kernel.org/all/20260911182131.461415-1-chris@miget.com/

Chris Taraszka (2):
  platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk
  platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on
    profile errors

 drivers/platform/x86/bitland-mifs-wmi.c | 43 +++++++++++++++++++++----
 1 file changed, 36 insertions(+), 7 deletions(-)


base-commit: 9d3475065167197742b0882aff21cf8e78393277
prerequisite-patch-id: 99b10cd2b70d630ab65d8a8bb02c1d4bf89b1a63
prerequisite-patch-id: 27db041f827872b8be142c310a14c79962154bd5
prerequisite-patch-id: 74fc3298fa3dceb2224dfc3d2ae4cc6d4be61c01
prerequisite-patch-id: 2bbb1371b506f5a07a1e6e69d34217195cd5ffcb
prerequisite-patch-id: b88e60d7915ad055b67478359bd9c6c9482d8433
prerequisite-patch-id: 2fe8c043993034f1a2cde98b1b2e299987d5ac7f
prerequisite-patch-id: fbf70405992dfa75ed02026d97aa16e1644fbd42
-- 
2.56.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk
  2026-10-25 19:54 [PATCH v2 0/2] platform/x86: bitland-mifs-wmi: Xiaomi Book Pro 14 support Chris Taraszka
@ 2026-10-25 19:54 ` Chris Taraszka
  2026-10-26  9:22   ` Mingyou Chen
  2026-10-25 19:54 ` [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors Chris Taraszka
  1 sibling, 1 reply; 7+ messages in thread
From: Chris Taraszka @ 2026-10-25 19:54 UTC (permalink / raw)
  To: Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, Mingyou Chen, Ilya Gladyshev,
	Armin Wolf, KentoNion, Matias Civadda, Chris Taraszka

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 values were identified from the WMAA method in the firmware's SSDT
and by setting each one and reading the sustained package power limit
from intel-rapl-mmio on AC:

  0x02  18 W
  0x03  37 W
  0x09  45 W
  0x04  58 W
  0x0a  18 W

Map low-power, balanced, balanced-performance and performance to 0x02,
0x03, 0x09 and 0x04. 0x0a is only entered through the firmware's own
mode cycling, so report it as low-power without offering it for SET.

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@miget.com>
---

Notes:
    Tested on the Xiaomi Book Pro 14 (TM2424, BIOS XMAPT4B0P0A0A) with this
    series on top of v13, backported to v7.3, on AC: all four profiles set
    and read back, and the firmware mode (EC 0x68) and PL1 follow:
    0x02/18 W, 0x03/37 W, 0x09/45 W, 0x04/58 W. These match the values
    first measured on BIOS XMAPT4B0P0909. s2idle suspend/resume from
    performance restores 0x04.
    
    On battery, balanced-performance and performance are refused by
    bitland_pp_check_capability(), although BIOS 0909 applies 0x04 on
    battery. This patch leaves that check as it is.

 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 a4c341ffbb9b..73be63146fd5 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -116,7 +116,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,               0x03 },
+	{ PLATFORM_PROFILE_BALANCED_PERFORMANCE,   0x09 },
+	{ PLATFORM_PROFILE_PERFORMANCE,            0x04 },
+};
+
+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,
+	},
 	{}
 };
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors
  2026-10-25 19:54 [PATCH v2 0/2] platform/x86: bitland-mifs-wmi: Xiaomi Book Pro 14 support Chris Taraszka
  2026-10-25 19:54 ` [PATCH v2 1/2] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk Chris Taraszka
@ 2026-10-25 19:54 ` Chris Taraszka
  2026-10-26  9:30   ` Mingyou Chen
  1 sibling, 1 reply; 7+ messages in thread
From: Chris Taraszka @ 2026-10-25 19:54 UTC (permalink / raw)
  To: Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, Mingyou Chen, Ilya Gladyshev,
	Armin Wolf, KentoNion, Matias Civadda, Chris Taraszka

bitland_mifs_wmi_suspend() returns the laptop_profile_get() error to
the PM core, which aborts the whole system suspend. This happens on any
machine whose firmware reports a SystemPerMode value that is missing
from its profile table, and on such a laptop with the lid closed logind
keeps retrying the suspend, so the machine stays awake and drains its
battery.

bitland_mifs_wmi_resume() likewise returns any error other than
-EOPNOTSUPP from restoring the profile, so the resume is reported as
failed although the machine is fully usable.

Saving and restoring the platform profile is best effort. Warn and
continue instead of failing the system transition, and skip the restore
when nothing was saved, so resume does not write a stale or default
profile.

Fixes: dc1ec4fa86b2 ("platform/x86: bitland-mifs-wmi: Add new Bitland MIFS WMI driver")
Signed-off-by: Chris Taraszka <chris@miget.com>
---

Notes:
    Tested on the same machine with v13 and this patch, without patch 1,
    and the firmware in 0x04. v13 alone aborts a pm_test=devices suspend:
    
      bitland_mifs_wmi_suspend [bitland_mifs_wmi] returns -22
      PM: failed to suspend: error -22
    
    With this patch the suspend completes, "Failed to save platform
    profile: -22" is logged and the firmware is still in 0x04 after resume.
    
    This supersedes "platform/x86: bitland-mifs-wmi: Don't abort suspend
    when platform profile access fails" [1], reworked on top of v13 6/7.
    
    [1] https://lore.kernel.org/all/20260911182131.461415-1-chris@miget.com/

 drivers/platform/x86/bitland-mifs-wmi.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index 73be63146fd5..df9a931fa939 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -237,6 +237,7 @@ struct bitland_mifs_wmi_data {
 	struct device *pp_dev;
 	const struct bitland_mifs_quirks *quirks;
 	enum platform_profile_option saved_profile;
+	bool profile_saved;
 };
 
 static int bitland_mifs_wmi_call(struct bitland_mifs_wmi_data *data,
@@ -408,10 +409,15 @@ static int bitland_mifs_wmi_suspend(struct device *dev)
 		return 0;
 
 	ret = laptop_profile_get(data->pp_dev, &profile);
-	if (ret == 0)
-		data->saved_profile = profile;
+	data->profile_saved = !ret;
+	if (ret) {
+		dev_warn(dev, "Failed to save platform profile: %d\n", ret);
+		return 0;
+	}
 
-	return ret;
+	data->saved_profile = profile;
+
+	return 0;
 }
 
 static int bitland_mifs_wmi_resume(struct device *dev)
@@ -419,8 +425,8 @@ static int bitland_mifs_wmi_resume(struct device *dev)
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	int ret;
 
-	/* Skip event device */
-	if (!data->pp_dev)
+	/* Skip event device, or nothing was saved on suspend */
+	if (!data->pp_dev || !data->profile_saved)
 		return 0;
 
 	ret = laptop_profile_set(dev, data->saved_profile);
@@ -436,8 +442,10 @@ static int bitland_mifs_wmi_resume(struct device *dev)
 		}
 	}
 
-	dev_dbg(dev, "Resuming, restoring profile %d\n", data->saved_profile);
-	return ret;
+	if (ret)
+		dev_warn(dev, "Failed to restore platform profile: %d\n", ret);
+
+	return 0;
 }
 
 static DEFINE_SIMPLE_DEV_PM_OPS(bitland_mifs_wmi_pm_ops,
-- 
2.56.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk
  2026-10-25 19:54 ` [PATCH v2 1/2] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk Chris Taraszka
@ 2026-10-26  9:22   ` Mingyou Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Mingyou Chen @ 2026-10-26  9:22 UTC (permalink / raw)
  To: Chris Taraszka, Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, Ilya Gladyshev, Armin Wolf,
	KentoNion, Matias Civadda

On 10/26/26 03:54, 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 values were identified from the WMAA method in the firmware's SSDT
> and by setting each one and reading the sustained package power limit
> from intel-rapl-mmio on AC:
>
>    0x02  18 W
>    0x03  37 W
>    0x09  45 W
>    0x04  58 W
>    0x0a  18 W
>
> Map low-power, balanced, balanced-performance and performance to 0x02,
> 0x03, 0x09 and 0x04. 0x0a is only entered through the firmware's own
> mode cycling, so report it as low-power without offering it for SET.
>
> 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@miget.com>
> ---
>
> Notes:
>      Tested on the Xiaomi Book Pro 14 (TM2424, BIOS XMAPT4B0P0A0A) with this
>      series on top of v13, backported to v7.3, on AC: all four profiles set
>      and read back, and the firmware mode (EC 0x68) and PL1 follow:
>      0x02/18 W, 0x03/37 W, 0x09/45 W, 0x04/58 W. These match the values
>      first measured on BIOS XMAPT4B0P0909. s2idle suspend/resume from
>      performance restores 0x04.
>      
>      On battery, balanced-performance and performance are refused by
>      bitland_pp_check_capability(), although BIOS 0909 applies 0x04 on
>      battery. This patch leaves that check as it is.
>
>   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 a4c341ffbb9b..73be63146fd5 100644
> --- a/drivers/platform/x86/bitland-mifs-wmi.c
> +++ b/drivers/platform/x86/bitland-mifs-wmi.c
> @@ -116,7 +116,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,               0x03 },
> +	{ PLATFORM_PROFILE_BALANCED_PERFORMANCE,   0x09 },
> +	{ PLATFORM_PROFILE_PERFORMANCE,            0x04 },
> +};
> +
> +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,
> +	},
>   	{}
>   };
>   
Reviewed-by: Mingyou Chen <qby140326@gmail.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors
  2026-10-25 19:54 ` [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors Chris Taraszka
@ 2026-10-26  9:30   ` Mingyou Chen
  2026-10-26  9:48     ` Chris Taraszka
  0 siblings, 1 reply; 7+ messages in thread
From: Mingyou Chen @ 2026-10-26  9:30 UTC (permalink / raw)
  To: Chris Taraszka, Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, Ilya Gladyshev, Armin Wolf,
	KentoNion, Matias Civadda

On 10/26/26 03:54, Chris Taraszka wrote:
> bitland_mifs_wmi_suspend() returns the laptop_profile_get() error to
> the PM core, which aborts the whole system suspend. This happens on any
> machine whose firmware reports a SystemPerMode value that is missing
> from its profile table, and on such a laptop with the lid closed logind
> keeps retrying the suspend, so the machine stays awake and drains its
> battery.
>
> bitland_mifs_wmi_resume() likewise returns any error other than
> -EOPNOTSUPP from restoring the profile, so the resume is reported as
> failed although the machine is fully usable.
>
> Saving and restoring the platform profile is best effort. Warn and
> continue instead of failing the system transition, and skip the restore
> when nothing was saved, so resume does not write a stale or default
> profile.
>
> Fixes: dc1ec4fa86b2 ("platform/x86: bitland-mifs-wmi: Add new Bitland MIFS WMI driver")
> Signed-off-by: Chris Taraszka <chris@miget.com>
> ---
>
> Notes:
>      Tested on the same machine with v13 and this patch, without patch 1,
>      and the firmware in 0x04. v13 alone aborts a pm_test=devices suspend:
>      
>        bitland_mifs_wmi_suspend [bitland_mifs_wmi] returns -22
>        PM: failed to suspend: error -22
>      
>      With this patch the suspend completes, "Failed to save platform
>      profile: -22" is logged and the firmware is still in 0x04 after resume.
>      
>      This supersedes "platform/x86: bitland-mifs-wmi: Don't abort suspend
>      when platform profile access fails" [1], reworked on top of v13 6/7.
>      
>      [1] https://lore.kernel.org/all/20260911182131.461415-1-chris@miget.com/
>
>   drivers/platform/x86/bitland-mifs-wmi.c | 22 +++++++++++++++-------
>   1 file changed, 15 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
> index 73be63146fd5..df9a931fa939 100644
> --- a/drivers/platform/x86/bitland-mifs-wmi.c
> +++ b/drivers/platform/x86/bitland-mifs-wmi.c
> @@ -237,6 +237,7 @@ struct bitland_mifs_wmi_data {
>   	struct device *pp_dev;
>   	const struct bitland_mifs_quirks *quirks;
>   	enum platform_profile_option saved_profile;
> +	bool profile_saved;
>   };
>   
>   static int bitland_mifs_wmi_call(struct bitland_mifs_wmi_data *data,
> @@ -408,10 +409,15 @@ static int bitland_mifs_wmi_suspend(struct device *dev)
>   		return 0;
>   
>   	ret = laptop_profile_get(data->pp_dev, &profile);
> -	if (ret == 0)
> -		data->saved_profile = profile;
> +	data->profile_saved = !ret;
> +	if (ret) {
> +		dev_warn(dev, "Failed to save platform profile: %d\n", ret);
> +		return 0;
> +	}
>   
> -	return ret;

What value does the firmware respond?

This patch fixes the suspend problem, but it hides the real driver 
problem (unsupported profile entry).

I saw 0x04 in your patch "platform/x86: bitland-mifs-wmi: Add Xiaomi 
Book Pro 14 quirk".

If result.data[0] in laptop_profile_get actually equals 0x04, the 
function should be succeed, but it doesn't.

Is there another no_set (for read only) profile entry for the 
performance profile?

> +	data->saved_profile = profile;
> +
> +	return 0;
>   }
>   
>   static int bitland_mifs_wmi_resume(struct device *dev)
> @@ -419,8 +425,8 @@ static int bitland_mifs_wmi_resume(struct device *dev)
>   	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
>   	int ret;
>   
> -	/* Skip event device */
> -	if (!data->pp_dev)
> +	/* Skip event device, or nothing was saved on suspend */
> +	if (!data->pp_dev || !data->profile_saved)
>   		return 0;
>   
>   	ret = laptop_profile_set(dev, data->saved_profile);
> @@ -436,8 +442,10 @@ static int bitland_mifs_wmi_resume(struct device *dev)
>   		}
>   	}
>   
> -	dev_dbg(dev, "Resuming, restoring profile %d\n", data->saved_profile);
> -	return ret;
> +	if (ret)
> +		dev_warn(dev, "Failed to restore platform profile: %d\n", ret);
> +
> +	return 0;
>   }
>   
>   static DEFINE_SIMPLE_DEV_PM_OPS(bitland_mifs_wmi_pm_ops,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors
  2026-10-26  9:30   ` Mingyou Chen
@ 2026-10-26  9:48     ` Chris Taraszka
  2026-10-26 10:05       ` Mingyou Chen
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Taraszka @ 2026-10-26  9:48 UTC (permalink / raw)
  To: Mingyou Chen
  Cc: Hans de Goede, Ilpo Järvinen, platform-driver-x86,
	linux-kernel, Ilya Gladyshev, Armin Wolf, KentoNion,
	Matias Civadda

On Mon, 26 Oct 2026, Mingyou Chen wrote:
> What value does the firmware respond?
>
> This patch fixes the suspend problem, but it hides the real driver
> problem (unsupported profile entry).
>
> I saw 0x04 in your patch "platform/x86: bitland-mifs-wmi: Add Xiaomi
> Book Pro 14 quirk".
>
> If result.data[0] in laptop_profile_get actually equals 0x04, the
> function should be succeed, but it doesn't.

Hi Mingyou,

It does succeed with patch 1. The firmware returns 0x04 (I also read it
back from EC 0x68), and with the TM2424 entry laptop_profile_get() maps
it to performance. Since then the machine has suspended and resumed
several times without the warning.

The test in the notes was run without patch 1 on purpose, on the v13
default table, where 0x04 is not listed. That is the state of every
Bitland machine that has no entry yet: the TM2424 before patch 1, the
TM2107 before Matias' patch, and whatever model comes next. On those,
the aborted suspend is what users hit first. Before I knew the mode
values, logind retried the suspend every 15 seconds with the lid
closed, and the laptop drained about 40 Wh in one night.

> Is there another no_set (for read only) profile entry for the
> performance profile?

No. GET only ever returned 0x02, 0x03, 0x04, 0x09 and 0x0a here, and
all five are in the table.

So patch 2 does not hide a problem on this machine. On a machine
without an entry it keeps suspend working, and the "Failed to save
platform profile" warning still shows that the table needs an entry.

Thanks for the review of patch 1.

Chris

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors
  2026-10-26  9:48     ` Chris Taraszka
@ 2026-10-26 10:05       ` Mingyou Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Mingyou Chen @ 2026-10-26 10:05 UTC (permalink / raw)
  To: Chris Taraszka
  Cc: Hans de Goede, Ilpo Järvinen, platform-driver-x86,
	linux-kernel, Ilya Gladyshev, Armin Wolf, KentoNion,
	Matias Civadda

On 10/26/26 17:48, Chris Taraszka wrote:
> On Mon, 26 Oct 2026, Mingyou Chen wrote:
>> What value does the firmware respond?
>>
>> This patch fixes the suspend problem, but it hides the real driver
>> problem (unsupported profile entry).
>>
>> I saw 0x04 in your patch "platform/x86: bitland-mifs-wmi: Add Xiaomi
>> Book Pro 14 quirk".
>>
>> If result.data[0] in laptop_profile_get actually equals 0x04, the
>> function should be succeed, but it doesn't.
> Hi Mingyou,
>
> It does succeed with patch 1. The firmware returns 0x04 (I also read it

Apologies, I misunderstood; I assume the "patch 1" you referred to is 
the one that adds the MAINTAINERS entries

of my v13.

> back from EC 0x68), and with the TM2424 entry laptop_profile_get() maps
> it to performance. Since then the machine has suspended and resumed
> several times without the warning.
>
> The test in the notes was run without patch 1 on purpose, on the v13
> default table, where 0x04 is not listed. That is the state of every
> Bitland machine that has no entry yet: the TM2424 before patch 1, the
> TM2107 before Matias' patch, and whatever model comes next. On those,
> the aborted suspend is what users hit first. Before I knew the mode
> values, logind retried the suspend every 15 seconds with the lid
> closed, and the laptop drained about 40 Wh in one night.

This is a good point, so

Reviewed-by: Mingyou Chen <qby140326@gmail.com>
>> Is there another no_set (for read only) profile entry for the
>> performance profile?
> No. GET only ever returned 0x02, 0x03, 0x04, 0x09 and 0x0a here, and
> all five are in the table.
>
> So patch 2 does not hide a problem on this machine. On a machine
> without an entry it keeps suspend working, and the "Failed to save
> platform profile" warning still shows that the table needs an entry.
>
> Thanks for the review of patch 1.
>
> Chris

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-26 10:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 19:54 [PATCH v2 0/2] platform/x86: bitland-mifs-wmi: Xiaomi Book Pro 14 support Chris Taraszka
2026-10-25 19:54 ` [PATCH v2 1/2] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk Chris Taraszka
2026-10-26  9:22   ` Mingyou Chen
2026-10-25 19:54 ` [PATCH v2 2/2] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors Chris Taraszka
2026-10-26  9:30   ` Mingyou Chen
2026-10-26  9:48     ` Chris Taraszka
2026-10-26 10:05       ` Mingyou Chen

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®