* [PATCH] drm/dp: don't mark the AUX backlight enabled when enabling failed
@ 2026-09-25 13:25 Oleg Keri
2026-09-25 16:08 ` Doug Anderson
0 siblings, 1 reply; 4+ messages in thread
From: Oleg Keri @ 2026-09-25 13:25 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Douglas Anderson, Lyude Paul
Cc: dri-devel, linux-kernel
If drm_edp_backlight_enable() fails, dp_aux_backlight_update_status()
still marks the backlight as enabled. From then on every brightness
change only updates the level and the enable is never retried, so the
panel stays dark until something blanks and unblanks the backlight.
I hit this after resume on a Samsung ATNA OLED panel, where the first
AUX write can fail while the panel is still waking up.
Return the error instead, so the next update tries to enable again.
Fixes: 10f7b40e4f30 ("drm/panel: add basic DP AUX backlight support")
Signed-off-by: Oleg Keri <okerixx@gmail.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -4634,7 +4634,9 @@ static int dp_aux_backlight_update_status(struct backlight_device *bd)
if (!backlight_is_blank(bd)) {
if (!bl->enabled) {
- drm_edp_backlight_enable(bl->aux, &bl->info, brightness);
+ ret = drm_edp_backlight_enable(bl->aux, &bl->info, brightness);
+ if (ret)
+ return ret;
bl->enabled = true;
return 0;
}
base-commit: 4c253ac4b29b8c6cc6fdef8f92d4facde62e63b9
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm/dp: don't mark the AUX backlight enabled when enabling failed
2026-09-25 13:25 [PATCH] drm/dp: don't mark the AUX backlight enabled when enabling failed Oleg Keri
@ 2026-09-25 16:08 ` Doug Anderson
2026-09-26 19:51 ` Oleg Keri
0 siblings, 1 reply; 4+ messages in thread
From: Doug Anderson @ 2026-09-25 16:08 UTC (permalink / raw)
To: Oleg Keri
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Lyude Paul, dri-devel, linux-kernel
Hi,
On Fri, Sep 25, 2026 at 6:26 AM Oleg Keri <okerixx@gmail.com> wrote:
>
> If drm_edp_backlight_enable() fails, dp_aux_backlight_update_status()
> still marks the backlight as enabled. From then on every brightness
> change only updates the level and the enable is never retried, so the
> panel stays dark until something blanks and unblanks the backlight.
>
> I hit this after resume on a Samsung ATNA OLED panel, where the first
> AUX write can fail while the panel is still waking up.
>
> Return the error instead, so the next update tries to enable again.
>
> Fixes: 10f7b40e4f30 ("drm/panel: add basic DP AUX backlight support")
> Signed-off-by: Oleg Keri <okerixx@gmail.com>
> ---
> drivers/gpu/drm/display/drm_dp_helper.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -4634,7 +4634,9 @@ static int dp_aux_backlight_update_status(struct backlight_device *bd)
>
> if (!backlight_is_blank(bd)) {
> if (!bl->enabled) {
> - drm_edp_backlight_enable(bl->aux, &bl->info, brightness);
> + ret = drm_edp_backlight_enable(bl->aux, &bl->info, brightness);
> + if (ret)
> + return ret;
> bl->enabled = true;
> return 0;
The above looks like a good fix. Thanks for catching and sending a patch.
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Unless there is a reason not to, I'll try to apply this to
drm-misc-fixes next week.
That being said, why exactly is the first AUX command failing? That
seems fishy and warrants separate investigation. The panel should be
fully powered up and communicating by the time we get here and I
believe there are already retries in place for the AUX commands.
I'll also note that I considered whether we should also error-check
the drm_edp_backlight_disable(). I think the answer there is "no". In
general errors in "disable" and "free" are hard to handle sensibly,
and hopefully the panel will be powered off shortly after the
backlight goes off anyway.
-Doug
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm/dp: don't mark the AUX backlight enabled when enabling failed
2026-09-25 16:08 ` Doug Anderson
@ 2026-09-26 19:51 ` Oleg Keri
2026-09-30 20:12 ` Doug Anderson
0 siblings, 1 reply; 4+ messages in thread
From: Oleg Keri @ 2026-09-26 19:51 UTC (permalink / raw)
To: Doug Anderson
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Lyude Paul, dri-devel, linux-kernel
Hi Doug,
Sorry for the muddy commit message. Unfortunately i cannot reproduce
the enable fail. I found the unchecked return while debugging eDP issues
on glymur. Please drop the second paragraph when applying, or drop the
patch if a code-inspection fix without a reproducer isn't worth taking.
Oleg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/dp: don't mark the AUX backlight enabled when enabling failed
2026-09-26 19:51 ` Oleg Keri
@ 2026-09-30 20:12 ` Doug Anderson
0 siblings, 0 replies; 4+ messages in thread
From: Doug Anderson @ 2026-09-30 20:12 UTC (permalink / raw)
To: Oleg Keri
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Lyude Paul, dri-devel, linux-kernel
Hi,
On Sat, Sep 26, 2026 at 12:52 PM Oleg Keri <okerixx@gmail.com> wrote:
>
> Hi Doug,
>
> Sorry for the muddy commit message. Unfortunately i cannot reproduce
> the enable fail. I found the unchecked return while debugging eDP issues
> on glymur. Please drop the second paragraph when applying, or drop the
> patch if a code-inspection fix without a reproducer isn't worth taking.
OK, I pushed it to drm-misc-fixes while dropping the second paragraph:
[1/1] drm/dp: don't mark the AUX backlight enabled when enabling failed
commit: 707ce102521496c67860d81221b20c56d8255f2f
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-30 20:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 13:25 [PATCH] drm/dp: don't mark the AUX backlight enabled when enabling failed Oleg Keri
2026-09-25 16:08 ` Doug Anderson
2026-09-26 19:51 ` Oleg Keri
2026-09-30 20:12 ` Doug Anderson
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®