From: Minseo Park <hiyoukou@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: tzimmermann@suse.de, alain.volmat@foss.st.com,
rgallaispou@gmail.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, airlied@gmail.com, simona@ffwll.ch,
benjamin.gaignard@collabora.com, Minseo Park <hiyoukou@gmail.com>
Subject: [PATCH v2 3/4] drm/sti: hqvdp: start the XP70 from device init
Date: Thu, 26 Nov 2026 11:47:09 +0900 [thread overview]
Message-ID: <20261126024710.33401-4-hiyoukou@gmail.com> (raw)
In-Reply-To: <20261126024710.33401-1-hiyoukou@gmail.com>
sti_hqvdp_atomic_check() boots the XP70 coprocessor on the first commit
that uses the plane, which means it requests the HQVDP firmware and
writes it into the coprocessor's memories from the check hook.
.atomic_check() must not touch the hardware. A commit with
DRM_MODE_ATOMIC_TEST_ONLY only runs the check hooks, so a client asking
whether a configuration is possible ends up loading firmware.
The boot does not depend on anything a commit provides, and
sti_hqvdp_bind() already says it creates the plane "once xp70 is
initialized", so start it there. sti_hqvdp_start_xp70() keeps its own
xp70_initialized guard, so the caller no longer needs one.
This moves the firmware request from the first modeset to device init.
The lazy call retried on every check until it succeeded; this one runs
once, so for a built-in driver whose firmware lives in the root
filesystem the plane can now stay unusable where it used to recover on a
later modeset.
Fixes: dd86dc2f9ae1 ("drm/sti: implement atomic_check for the planes")
Signed-off-by: Minseo Park <hiyoukou@gmail.com>
---
drivers/gpu/drm/sti/sti_hqvdp.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 360d213f2094..c6b6ed54b899 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1081,10 +1081,6 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane,
return -EINVAL;
}
- if (!hqvdp->xp70_initialized)
- /* Start HQVDP XP70 coprocessor */
- sti_hqvdp_start_xp70(hqvdp);
-
if (!hqvdp->vtg_registered) {
/* Prevent VTG shutdown */
if (clk_prepare_enable(hqvdp->clk_pix_main)) {
@@ -1333,6 +1329,9 @@ static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
hqvdp->drm_dev = drm_dev;
+ /* Start HQVDP XP70 coprocessor */
+ sti_hqvdp_start_xp70(hqvdp);
+
/* Create HQVDP plane once xp70 is initialized */
plane = sti_hqvdp_create(drm_dev, hqvdp->dev, STI_HQVDP_0);
if (!plane)
--
2.43.0
next prev parent reply other threads:[~2026-11-26 8:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 2:47 [PATCH v2 0/4] drm/sti: move commit work out of .atomic_check() Minseo Park
2026-11-26 2:47 ` [PATCH v2 1/4] drm/sti: cursor: do not resize the pixmap from .atomic_check() Minseo Park
2026-11-26 8:32 ` sashiko-bot
2026-11-26 2:47 ` [PATCH v2 2/4] drm/sti: gdp: set the pixel clock from .atomic_update() Minseo Park
2026-11-26 8:35 ` sashiko-bot
2026-11-26 2:47 ` Minseo Park [this message]
2026-11-26 8:34 ` [PATCH v2 3/4] drm/sti: hqvdp: start the XP70 from device init sashiko-bot
2026-11-26 2:47 ` [PATCH v2 4/4] drm/sti: hqvdp: register the VTG client from .atomic_update() Minseo Park
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=20261126024710.33401-4-hiyoukou@gmail.com \
--to=hiyoukou@gmail.com \
--cc=airlied@gmail.com \
--cc=alain.volmat@foss.st.com \
--cc=benjamin.gaignard@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rgallaispou@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.