From: sashiko-bot@kernel.org
To: "Qinyun Tan" <qinyuntan@linux.alibaba.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/4] drm/ast: create blend mode property on cursor plane
Date: Tue, 01 Sep 2026 08:46:54 +0000 [thread overview]
Message-ID: <20260901084654.DBA291F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260901083234.1828755-2-qinyuntan@linux.alibaba.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The cursor plane's initial atomic state for the blend mode property is set to an unsupported value (`DRM_MODE_BLEND_PREMULTI`), which breaks atomic state restoration.
--
commit 1ab10188d3825ff30d7b2814879afdf8a8dc65e6
Author: Qinyun Tan <qinyuntan@linux.alibaba.com>
Subject: drm/ast: create blend mode property on cursor plane
This patch adds a blend mode property to the ast cursor plane to satisfy the
drm_mode_config_validate() warning about missing blend modes on planes
exposing an alpha pixel format. The newly created property only advertises
DRM_MODE_BLEND_COVERAGE.
> diff --git a/drivers/gpu/drm/ast/ast_cursor.c b/drivers/gpu/drm/ast/ast_cursor.c
> index fd19c45f2abe2..690d4cd1db5ee 100644
> --- a/drivers/gpu/drm/ast/ast_cursor.c
> +++ b/drivers/gpu/drm/ast/ast_cursor.c
[ ... ]
> @@ -355,6 +356,8 @@ int ast_cursor_plane_init(struct ast_device *ast)
> }
> drm_plane_helper_add(cursor_plane, &ast_cursor_plane_helper_funcs);
> drm_plane_enable_fb_damage_clips(cursor_plane);
> + drm_plane_create_blend_mode_property(cursor_plane,
> + BIT(DRM_MODE_BLEND_COVERAGE));
[Severity: High]
Does this mismatch with the default reset hook and break atomic state
restoration?
The cursor plane uses DRM_GEM_SHADOW_PLANE_FUNCS in ast_cursor_plane_funcs,
which defaults to drm_gem_reset_shadow_plane(). That function calls the
core DRM helper __drm_atomic_helper_plane_state_init(), which hardcodes
plane_state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI. The driver does
not provide a custom .reset hook to override this default.
Since the blend mode property is created here to strictly support only
DRM_MODE_BLEND_COVERAGE, it doesn't support the DRM_MODE_BLEND_PREMULTI
value assigned by the default reset hook.
Because of this mismatch, userspace state queries will return an invalid
enum value that is not in the property's valid enum mask. If a compositor
attempts to save and restore this exact state using the atomic ioctl,
drm_property_change_valid_get() will reject it with -EINVAL. This could
break compositor initialization, virtual terminal switching, and
read-modify-write atomic commits on the cursor plane.
Could we add a custom reset hook to initialize the blend mode to
DRM_MODE_BLEND_COVERAGE, or include DRM_MODE_BLEND_PREMULTI in the
property's valid enum mask?
>
> return 0;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260901083234.1828755-1-qinyuntan@linux.alibaba.com?part=1
next prev parent reply other threads:[~2026-09-01 8:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 8:32 [PATCH v2 0/4] drm: create blend mode property on alpha-capable planes of simple drivers Qinyun Tan
2026-09-01 8:32 ` [PATCH v2 1/4] drm/ast: create blend mode property on cursor plane Qinyun Tan
2026-09-01 8:46 ` sashiko-bot [this message]
2026-09-01 11:54 ` Thomas Zimmermann
2026-09-01 12:30 ` Thomas Zimmermann
2026-09-01 12:51 ` Qinyun Tan
2026-09-03 7:05 ` Thomas Zimmermann
2026-09-04 5:31 ` Qinyun Tan
2026-09-03 7:01 ` Thomas Zimmermann
2026-09-01 8:32 ` [PATCH v2 2/4] drm/qxl: create blend mode property on primary and cursor planes Qinyun Tan
2026-09-01 11:45 ` Thomas Zimmermann
2026-09-01 8:32 ` [PATCH v2 3/4] drm/virtio: create blend mode property on cursor plane Qinyun Tan
2026-09-01 11:46 ` Thomas Zimmermann
2026-09-01 8:32 ` [PATCH v2 4/4] drm/vboxvideo: create blend mode property on planes Qinyun Tan
2026-09-01 8:46 ` sashiko-bot
2026-09-03 7:00 ` 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=20260901084654.DBA291F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=qinyuntan@linux.alibaba.com \
--cc=sashiko-reviews@lists.linux.dev \
/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