From: sashiko-bot@kernel.org
To: "Huacai Chen" <chenhuacai@loongson.cn>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH V2] drm/loongson: Create blend mode property for cursor plane
Date: Wed, 02 Sep 2026 13:32:47 +0000 [thread overview]
Message-ID: <20260902133247.C51541F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260902132152.3170934-1-chenhuacai@loongson.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The cursor plane's blend mode property advertises support for DRM_MODE_BLEND_PIXEL_NONE, but the driver never reads or implements this mode, causing it to incorrectly behave as DRM_MODE_BLEND_COVERAGE.
--
commit 0fb989e37bfbacfc53639e07453dacd08e37bac4
Author: Huacai Chen <chenhuacai@kernel.org>
drm/loongson: Create blend mode property for cursor plane
This commit fixes boot warnings by exposing a blend mode property for cursor
planes that use pixel formats with alpha. It configures the planes to expose
support for both DRM_MODE_BLEND_PIXEL_NONE and DRM_MODE_BLEND_COVERAGE.
> diff --git a/drivers/gpu/drm/loongson/lsdc_plane.c b/drivers/gpu/drm/loongson/lsdc_plane.c
> index bea42215796d4..969b2aaa4fd09 100644
> --- a/drivers/gpu/drm/loongson/lsdc_plane.c
> +++ b/drivers/gpu/drm/loongson/lsdc_plane.c
[ ... ]
> @@ -765,15 +767,16 @@ int ls7a1000_cursor_plane_init(struct drm_device *ddev,
>
> drm_plane_helper_add(plane, &ls7a1000_cursor_plane_helper_funcs);
>
> - return 0;
> + return drm_plane_create_blend_mode_property(plane, blend_caps);
> }
[Severity: Medium]
Does this driver actually support DRM_MODE_BLEND_PIXEL_NONE?
The blend caps advertise DRM_MODE_BLEND_PIXEL_NONE, allowing userspace to
request disabling alpha blending on the cursor plane. However, looking at
the atomic update path for this hardware:
ls7a1000_cursor_plane_atomic_update() {
...
ops->update_cfg(cursor, CURSOR_SIZE_32X32, CURSOR_FORMAT_ARGB8888);
...
}
And similarly for the ls7a2000 hardware:
ls7a2000_cursor_plane_atomic_update() {
...
ops->update_cfg(cursor, cursor_size, CURSOR_FORMAT_ARGB8888);
...
}
It appears the hardware is unconditionally programmed to use alpha blending
(CURSOR_FORMAT_ARGB8888) regardless of the plane_state->pixel_blend_mode
value.
If userspace sets the pixel blend mode to None, won't it silently continue
using alpha coverage instead of rendering an opaque cursor?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260902132152.3170934-1-chenhuacai@loongson.cn?part=1
next prev parent reply other threads:[~2026-09-02 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 13:21 [PATCH V2] drm/loongson: Create blend mode property for cursor plane Huacai Chen
2026-09-02 13:32 ` sashiko-bot [this message]
2026-09-02 15:29 ` Icenowy Zheng
2026-09-03 2:27 ` Jianmin Lv
2026-09-03 6:05 ` Huacai Chen
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=20260902133247.C51541F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=dri-devel@lists.freedesktop.org \
--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 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.