mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yao Zi <ziyao@disroot.org>
To: Huacai Chen <chenhuacai@kernel.org>,
	Jianmin Lv <lvjianmin@loongson.cn>,
	WANG Xuerui <kernel@xen0n.name>
Cc: linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
	Mingcong Bai <jeffbai@aosc.io>,
	Kexy Biscuit <kexybiscuit@aosc.io>, Yao Zi <ziyao@disroot.org>
Subject: [PATCH v2 0/2] Backlight control improvements for loongson_laptop
Date: Thu,  5 Jun 2025 05:48:26 +0000	[thread overview]
Message-ID: <20250605054828.15093-1-ziyao@disroot.org> (raw)

I've observed strange screen brightness changes on TongFang L860-T2
3A5000 laptop after resumption. It's found that a brightness value that
doesn't match the hardware state before suspension is "restored" for the
EC, causing the strange behavior.

This series fixes the behavior by obtaining EC's brightness setting
instead of using a constant as current brightness on probe.

While digging through the code, I've found some unused,
power-control-related functions in the driver. They're cleaned up and
used to support power control of backlight in the second patch as well.

Changed from v1:
- Reword commit message of PATCH 1
- PATCH 2
  - Always issue a power-on command on probe to ensure the backlight has
    been powered, matching our expectation
  - Cache backlight state in the driver to reduce interaction with EC
- Link to v1: https://lore.kernel.org/loongarch/20250531113851.21426-1-ziyao@disroot.org/

Yao Zi (2):
  platform/loongarch: laptop: Get brightness setting from EC on probe
  platform/loongarch: laptop: Support backlight power control

 drivers/platform/loongarch/loongson-laptop.c | 78 ++++++++++----------
 1 file changed, 39 insertions(+), 39 deletions(-)

-- 
2.49.0


             reply	other threads:[~2025-06-05  5:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05  5:48 Yao Zi [this message]
2025-06-05  5:48 ` [PATCH v2 1/2] platform/loongarch: laptop: Get brightness setting from EC on probe Yao Zi
2025-06-05  5:48 ` [PATCH v2 2/2] platform/loongarch: laptop: Support backlight power control Yao Zi
2025-06-06 13:11 ` [PATCH v2 0/2] Backlight control improvements for loongson_laptop Huacai 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=20250605054828.15093-1-ziyao@disroot.org \
    --to=ziyao@disroot.org \
    --cc=chenhuacai@kernel.org \
    --cc=jeffbai@aosc.io \
    --cc=kernel@xen0n.name \
    --cc=kexybiscuit@aosc.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=lvjianmin@loongson.cn \
    /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®