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 5/9] drm/pl111: replace struct drm_simple_display_pipe with regular atomic helpers
Date: Sat, 04 Jul 2026 18:45:07 +0000 [thread overview]
Message-ID: <20260704184507.B1F981F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260705-drm-simple-kms-removal-v1-5-b4e1ca053623@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unconsumed CRTC VBLANK event when disabling the CRTC causes a memory leak and userspace hang.
--
commit f35a0721a36bbf78ed41d1be8bb186efb88c9092
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 preserves existing hardware programming and vblank
behavior while using the GEM framebuffer prepare helper.
> diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
> index 5d10bc5fdf1f6..b1bdd4c9dbe68 100644
> --- a/drivers/gpu/drm/pl111/pl111_display.c
> +++ b/drivers/gpu/drm/pl111/pl111_display.c
[ ... ]
> -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 *state)
> {
> - struct drm_crtc *crtc = &pipe->crtc;
> struct drm_device *drm = crtc->dev;
> struct pl111_drm_dev_private *priv = drm->dev_private;
> u32 cntl;
[ ... ]
> -static void pl111_display_update(struct drm_simple_display_pipe *pipe,
> - struct drm_plane_state *old_pstate)
> +static void pl111_plane_helper_atomic_update(struct drm_plane *plane,
> + struct drm_atomic_commit *state)
> {
> - struct drm_crtc *crtc = &pipe->crtc;
> - struct drm_device *drm = crtc->dev;
> - struct pl111_drm_dev_private *priv = drm->dev_private;
> - struct drm_pending_vblank_event *event = crtc->state->event;
> - struct drm_plane *plane = &pipe->plane;
> + struct drm_crtc *crtc = plane->state->crtc;
> + struct drm_device *drm;
> + struct pl111_drm_dev_private *priv;
> + struct drm_pending_vblank_event *event;
> struct drm_plane_state *pstate = plane->state;
> struct drm_framebuffer *fb = pstate->fb;
>
> + if (!crtc)
> + return;
> +
[Severity: High]
When disabling the CRTC, does this code leak the vblank event?
If an atomic commit disables the CRTC and requests a completion event, this
early return in pl111_plane_helper_atomic_update() triggers because
plane->state->crtc is NULL when the plane is disabled.
Since the event consumption logic previously provided by the
drm_simple_display_pipe framework has been removed, and
pl111_crtc_helper_atomic_disable() also lacks logic to consume
crtc->state->event, won't the event remain attached and unconsumed?
This can trigger a kernel warning in drm_atomic_helper_commit_hw_done()
(which warns if the event is still attached) and cause userspace
compositors to hang indefinitely waiting for the page flip event.
> + drm = crtc->dev;
> + priv = drm->dev_private;
> + event = crtc->state->event;
> +
> if (fb) {
> u32 addr = drm_fb_dma_get_gem_addr(fb, pstate, 0);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260705-drm-simple-kms-removal-v1-0-b4e1ca053623@oss.qualcomm.com?part=5
next prev parent reply other threads:[~2026-07-04 18:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 18:31 [PATCH 0/9] drm: replace simple display pipe users with atomic helpers Ze Huang
2026-07-04 18:31 ` [PATCH 1/9] drm/arcpgu: replace struct drm_simple_display_pipe with regular " Ze Huang
2026-07-04 18:43 ` sashiko-bot
2026-07-06 7:43 ` Thomas Zimmermann
2026-07-06 8:01 ` Thomas Zimmermann
2026-07-04 18:31 ` [PATCH 2/9] drm/aspeed: " Ze Huang
2026-07-04 18:52 ` sashiko-bot
2026-07-06 8:31 ` Thomas Zimmermann
2026-07-04 18:31 ` [PATCH 3/9] drm/imx: " Ze Huang
2026-07-04 18:46 ` sashiko-bot
2026-07-04 18:31 ` [PATCH 4/9] drm/mcde: " Ze Huang
2026-07-04 18:44 ` sashiko-bot
2026-07-04 18:31 ` [PATCH 5/9] drm/pl111: " Ze Huang
2026-07-04 18:45 ` sashiko-bot [this message]
2026-07-04 18:31 ` [PATCH 6/9] drm/gm12u320: " Ze Huang
2026-07-04 18:45 ` sashiko-bot
2026-07-04 18:31 ` [PATCH 7/9] drm/repaper: " Ze Huang
2026-07-04 18:31 ` [PATCH 8/9] drm/tve200: " Ze Huang
2026-07-04 18:46 ` sashiko-bot
2026-07-04 18:31 ` [PATCH 9/9] drm/xen: " Ze Huang
2026-07-04 18:53 ` sashiko-bot
2026-07-06 7:27 ` [PATCH 0/9] drm: replace simple display pipe users with " Thomas Zimmermann
2026-07-06 8:22 ` 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=20260704184507.B1F981F000E9@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