The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2] platform/loongarch: laptop: explicitly reset the bl_powered state when resuming
@ 2026-07-23 12:18 Zixing Liu
  2026-07-23 12:57 ` Xi Ruoyao
  2026-07-25 17:35 ` Yao Zi
  0 siblings, 2 replies; 3+ messages in thread
From: Zixing Liu @ 2026-07-23 12:18 UTC (permalink / raw)
  To: linux-kernel, Yao Zi, Jianmin Lv, WANG Xuerui, Huacai Chen
  Cc: Kexy Biscuit, Mingcong Bai, loongarch, Zixing Liu, stable

On EAECIS NL60R with EC firmware version 1.11, resuming from S3 has a very
high chance (>= 90%) of causing the EC to lose the previous backlight
power state. When this happens, the laptop resumes normally from S3, but
the backlight remains off (when shining on the screen with a flash light,
we can see the screen contents are updating normally).

Since there is no generic way to query the EC's backlight state on
Loongson laptop platforms, assume the worst-case scenario and restart the
backlight power inside the kernel each time the system resumes.

Cc: stable@vger.kernel.org
Fixes: 53c762b47f72 ("platform/loongarch: laptop: Add backlight power control support")
Signed-off-by: Zixing Liu <liushuyu@aosc.io>
---
Changes in v2:
- Move bl_powered reset logic to loongson_hotkey_suspend.
- Link to v1: https://lore.kernel.org/loongarch/20260722044457.1333404-1-liushuyu@aosc.io/

---
 drivers/platform/loongarch/loongson-laptop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platform/loongarch/loongson-laptop.c
index 61b18ac206c9..dc8142f4fa95 100644
--- a/drivers/platform/loongarch/loongson-laptop.c
+++ b/drivers/platform/loongarch/loongson-laptop.c
@@ -189,6 +189,7 @@ static int __init setup_acpi_notify(struct generic_sub_driver *sub_driver)
 
 static int loongson_hotkey_suspend(struct device *dev)
 {
+	bl_powered = false;
 	return 0;
 }
 
-- 
2.55.0


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

* Re: [PATCH v2] platform/loongarch: laptop: explicitly reset the bl_powered state when resuming
  2026-07-23 12:18 [PATCH v2] platform/loongarch: laptop: explicitly reset the bl_powered state when resuming Zixing Liu
@ 2026-07-23 12:57 ` Xi Ruoyao
  2026-07-25 17:35 ` Yao Zi
  1 sibling, 0 replies; 3+ messages in thread
From: Xi Ruoyao @ 2026-07-23 12:57 UTC (permalink / raw)
  To: Zixing Liu, linux-kernel, Yao Zi, Jianmin Lv, WANG Xuerui,
	Huacai Chen
  Cc: Kexy Biscuit, Mingcong Bai, loongarch, stable

On Thu, 2026-07-23 at 20:18 +0800, Zixing Liu wrote:
> On EAECIS NL60R with EC firmware version 1.11, resuming from S3 has a very
> high chance (>= 90%) of causing the EC to lose the previous backlight
> power state. When this happens, the laptop resumes normally from S3, but
> the backlight remains off (when shining on the screen with a flash light,
> we can see the screen contents are updating normally).
> 
> Since there is no generic way to query the EC's backlight state on
> Loongson laptop platforms, assume the worst-case scenario and restart the
> backlight power inside the kernel each time the system resumes.
> 
> Cc: stable@vger.kernel.org
> Fixes: 53c762b47f72 ("platform/loongarch: laptop: Add backlight power control support")
> Signed-off-by: Zixing Liu <liushuyu@aosc.io>

Tested-by: Xi Ruoyao <xry111@xry111.site>

> ---
> Changes in v2:
> - Move bl_powered reset logic to loongson_hotkey_suspend.
> - Link to v1: https://lore.kernel.org/loongarch/20260722044457.1333404-1-liushuyu@aosc.io/
> 
> ---
>  drivers/platform/loongarch/loongson-laptop.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platform/loongarch/loongson-laptop.c
> index 61b18ac206c9..dc8142f4fa95 100644
> --- a/drivers/platform/loongarch/loongson-laptop.c
> +++ b/drivers/platform/loongarch/loongson-laptop.c
> @@ -189,6 +189,7 @@ static int __init setup_acpi_notify(struct generic_sub_driver *sub_driver)
>  
>  static int loongson_hotkey_suspend(struct device *dev)
>  {
> +	bl_powered = false;
>  	return 0;
>  }
>  

-- 
Xi Ruoyao <xry111@xry111.site>

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

* Re: [PATCH v2] platform/loongarch: laptop: explicitly reset the bl_powered state when resuming
  2026-07-23 12:18 [PATCH v2] platform/loongarch: laptop: explicitly reset the bl_powered state when resuming Zixing Liu
  2026-07-23 12:57 ` Xi Ruoyao
@ 2026-07-25 17:35 ` Yao Zi
  1 sibling, 0 replies; 3+ messages in thread
From: Yao Zi @ 2026-07-25 17:35 UTC (permalink / raw)
  To: Zixing Liu, linux-kernel, Yao Zi, Jianmin Lv, WANG Xuerui,
	Huacai Chen
  Cc: Kexy Biscuit, Mingcong Bai, loongarch, stable, Yao Zi

On Thu, Jul 23, 2026 at 08:18:39PM +0800, Zixing Liu wrote:
> On EAECIS NL60R with EC firmware version 1.11, resuming from S3 has a very
> high chance (>= 90%) of causing the EC to lose the previous backlight
> power state. When this happens, the laptop resumes normally from S3, but
> the backlight remains off (when shining on the screen with a flash light,
> we can see the screen contents are updating normally).
> 
> Since there is no generic way to query the EC's backlight state on
> Loongson laptop platforms, assume the worst-case scenario and restart the
> backlight power inside the kernel each time the system resumes.
> 
> Cc: stable@vger.kernel.org
> Fixes: 53c762b47f72 ("platform/loongarch: laptop: Add backlight power control support")
> Signed-off-by: Zixing Liu <liushuyu@aosc.io>
> ---
> Changes in v2:
> - Move bl_powered reset logic to loongson_hotkey_suspend.
> - Link to v1: https://lore.kernel.org/loongarch/20260722044457.1333404-1-liushuyu@aosc.io/

Again on my TongFang L860-T2 3A5000 laptop, no regression is observed.

Tested-by: Yao Zi <me@ziyao.cc>

Best regards.
Yao Zi

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

end of thread, other threads:[~2026-07-25 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 12:18 [PATCH v2] platform/loongarch: laptop: explicitly reset the bl_powered state when resuming Zixing Liu
2026-07-23 12:57 ` Xi Ruoyao
2026-07-25 17:35 ` Yao Zi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox