From: Haipeng Lin <jimmie.lin@gmail.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Doug Anderson <dianders@chromium.org>,
Maxime Ripard <mripard@kernel.org>,
Linus Walleij <linusw@kernel.org>
Cc: Jessica Zhang <jesszhan0024@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Dale Whinham <daleyo@gmail.com>,
linux-arm-msm@vger.kernel.org, aarch64-laptops@lists.linaro.org
Subject: Re: [PATCH v2] drm/panel-edp: disable the backlight at probe
Date: Mon, 16 Nov 2026 22:41:37 -0500 [thread overview]
Message-ID: <5e8d0a68-5c88-4a31-9c9c-47966093a273@gmail.com> (raw)
In-Reply-To: <49e9a6d2-8665-4e78-ac17-da5a55abf065@linaro.org>
Hi Neil,
On 11/2/26 8:15 AM, Neil Armstrong wrote:
> On 10/30/26 02:40, Doug Anderson wrote:
>> Hi,
>>
>> On Mon, Oct 26, 2026 at 6:14 PM Haipeng Lin via B4 Relay
>> <devnull+jimmie.lin.gmail.com@kernel.org> wrote:
>>>
>>> From: Haipeng Lin <jimmie.lin@gmail.com>
>>>
>>> pwm-backlight can preserve the enabled state left by firmware to
>>> support a seamless display handoff. However, panel-edp does not support
>>> such a handoff. When probing a generic eDP panel, it powers the panel
>>> on to read its EDID. If display pipeline binding takes longer than the
>>> runtime-PM autosuspend delay, the panel is then powered off while the
>>> backlight remains enabled.
>
> So we don't support handoff _now_ but we may certainly support it someday.
[...]>
> I lack some knowledge, but when the display pipeline is probed
> who's in charge of disabling the backlight when suspending ?
My understanding of the lifecycle is that once the display pipeline is
bound, and the first modeset is done, the DRM panel core via the panel
bridge is in charge of the backlight:
Enable:
panel_bridge_atomic_pre_enable() -> drm_panel_prepare() ->
pm_runtime_get_sync() (panel power on)
panel_bridge_atomic_enable() -> drm_panel_enable() ->
backlight_enable()
Disable/suspend:
panel_bridge_atomic_disable() -> drm_panel_disable() ->
backlight_disable()
panel_bridge_atomic_post_disable() -> drm_panel_unprepare() ->
pm_runtime_put_sync_suspend() (.. power off)
So normally (e.g., DPMS off) drm_panel_disable() always disables the
backlight before drm_panel_unprepare() cuts the panel power.
The gap happens at boot before the first modeset:
1. pwm-backlight probes and preserves the enabled state from firmware
(BL_EN high) while drm_panel starts with panel->{enabled,prepared} =
false.
2. generic_edp_panel_probe() calls pm_runtime_get_sync() and
pm_runtime_put_autosuspend() directly to read the EDID outside of
drm_panel_prepare/unprepare()
3. If the display pipeline takes >1s to bind, runtime PM autosuspends
the panel (which calls panel_edp_suspend() and cuts panel VDD)
but drm_panel_disable() never runs because the panel was never
enabled via DRM.
The backlight is then left on with the panel power off, which breaks
power sequencing on any panel but on the Surface Pro 11 LCD it leaves
the backlight controller stuck. At first modeset BL_EN is never toggled
because pwm-backlight thinks it is already enabled.
>
> Why don't we handle the backlight state in the PM ops ?
>
> Neil
Since panel-edp's runtime PM ops tracks prepare/unprepare state
(panel power) rather than enable/disable (backlight), by disabling the
backlight at panel_edp_probe() we sync the initial backlight state with
panel->enabled = false until panel-edp supports seamless handoff.
As Doug mentioned, v1 did backlight_disable in panel_edp_suspend() but
Doug suggested that disabling it at probe could be a one-time work-
around to handle the bootloader handoff.
I hope this addresses your concern, happy to try other approaches.
Thanks,
Haipeng
prev parent reply other threads:[~2026-11-17 3:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 1:13 Haipeng Lin via B4 Relay
2026-10-30 1:40 ` Doug Anderson
2026-11-02 13:15 ` Neil Armstrong
2026-11-02 22:38 ` Doug Anderson
2026-11-17 3:41 ` Haipeng Lin [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=5e8d0a68-5c88-4a31-9c9c-47966093a273@gmail.com \
--to=jimmie.lin@gmail.com \
--cc=aarch64-laptops@lists.linaro.org \
--cc=daleyo@gmail.com \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/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®