Re: [PATCH] drm/dp: don't mark the AUX backlight enabled when enabling failed
From: Doug Anderson
Date: Fri Sep 25 2026 - 12:18:35 EST
Hi,
On Fri, Sep 25, 2026 at 6:26 AM Oleg Keri <okerixx@xxxxxxxxx> 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@xxxxxxxxx>
> ---
> 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@xxxxxxxxxxxx>
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