Re: [PATCH v2] platform/loongarch: laptop: explicitly reset the bl_powered state when resuming

Xi Ruoyao <[email protected]> Thu, 23 Jul 2026 20:57:35 +0800
Newsgroups dev.linux.lists.loongarch,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
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 ver=
y
> high chance (>=3D 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).
>=20
> 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.
>=20
> Cc: [email protected]
> Fixes: 53c762b47f72 ("platform/loongarch: laptop: Add backlight power con=
trol support")
> Signed-off-by: Zixing Liu <[email protected]>

Tested-by: Xi Ruoyao <[email protected]>

> ---
> Changes in v2:
> - Move bl_powered reset logic to loongson_hotkey_suspend.
> - Link to v1: https://lore.kernel.org/loongarch/20260722044457.1333404-1-=
[email protected]/
>=20
> ---
> =C2=A0drivers/platform/loongarch/loongson-laptop.c | 1 +
> =C2=A01 file changed, 1 insertion(+)
>=20
> diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platf=
orm/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_su=
b_driver *sub_driver)
> =C2=A0
> =C2=A0static int loongson_hotkey_suspend(struct device *dev)
> =C2=A0{
> +	bl_powered =3D false;
> =C2=A0	return 0;
> =C2=A0}
> =C2=A0

--=20
Xi Ruoyao <[email protected]>