From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: Valeriy.Yatsenko@bshg.com, simon.holesch@bshg.com,
michael@amarulasolutions.com, linux-amarula@amarulasolutions.com,
"Leonhard Hesse" <leonhard.hesse@bshg.com>,
"Màxim Pedraza Padilla" <maximpedraza@gmail.com>,
"Dario Binacchi" <dario.binacchi@amarulasolutions.com>,
"David Airlie" <airlied@gmail.com>,
"Jessica Zhang" <jesszhan0024@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Simona Vetter" <simona@ffwll.ch>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH v2 1/6] drm/panel: Add sro_enable_resources hook
Date: Wed, 2 Dec 2026 11:38:49 +0100 [thread overview]
Message-ID: <20261202103901.577431-2-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20261202103901.577431-1-dario.binacchi@amarulasolutions.com>
When a panel is read out as active, the panel bridge prepares and
enables it, so that its driver holds the resources it releases when
the panel is unprepared. Doing so also resets and initializes a panel
that is already displaying an image.
Add the sro_enable_resources hook, for a panel driver to acquire its
resources without touching the hardware. On success the panel is
marked as prepared and enabled.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes in v2:
- Rename the hook to sro_enable_resources
- Call the hook from the panel bridge install state added by the
state readout series
drivers/gpu/drm/drm_panel.c | 8 ++++++++
include/drm/drm_panel.h | 10 ++++++++++
2 files changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index ad521b6894ca..0286934de676 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -360,6 +360,14 @@ panel_bridge_install_state(struct drm_bridge *bridge,
{
struct drm_panel *panel = drm_bridge_to_panel(bridge);
+ /* Take over the running panel without reprogramming it */
+ if (panel->funcs && panel->funcs->sro_enable_resources &&
+ !panel->funcs->sro_enable_resources(panel)) {
+ panel->prepared = true;
+ panel->enabled = true;
+ return;
+ }
+
if (!panel->prepared)
drm_panel_prepare(panel);
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index d9059a9606fc..f64b4771a54a 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -136,6 +136,16 @@ struct drm_panel_funcs {
* Allows panels to create panels-specific debugfs files.
*/
void (*debugfs_init)(struct drm_panel *panel, struct dentry *root);
+
+ /**
+ * @sro_enable_resources:
+ *
+ * Acquire the resources of a panel found enabled when the hardware
+ * state was read out, without touching the hardware.
+ *
+ * This function is optional.
+ */
+ int (*sro_enable_resources)(struct drm_panel *panel);
};
struct drm_panel_follower_funcs {
--
2.43.0
next prev parent reply other threads:[~2026-12-02 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 10:38 [RFC PATCH v2 0/6] drm: State readout for the i.MX8MN display pipeline Dario Binacchi
2026-12-02 10:38 ` Dario Binacchi [this message]
2026-12-02 10:38 ` [RFC PATCH v2 2/6] drm/mxsfb: Use the bridge connector Dario Binacchi
2026-12-02 10:38 ` [RFC PATCH v2 3/6] drm/mxsfb: Stop the controller in hw_reset Dario Binacchi
2026-12-02 10:38 ` [RFC PATCH v2 4/6] drm/mxsfb: Implement hw state readout Dario Binacchi
2026-12-02 10:38 ` [RFC PATCH v2 5/6] drm/bridge: samsung-dsim: " Dario Binacchi
2026-12-02 10:38 ` [RFC PATCH v2 6/6] drm/panel: synaptics-r63353: Support " Dario Binacchi
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=20261202103901.577431-2-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=Valeriy.Yatsenko@bshg.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=leonhard.hesse@bshg.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maximpedraza@gmail.com \
--cc=michael@amarulasolutions.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simon.holesch@bshg.com \
--cc=simona@ffwll.ch \
--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®