From: sashiko-bot@kernel.org
To: "Ze Huang" <ze.huang@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org, Frank.Li@kernel.org,
imx@lists.linux.dev
Subject: Re: [PATCH v3 4/8] drm/pl111: replace struct drm_simple_display_pipe with regular atomic helpers
Date: Sun, 26 Jul 2026 19:59:55 +0000 [thread overview]
Message-ID: <20260726195955.A36731F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727-drm-simple-kms-removal-v3-4-cd5dc89858c6@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] CRTC atomic enable and disable callbacks call sleeping functions (`msleep`, `clk_prepare_enable`, `clk_disable_unprepare`), which violates the subsystem rules regarding atomic contexts.
--
--- Patch [4]: [PATCH v3 4/8] drm/pl111: replace struct drm_simple_display_pipe with regular atomic helpers ---
commit e2dfe2bacf45ede4c23cfee6fb0f779ed622850c
Author: Ze Huang <ze.huang@oss.qualcomm.com>
Subject: drm/pl111: replace struct drm_simple_display_pipe with regular atomic helpers
This commit replaces the PL111 simple display pipe with explicit plane, CRTC,
and encoder objects. It also moves timing and format validation to explicit
atomic check paths, and page-flip event handling to the CRTC commit path.
> diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
> index 5d10bc5fdf1f6..deac1dee7838a 100644
> --- a/drivers/gpu/drm/pl111/pl111_display.c
> +++ b/drivers/gpu/drm/pl111/pl111_display.c
[ ... ]
> -static void pl111_display_enable(struct drm_simple_display_pipe *pipe,
> - struct drm_crtc_state *cstate,
> - struct drm_plane_state *plane_state)
> +static void pl111_crtc_helper_atomic_enable(struct drm_crtc *crtc,
> + struct drm_atomic_commit *commit)
> {
[Severity: High]
This isn't a bug introduced by this patch, but does this function safely run
in an atomic context?
CRTC atomic enable callbacks execute in an atomic context where sleeping is
forbidden. Looking at the wider implementation of
pl111_crtc_helper_atomic_enable(), it appears to still call sleeping functions
like clk_prepare_enable() and msleep().
Could this lead to scheduling-while-atomic kernel warnings or potential
deadlocks when userspace sets a display mode and triggers the enable path?
[ ... ]
> -static void pl111_display_disable(struct drm_simple_display_pipe *pipe)
> +static void pl111_crtc_helper_atomic_disable(struct drm_crtc *crtc,
> + struct drm_atomic_commit *commit)
> {
[ ... ]
> /* Disable */
> writel(0, priv->regs + priv->ctrl);
>
> clk_disable_unprepare(priv->clk);
> }
[Severity: High]
This is also a pre-existing issue, but is it safe to use sleeping functions
like clk_disable_unprepare() and msleep() during the disable sequence?
Similar to the enable path, pl111_crtc_helper_atomic_disable() operates as
an atomic disable callback, which also runs in an atomic context. Could these
sleep calls cause system instability or scheduling warnings when the CRTC is
powered off?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-drm-simple-kms-removal-v3-0-cd5dc89858c6@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-07-26 19:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 19:45 [PATCH v3 0/8] drm: replace simple display pipe users with atomic helpers Ze Huang
2026-07-26 19:45 ` [PATCH v3 1/8] drm/arcpgu: replace struct drm_simple_display_pipe with regular " Ze Huang
2026-07-26 19:45 ` [PATCH v3 2/8] drm/aspeed: " Ze Huang
2026-07-26 19:59 ` sashiko-bot
2026-07-27 2:29 ` Ze Huang
2026-07-26 19:45 ` [PATCH v3 3/8] drm/mcde: " Ze Huang
2026-07-26 19:57 ` sashiko-bot
2026-07-27 2:31 ` Ze Huang
2026-07-26 19:45 ` [PATCH v3 4/8] drm/pl111: " Ze Huang
2026-07-26 19:59 ` sashiko-bot [this message]
2026-07-26 19:45 ` [PATCH v3 5/8] drm/gm12u320: " Ze Huang
2026-07-26 20:13 ` sashiko-bot
2026-07-27 3:29 ` Ze Huang
2026-07-26 19:45 ` [PATCH v3 6/8] drm/repaper: " Ze Huang
2026-07-26 20:04 ` sashiko-bot
2026-07-27 2:35 ` Ze Huang
2026-07-26 19:45 ` [PATCH v3 7/8] drm/tve200: " Ze Huang
2026-07-26 20:00 ` sashiko-bot
2026-07-27 2:55 ` Ze Huang
2026-07-26 19:45 ` [PATCH v3 8/8] drm/xen: " Ze Huang
2026-07-26 19:56 ` sashiko-bot
2026-07-26 20:32 ` [PATCH v3 0/8] drm: replace simple display pipe users with " Linus Walleij
2026-07-27 1:37 ` Ze Huang
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=20260726195955.A36731F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=ze.huang@oss.qualcomm.com \
/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