All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Icenowy Zheng" <zhengxingda@iscas.ac.cn>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane
Date: Tue, 01 Sep 2026 17:39:25 +0000	[thread overview]
Message-ID: <20260901173925.7CAA61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260901171703.1161592-2-zhengxingda@iscas.ac.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The cursor plane's blend mode property is created supporting only COVERAGE, but the default atomic state initialization sets it to PREMULTI, causing atomic commits to fail.
--

commit 8e0ec23e99807ff97fec9437ae15ac650e658045
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>

drm/verisilicon: set blend mode for the cursor plane

This commit adds a fixed COVERAGE blend mode property for the cursor plane,
as blend mode properties are now required to expose pixel formats with alpha.

> diff --git a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
> index fa4f601dd0c87..36e3664373fa1 100644
> --- a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
[ ... ]
> @@ -268,5 +269,7 @@ struct drm_plane *vs_cursor_plane_init(struct drm_device *drm_dev,
>  
>  	drm_plane_helper_add(plane, &vs_cursor_plane_helper_funcs);
>  
> +	drm_plane_create_blend_mode_property(plane,
> +					     BIT(DRM_MODE_BLEND_COVERAGE));

[Severity: High]
Will this cause atomic commits to fail during state restoration?

Looking at the plane setup, vs_cursor_plane_funcs uses the default
drm_atomic_helper_plane_reset() hook, which unconditionally initializes the
plane state's pixel_blend_mode to DRM_MODE_BLEND_PREMULTI.

Because this property is created supporting only DRM_MODE_BLEND_COVERAGE,
there is a mismatch with the initial state. When userspace queries the
initial state, it reads PREMULTI. If it attempts to write this state back
during an atomic commit (for instance, during a VT switch in a compositor),
the commit will fail with -EINVAL since PREMULTI is not in the supported
blend mode enum list.

>  	return plane;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260901171703.1161592-1-zhengxingda@iscas.ac.cn?part=2

  reply	other threads:[~2026-09-01 17:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 17:17 [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane Icenowy Zheng
2026-09-01 17:17 ` [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane Icenowy Zheng
2026-09-01 17:39   ` sashiko-bot [this message]
2026-09-10  8:50   ` Thomas Zimmermann
2026-09-01 17:27 ` [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane sashiko-bot
2026-09-10  7:09 ` Icenowy Zheng
2026-09-10  7:58   ` Thomas Zimmermann
2026-09-10  8:00     ` Icenowy Zheng
2026-09-10  8:31       ` Thomas Zimmermann
2026-09-10  8:42         ` Icenowy Zheng
2026-09-10  8:45         ` Icenowy Zheng
2026-09-10  8:56           ` Thomas Zimmermann
2026-09-10  9:02             ` Icenowy Zheng
2026-09-10  9:11               ` Thomas Zimmermann
2026-09-10  8:49 ` Thomas Zimmermann
2026-09-10  9:08   ` Icenowy Zheng
2026-09-10 10:39     ` 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=20260901173925.7CAA61F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zhengxingda@iscas.ac.cn \
    /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.