From: Daniel Thompson <danielt@kernel.org>
To: david@ixit.cz
Cc: "Lee Jones" <lee@kernel.org>, "Jingoo Han" <jingoohan1@gmail.com>,
"Helge Deller" <deller@gmx.de>,
"Kiran Gunda" <quic_kgunda@quicinc.com>,
"Marco Mattiolo" <marco.mattiolo@hotmail.it>,
"Barnabás Czémán" <barnabas.czeman@mainlining.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
phone-devel@vger.kernel.org,
"Konrad Dybcio" <konrad.dybcio@oss.qualcomm.com>,
"Joel Selvaraj" <foss@joelselvaraj.com>
Subject: Re: [PATCH v4 4/4] backlight: qcom-wled: Read back the programmed brightness at probe
Date: Tue, 6 Oct 2026 11:11:04 +0100 [thread overview]
Message-ID: <asTJOGXnq3pixevl@aspen.lan> (raw)
In-Reply-To: <20260921-qcom-wled-backlight-v4-4-bab8c7ef73cb@ixit.cz>
On Mon, Sep 21, 2026 at 12:46:25PM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Since the previous change wled_probe() seeds wled->brightness from
> MOD_EN, but with default-brightness rather than the level the hardware
> is actually driving, so a backlight left lit by the bootloader still
> visibly steps on the first update, and actual_brightness reports the
> last value written rather than what the panel shows.
>
> Add wled_read_brightness(), which returns 0 when MOD_EN is clear and
> otherwise reads the brightness register the matching
> wledN_set_brightness() writes: the first enabled string on WLED3 and
> WLED4, the selected modulator on WLED5. Use it to seed both
> wled->brightness and the initial backlight property, and expose it as
> backlight_ops.get_brightness so that actual_brightness reflects the
> hardware too.
>
> A module that is enabled with the brightness registers at zero, which
> wled4_setup() and wled_auto_string_detection() can leave behind on a
> cold boot, now reads back as off. The OVP interrupt is then armed by the
> first brightness update rather than from probe, which is what happens
> on every other board where the module starts out disabled.
>
> Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Assisted-by: LLM
> Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Daniel.
prev parent reply other threads:[~2026-10-06 10:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 10:46 [PATCH v4 0/4] backlight: qcom-wled: Fix OVP IRQ imbalance and start from the hardware state David Heidelberg via B4 Relay
2026-09-21 10:46 ` David Heidelberg
2026-09-21 10:46 ` [PATCH v4 1/4] backlight: qcom-wled: Fix NULL pointer dereference in wled_remove() David Heidelberg via B4 Relay
2026-09-21 10:46 ` David Heidelberg
2026-09-21 11:06 ` Konrad Dybcio
2026-10-06 9:59 ` Daniel Thompson
2026-09-21 10:46 ` [PATCH v4 2/4] backlight: qcom-wled: Fix WLED3 brightness register stride David Heidelberg via B4 Relay
2026-09-21 10:46 ` David Heidelberg
2026-09-21 11:08 ` Konrad Dybcio
2026-09-21 11:11 ` David Heidelberg
2026-10-06 10:03 ` Daniel Thompson
2026-09-21 10:46 ` [PATCH v4 3/4] backlight: qcom-wled: Fix unbalanced OVP IRQ enable at probe David Heidelberg via B4 Relay
2026-09-21 10:46 ` David Heidelberg
2026-10-06 10:07 ` Daniel Thompson
2026-09-21 10:46 ` [PATCH v4 4/4] backlight: qcom-wled: Read back the programmed brightness " David Heidelberg via B4 Relay
2026-09-21 10:46 ` David Heidelberg
2026-10-06 10:11 ` Daniel Thompson [this message]
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=asTJOGXnq3pixevl@aspen.lan \
--to=danielt@kernel.org \
--cc=barnabas.czeman@mainlining.org \
--cc=david@ixit.cz \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=foss@joelselvaraj.com \
--cc=jingoohan1@gmail.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.mattiolo@hotmail.it \
--cc=phone-devel@vger.kernel.org \
--cc=quic_kgunda@quicinc.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.