* [PATCH 1/4] drm/ast: create blend mode property on cursor plane
2026-09-01 6:50 [PATCH 0/4] drm: create blend mode property on alpha-capable planes of simple drivers Qinyun Tan
@ 2026-09-01 6:50 ` Qinyun Tan
2026-09-01 7:03 ` Thomas Zimmermann
2026-09-01 6:50 ` [PATCH 2/4] drm/qxl: create blend mode property on primary and cursor planes Qinyun Tan
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Qinyun Tan @ 2026-09-01 6:50 UTC (permalink / raw)
To: dri-devel
Cc: tzimmermann, airlied, jfalempe, kraxel, dmitry.osipenko, hansg,
maarten.lankhorst, mripard, simona, leandro.ribeiro, daniels,
pekka.paalanen, virtualization, spice-devel, linux-kernel,
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
The hardware cursor has always blended with pre-multiplied alpha and
userspace assumes that blend mode when the property is not attached.
Expose a "pixel blend mode" property advertising only
DRM_MODE_BLEND_PREMULTI to make the existing semantics explicit and
silence the warning. No functional change.
Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
---
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..08d93ac7f7cb8 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_PREMULTI));
return 0;
}
--
2.43.7
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/4] drm/ast: create blend mode property on cursor plane
2026-09-01 6:50 ` [PATCH 1/4] drm/ast: create blend mode property on cursor plane Qinyun Tan
@ 2026-09-01 7:03 ` Thomas Zimmermann
2026-09-01 7:59 ` 钦云谭
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Zimmermann @ 2026-09-01 7:03 UTC (permalink / raw)
To: Qinyun Tan, dri-devel
Cc: airlied, jfalempe, kraxel, dmitry.osipenko, hansg,
maarten.lankhorst, mripard, simona, leandro.ribeiro, daniels,
pekka.paalanen, virtualization, spice-devel, linux-kernel
Hi
Am 01.09.26 um 08:50 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
>
> The hardware cursor has always blended with pre-multiplied alpha and
> userspace assumes that blend mode when the property is not attached.
> Expose a "pixel blend mode" property advertising only
> DRM_MODE_BLEND_PREMULTI to make the existing semantics explicit and
> silence the warning. No functional change.
>
> Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
> Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
> ---
> 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..08d93ac7f7cb8 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_PREMULTI));
AFAIU the available documentation, AST hardware corresponds to
DRM_MODE_BLEND_COVERAGE.
Best regards
Thomas
>
> return 0;
> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/4] drm/ast: create blend mode property on cursor plane
2026-09-01 7:03 ` Thomas Zimmermann
@ 2026-09-01 7:59 ` 钦云谭
0 siblings, 0 replies; 7+ messages in thread
From: 钦云谭 @ 2026-09-01 7:59 UTC (permalink / raw)
To: Thomas Zimmermann, dri-devel
Cc: airlied, jfalempe, kraxel, dmitry.osipenko, hansg,
maarten.lankhorst, mripard, simona, leandro.ribeiro, daniels,
pekka.paalanen, virtualization, spice-devel, linux-kernel
Hi Thomas,
在 2026/9/1 15:03, Thomas Zimmermann 写道:
> Hi
>
> Am 01.09.26 um 08:50 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
>>
>> The hardware cursor has always blended with pre-multiplied alpha and
>> userspace assumes that blend mode when the property is not attached.
>> Expose a "pixel blend mode" property advertising only
>> DRM_MODE_BLEND_PREMULTI to make the existing semantics explicit and
>> silence the warning. No functional change.
>>
>> Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
>> Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
>> ---
>> 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..08d93ac7f7cb8 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_PREMULTI));
>
> AFAIU the available documentation, AST hardware corresponds to DRM_MODE_BLEND_COVERAGE.
>
Thanks for the correction.
I'll send a v2 that declares DRM_MODE_BLEND_COVERAGE for the ast
cursor plane instead.
> Best regards
> Thomas
>
>> return 0;
>> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/4] drm/qxl: create blend mode property on primary and cursor planes
2026-09-01 6:50 [PATCH 0/4] drm: create blend mode property on alpha-capable planes of simple drivers Qinyun Tan
2026-09-01 6:50 ` [PATCH 1/4] drm/ast: create blend mode property on cursor plane Qinyun Tan
@ 2026-09-01 6:50 ` Qinyun Tan
2026-09-01 6:50 ` [PATCH 3/4] drm/virtio: create blend mode property on cursor plane Qinyun Tan
2026-09-01 6:50 ` [PATCH 4/4] drm/vboxvideo: create blend mode property on planes Qinyun Tan
3 siblings, 0 replies; 7+ messages in thread
From: Qinyun Tan @ 2026-09-01 6:50 UTC (permalink / raw)
To: dri-devel
Cc: tzimmermann, airlied, jfalempe, kraxel, dmitry.osipenko, hansg,
maarten.lankhorst, mripard, simona, leandro.ribeiro, daniels,
pekka.paalanen, virtualization, spice-devel, linux-kernel,
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. Both the qxl primary and cursor planes expose ARGB8888 and
trip this on driver load.
The planes have always blended with pre-multiplied alpha and userspace
assumes that blend mode when the property is not attached. Expose a
"pixel blend mode" property advertising only DRM_MODE_BLEND_PREMULTI
to make the existing semantics explicit and silence the warning. No
functional change.
Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
---
drivers/gpu/drm/qxl/qxl_display.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 7f4178800afd7..0cd1456cca347 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -30,6 +30,7 @@
#include <drm/drm_drv.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
+#include <drm/drm_blend.h>
#include <drm/drm_edid.h>
#include <drm/drm_encoder.h>
#include <drm/drm_framebuffer.h>
@@ -993,6 +994,9 @@ static struct drm_plane *qxl_create_plane(struct qxl_device *qdev,
drm_plane_helper_add(plane, helper_funcs);
+ drm_plane_create_blend_mode_property(plane,
+ BIT(DRM_MODE_BLEND_PREMULTI));
+
return plane;
free_plane:
--
2.43.7
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/4] drm/virtio: create blend mode property on cursor plane
2026-09-01 6:50 [PATCH 0/4] drm: create blend mode property on alpha-capable planes of simple drivers Qinyun Tan
2026-09-01 6:50 ` [PATCH 1/4] drm/ast: create blend mode property on cursor plane Qinyun Tan
2026-09-01 6:50 ` [PATCH 2/4] drm/qxl: create blend mode property on primary and cursor planes Qinyun Tan
@ 2026-09-01 6:50 ` Qinyun Tan
2026-09-01 6:50 ` [PATCH 4/4] drm/vboxvideo: create blend mode property on planes Qinyun Tan
3 siblings, 0 replies; 7+ messages in thread
From: Qinyun Tan @ 2026-09-01 6:50 UTC (permalink / raw)
To: dri-devel
Cc: tzimmermann, airlied, jfalempe, kraxel, dmitry.osipenko, hansg,
maarten.lankhorst, mripard, simona, leandro.ribeiro, daniels,
pekka.paalanen, virtualization, spice-devel, linux-kernel,
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 virtio-gpu cursor plane (HOST_ARGB8888) trips this.
The cursor has always blended with pre-multiplied alpha and userspace
assumes that blend mode when the property is not attached. Expose a
"pixel blend mode" property advertising only DRM_MODE_BLEND_PREMULTI
to make the existing semantics explicit and silence the warning. The
primary plane only exposes HOST_XRGB8888, so the call is gated to the
cursor. No functional change.
Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 1d1b27ece62a7..640815af40980 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -24,6 +24,7 @@
*/
#include <drm/drm_atomic_helper.h>
+#include <drm/drm_blend.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_atomic_helper.h>
@@ -609,6 +610,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
if (type == DRM_PLANE_TYPE_PRIMARY)
drm_plane_enable_fb_damage_clips(plane);
+ else if (type == DRM_PLANE_TYPE_CURSOR)
+ drm_plane_create_blend_mode_property(plane,
+ BIT(DRM_MODE_BLEND_PREMULTI));
return plane;
}
--
2.43.7
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 4/4] drm/vboxvideo: create blend mode property on planes
2026-09-01 6:50 [PATCH 0/4] drm: create blend mode property on alpha-capable planes of simple drivers Qinyun Tan
` (2 preceding siblings ...)
2026-09-01 6:50 ` [PATCH 3/4] drm/virtio: create blend mode property on cursor plane Qinyun Tan
@ 2026-09-01 6:50 ` Qinyun Tan
3 siblings, 0 replies; 7+ messages in thread
From: Qinyun Tan @ 2026-09-01 6:50 UTC (permalink / raw)
To: dri-devel
Cc: tzimmermann, airlied, jfalempe, kraxel, dmitry.osipenko, hansg,
maarten.lankhorst, mripard, simona, leandro.ribeiro, daniels,
pekka.paalanen, virtualization, spice-devel, linux-kernel,
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. Both the vboxvideo primary and cursor planes expose ARGB8888
and trip this on driver load.
The planes have always blended with pre-multiplied alpha and userspace
assumes that blend mode when the property is not attached. Expose a
"pixel blend mode" property advertising only DRM_MODE_BLEND_PREMULTI
to make the existing semantics explicit and silence the warning. No
functional change.
Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
---
drivers/gpu/drm/vboxvideo/vbox_mode.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c b/drivers/gpu/drm/vboxvideo/vbox_mode.c
index 8e4e5fc9d3c5a..658803646eee2 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_mode.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c
@@ -15,6 +15,7 @@
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
+#include <drm/drm_blend.h>
#include <drm/drm_edid.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
@@ -540,6 +541,9 @@ static struct drm_plane *vbox_create_plane(struct vbox_private *vbox,
drm_plane_helper_add(plane, helper_funcs);
+ drm_plane_create_blend_mode_property(plane,
+ BIT(DRM_MODE_BLEND_PREMULTI));
+
return plane;
free_plane:
--
2.43.7
^ permalink raw reply related [flat|nested] 7+ messages in thread