From: Qinyun Tan <qinyuntan@linux.alibaba.com>
To: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Cc: airlied@redhat.com, jfalempe@redhat.com, kraxel@redhat.com,
dmitry.osipenko@collabora.com, hansg@kernel.org,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
simona@ffwll.ch, leandro.ribeiro@collabora.com,
daniels@collabora.com, pekka.paalanen@collabora.com,
virtualization@lists.linux.dev,
spice-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] drm/ast: create blend mode property on cursor plane
Date: Tue, 1 Sep 2026 20:51:18 +0800 [thread overview]
Message-ID: <8c6ef5d2-1f85-4dad-b426-143d490e1114@linux.alibaba.com> (raw)
In-Reply-To: <15f87b4e-3da8-4ce9-9cde-b4c8cefe1d80@suse.de>
Hi Thomas,
On 9/1/26 8:30 PM, Thomas Zimmermann wrote:
> Hi
>
> Am 01.09.26 um 13:54 schrieb Thomas Zimmermann:
>> Hi,
>>
>> thanks for the updated patch.
>>
>> Did you see the review from the Sashiko bot? The default value is PRE_MULTI, but the driver only supports COVERAGE. This needs to be changed as part of this patch. The default assignment is at [1] in __drm_atomic_helper_plane_state_init().
>>
>> The ast driver needs to override drm_plane_funcs.atomic_create_state for the cursor plane to update the value pixel_blend to COVERAGE for new plane states. Same goes for vbox.
>
> Or even better: I just sent out a patch to pick the right default value for the plane state. Let's first see what comes out of this. Patch is at [1].
>
> [1] https://lore.kernel.org/dri-devel/20260901122731.83854-1-tzimmermann@suse.de/
>
> Best regards
> Thomas
>
Thanks! I did see the Sashiko bot report and had started on a v3 that
overrides drm_plane_funcs.atomic_create_state in ast and vboxvideo
(for vboxvideo on both the primary and cursor planes).
But your approach looks better to me: drm_plane_create_blend_mode_property()
already picks DRM_MODE_BLEND_COVERAGE as the property default when
PREMULTI is not supported, so initializing the plane state from the
property default fixes this for every COVERAGE-only plane without
per-driver boilerplate.
I'll hold off on v3 until your patch has settled.
Best regards,
Qinyun
>>
>> [1] https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/drivers/gpu/drm/drm_atomic_state_helper.c?ref_type=heads#L281
>>
>> Best regards
>> Thomas
>>
>>
>> Am 01.09.26 um 10:32 schrieb Qinyun Tan:
>>> Since commit 860e748bddcc ("drm: ensure blend mode supported if pixel
>>> format with alpha exposed"), drm_mode_config_validate() warns when a
>>> plane exposes an alpha pixel format but not the "pixel blend mode"
>>> property. The ast cursor plane (ARGB4444, ARGB8888) trips this on
>>> driver load:
>>>
>>> [PLANE:37:plane-1] pixel format with alpha exposed but blend mode not setup
>>> WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0x48f/0x510 [drm]
>>> ...
>>> Call Trace:
>>> drm_dev_register+0x1ce/0x290 [drm]
>>> ast_pci_probe+0x19d/0x3f0 [ast]
>>> local_pci_probe+0x41/0x90
>>>
>>> Per Thomas Zimmermann's review, the ASPEED documentation describes the
>>> hardware cursor as blending with straight (non-pre-multiplied) alpha,
>>> which corresponds to DRM_MODE_BLEND_COVERAGE. Expose a "pixel blend
>>> mode" property advertising only DRM_MODE_BLEND_COVERAGE to make the
>>> hardware semantics explicit and silence the warning.
>>>
>>> Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
>>> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
>>> ---
>>> v2: advertise DRM_MODE_BLEND_COVERAGE instead of PREMULTI, per Thomas
>>> Zimmermann's review and the ASPEED documentation.
>>>
>>> drivers/gpu/drm/ast/ast_cursor.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> 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
>>> @@ -25,6 +25,7 @@
>>> #include <linux/sizes.h>
>>> #include <drm/drm_atomic.h>
>>> +#include <drm/drm_blend.h>
>>> #include <drm/drm_damage_helper.h>
>>> #include <drm/drm_format_helper.h>
>>> #include <drm/drm_gem_atomic_helper.h>
>>> @@ -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));
>>> return 0;
>>> }
>>
>
next prev parent reply other threads:[~2026-09-01 12:51 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
2026-09-01 11:54 ` Thomas Zimmermann
2026-09-01 12:30 ` Thomas Zimmermann
2026-09-01 12:51 ` Qinyun Tan [this message]
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=8c6ef5d2-1f85-4dad-b426-143d490e1114@linux.alibaba.com \
--to=qinyuntan@linux.alibaba.com \
--cc=airlied@redhat.com \
--cc=daniels@collabora.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansg@kernel.org \
--cc=jfalempe@redhat.com \
--cc=kraxel@redhat.com \
--cc=leandro.ribeiro@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=pekka.paalanen@collabora.com \
--cc=simona@ffwll.ch \
--cc=spice-devel@lists.freedesktop.org \
--cc=tzimmermann@suse.de \
--cc=virtualization@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.