From: sashiko-bot@kernel.org
To: "Ville Syrjala" <ville.syrjala@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 02/12] drm/atomic: s/async/bypass/
Date: Mon, 16 Nov 2026 09:23:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-216608@kernel.org> (raw)
In-Reply-To: <20261116091130.13950-3-ville.syrjala@linux.intel.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 2 related pre-existing issues it does not
introduce:
- [High] drm/loongson: live state mutation in
lsdc_cursor_plane_atomic_async_check() [1]
- [Medium] drm/loongson: incomplete state copy in
lsdc_cursor_plane_atomic_async_update() [2]
--
commit 7aa4a6090dacda1cd98d23702b18772083dad3be
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
drm/atomic: s/async/bypass/
This commit renames the atomic plane async update helpers, hooks, and
state flags to "bypass" across the DRM core and display drivers.
[ ... ]
> diff --git a/drivers/gpu/drm/loongson/lsdc_plane.c b/drivers/gpu/drm/loongson/lsdc_plane.c
> index c425288ba4909..59f85072273a6 100644
> --- a/drivers/gpu/drm/loongson/lsdc_plane.c
> +++ b/drivers/gpu/drm/loongson/lsdc_plane.c
> @@ -172,9 +172,9 @@ static const struct drm_plane_helper_funcs lsdc_primary_helper_funcs = {
> .atomic_disable = lsdc_primary_atomic_disable,
> };
>
> -static int lsdc_cursor_plane_atomic_async_check(struct drm_plane *plane,
> - struct drm_atomic_commit *state,
> - bool flip)
> +static int lsdc_cursor_plane_atomic_bypass_check(struct drm_plane *plane,
> + struct drm_atomic_commit *state,
> + bool flip)
> {
> struct drm_plane_state *new_state;
> struct drm_crtc_state *crtc_state;
[Severity: High]
This problem wasn't introduced by this patch, but should
lsdc_cursor_plane_atomic_bypass_check() pass new_state instead of
plane->state to drm_atomic_helper_check_plane_state() [1]?
drivers/gpu/drm/loongson/lsdc_plane.c:lsdc_cursor_plane_atomic_bypass_check() {
...
return drm_atomic_helper_check_plane_state(plane->state,
crtc_state,
DRM_PLANE_NO_SCALING,
DRM_PLANE_NO_SCALING,
true, true);
}
drm_atomic_helper_check_plane_state() updates src, dst, and visible on the
passed-in state, so passing plane->state mutates the live committed state
during the check phase, racing with concurrent readers and corrupting
active state if the check fails or runs as TEST_ONLY.
> @@ -219,8 +219,8 @@ static int lsdc_cursor_plane_atomic_async_check(struct drm_plane *plane,
> true, true);
> }
>
> -static void lsdc_cursor_plane_atomic_async_update(struct drm_plane *plane,
> - struct drm_atomic_commit *state)
> +static void lsdc_cursor_plane_atomic_bypass_update(struct drm_plane *plane,
> + struct drm_atomic_commit *state)
> {
> struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
> const struct lsdc_cursor_plane_ops *ops = cursor->ops;
[Severity: Medium]
This problem wasn't introduced by this patch, but does
lsdc_cursor_plane_atomic_bypass_update() leave plane->state with stale
clipping rectangles and visibility [2]?
drivers/gpu/drm/loongson/lsdc_plane.c:lsdc_cursor_plane_atomic_bypass_update() {
...
plane->state->src_x = new_state->src_x;
plane->state->src_y = new_state->src_y;
plane->state->src_h = new_state->src_h;
plane->state->src_w = new_state->src_w;
swap(plane->state->fb, new_state->fb);
...
}
The in-place state update copies the integer coordinates and swaps fb, but
never copies src, dst, or visible from new_state into plane->state, leaving
them out of sync with the updated coordinates once the check phase stops
mutating plane->state directly.
[1] https://sashiko.dev/#/bug/linux-6b50e65f-5d91-4154-8ead-a7e41b3bb981
[2] https://sashiko.dev/#/bug/linux-39745fec-ddf4-4f7a-a3b2-188ca2cfda2a
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116091130.13950-1-ville.syrjala@linux.intel.com?part=2
next prev parent reply other threads:[~2026-11-16 9:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 9:11 [PATCH 00/12] drm/atomic: Try to make atomic+async usable, and clear up the "async update" helper confusion Ville Syrjala
2026-11-16 9:11 ` [PATCH 01/12] drm/atomic: Remove tall tales about tearing vs. "async updates" Ville Syrjala
2026-11-16 9:11 ` [PATCH 02/12] drm/atomic: s/async/bypass/ Ville Syrjala
2026-11-16 9:23 ` sashiko-bot [this message]
2026-11-16 9:11 ` [PATCH 03/12] drm/atomic: Add FIXMEs around the incorrect use of the .atomic_bypass_check() for async flips Ville Syrjala
2026-11-16 9:11 ` [PATCH 04/12] drm/atomic: Highlight that bypass commits need care Ville Syrjala
2026-11-16 9:11 ` [PATCH 05/12] drm/atomic/uapi: Eliminate the confusing drm_atomic_check_prop_changes() Ville Syrjala
2026-11-16 9:11 ` [PATCH 06/12] drm/atomic/uapi: Improve the async flip property rejection debugs Ville Syrjala
2026-11-16 9:11 ` [PATCH 07/12] drm/atomic/uapi: Document the non-obvious fence/fb_id prop behaviour Ville Syrjala
2026-11-16 9:11 ` [PATCH 08/12] drm/atomic/uapi: Add a FIXME about colorop vs. async flips Ville Syrjala
2026-11-16 9:11 ` [PATCH 09/12] drm/atomic-helper: Mark drm_atomic_crtc_state_for_each_plane_state() unsafe Ville Syrjala
2026-11-16 9:11 ` [PATCH 10/12] drm/i915: Complete no-op "async flips" by hand Ville Syrjala
2026-11-16 9:28 ` sashiko-bot
2026-11-16 11:10 ` Ville Syrjälä
2026-11-16 9:11 ` [PATCH 11/12] drm/atomic/uapi: Make async flips a bit more palatable through atomic Ville Syrjala
2026-11-16 9:44 ` sashiko-bot
2026-11-16 11:06 ` Ville Syrjälä
2026-11-16 9:11 ` [PATCH 12/12] drm/atomic/uapi: Extract {connector, crtc, plane}_async_flip_check() Ville Syrjala
2026-11-16 10:37 ` ✗ CI.checkpatch: warning for drm/atomic: Try to make atomic+async usable, and clear up the "async update" helper confusion Patchwork
2026-11-16 10:39 ` ✓ CI.KUnit: success " Patchwork
2026-11-16 11:14 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-16 15:21 ` ✗ Xe.CI.FULL: failure " Patchwork
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-216608@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=ville.syrjala@linux.intel.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