From: sashiko-bot@kernel.org
To: "Chen-Yu Tsai" <wenst@chromium.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/sysfb: Use iosys_map_memset() to clear buffer
Date: Thu, 03 Sep 2026 06:15:07 +0000 [thread overview]
Message-ID: <20260903061507.BF0E51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260903060651.3724163-1-wenst@chromium.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The atomic_disable callback uses the new plane state to determine the screen area to clear, which may be zeroed out and fail to clear the screen.
--
commit cdbf0de82b5bf761696ff2cc3c658a3d090a02c8
Author: Chen-Yu Tsai <wenst@chromium.org>
drm/sysfb: Use iosys_map_memset() to clear buffer
This patch updates the sysfb atomic disable routine to use
iosys_map_memset() with an offset, rather than directly extracting the
virtual address for memory clearing.
> diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
> index d2de29caf89eb..99b13af4e391c 100644
> --- a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
> +++ b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
> @@ -375,13 +375,11 @@ void drm_sysfb_plane_helper_atomic_disable(struct drm_plane *plane,
> {
> struct drm_device *dev = plane->dev;
> struct drm_sysfb_device *sysfb = to_drm_sysfb_device(dev);
> - struct iosys_map dst = sysfb->fb_addr;
> struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
> - void __iomem *dst_vmap = dst.vaddr_iomem; /* TODO: Use mapping abstraction */
> unsigned int dst_pitch = sysfb->fb_pitch;
> const struct drm_format_info *dst_format = sysfb->fb_format;
> struct drm_rect dst_clip;
> - unsigned long lines, linepixels, i;
> + unsigned long lines, linepixels, i, offset;
> int idx;
>
> drm_rect_init(&dst_clip,
> plane_state->src_x >> 16, plane_state->src_y >> 16,
> plane_state->src_w >> 16, plane_state->src_h >> 16);
>
> lines = drm_rect_height(&dst_clip);
> linepixels = drm_rect_width(&dst_clip);
[Severity: High]
This isn't a bug introduced by this patch, but does using the new plane state
to calculate the clear area result in a failure to clear the screen?
Because drm_sysfb_plane_helper_atomic_disable() fetches the new plane state
above, it uses the state properties after the plane is disabled. If a
userspace display server zeroes out SRC_W and SRC_H when setting FB_ID = 0
to disable the plane, both lines and linepixels will evaluate to 0 here.
Could this cause the clearing loop to be completely skipped, leaving stale
framebuffer data visible on the screen?
Should this code use drm_atomic_get_old_plane_state() instead to ensure it
always correctly clears the area previously occupied by the plane?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260903060651.3724163-1-wenst@chromium.org?part=1
next prev parent reply other threads:[~2026-09-03 6:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 6:06 [PATCH 1/2] drm/sysfb: Use iosys_map_memset() to clear buffer Chen-Yu Tsai
2026-09-03 6:06 ` [PATCH 2/2] drm/sysfb: Use drm_format_info_min_pitch() to calculate line clear length Chen-Yu Tsai
2026-09-03 6:17 ` sashiko-bot
2026-09-03 6:15 ` sashiko-bot [this message]
2026-09-03 6:51 ` [PATCH 1/2] drm/sysfb: Use iosys_map_memset() to clear buffer Thomas Zimmermann
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=20260903061507.BF0E51F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wenst@chromium.org \
/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.