From: sashiko-bot@kernel.org
To: "Màxim Pedraza Padilla" <maximpedraza@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH v3 2/2] drm/panel: simple: Keep the enable GPIO as left by the bootloader
Date: Tue, 01 Dec 2026 09:40:33 +0000 [thread overview]
Message-ID: <sashiko-outbox-242990@kernel.org> (raw)
In-Reply-To: <20261201092651.240295-3-maximpedraza@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/panel: simple: enable_gpio state desync in
panel_simple_probe()
--
commit 29ec10355f1c521cad78cbabc080604b3d619f74
Author: Màxim Pedraza Padilla <maximpedraza@gmail.com>
drm/panel: simple: Keep the enable GPIO as left by the bootloader
This commit requests the panel enable GPIO with GPIOD_ASIS at probe time
and configures it as an output in panel_simple_resume().
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index fe93f59c1d8ee..01db221591494 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
[ ... ]
> @@ -664,7 +664,7 @@ static struct panel_simple *panel_simple_probe(struct device *dev)
> return ERR_CAST(panel->supply);
>
> panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
> - GPIOD_OUT_LOW);
> + GPIOD_ASIS);
> if (IS_ERR(panel->enable_gpio))
> return dev_err_cast_probe(dev, panel->enable_gpio,
> "failed to request GPIO\n");
[Severity: High]
Does requesting panel->enable_gpio with GPIOD_ASIS leave the physical GPIO
state out of sync with panel->base.prepared, runtime PM, and
panel->supply?
When the bootloader leaves the panel enabled and the display state is kept
without a full modeset, drm_panel_prepare() does not run, so the device
starts in RPM_SUSPENDED with panel->base.prepared == false and no
regulator reference on panel->supply.
If panel->ddc is present, panel_simple_get_modes() calls
pm_runtime_get_sync() followed by pm_runtime_put_autosuspend(); because
panel_simple_prepare() never took a persistent runtime PM reference, the
device autosuspends 1000 ms later and panel_simple_suspend() drives
enable_gpio low and disables panel->supply while the display is scanning
out. If panel->ddc is absent, panel_simple_resume() never runs at all, so
late_initcall_sync can disable an unused boot-on panel->supply, and a
subsequent disable or shutdown returns early from drm_panel_unprepare()
because panel->base.prepared is false, leaving enable_gpio asserted when
the display is turned off.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201092651.240295-1-maximpedraza@gmail.com?part=2
prev parent reply other threads:[~2026-12-01 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 9:26 [RFC PATCH v3 0/2] drm/tilcdc: Implement state readout Màxim Pedraza Padilla
2026-12-01 9:26 ` [RFC PATCH v3 1/2] drm/tilcdc: Implement state readout support Màxim Pedraza Padilla
2026-12-01 9:54 ` sashiko-bot
2026-12-01 9:26 ` [RFC PATCH v3 2/2] drm/panel: simple: Keep the enable GPIO as left by the bootloader Màxim Pedraza Padilla
2026-12-01 9:40 ` sashiko-bot [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=sashiko-outbox-242990@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=maximpedraza@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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