* [PATCH] drm/atomic: Set plane-state pixel_blend_mode to default
@ 2026-09-01 12:25 Thomas Zimmermann
2026-09-03 6:56 ` Thomas Zimmermann
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Zimmermann @ 2026-09-01 12:25 UTC (permalink / raw)
To: maarten.lankhorst, mripard, airlied, simona, daniels,
leandro.ribeiro, pekka.paalanen, lowry.li
Cc: dri-devel, sashiko-reviews, Thomas Zimmermann
Initialize the plane state's pixel_blend_mode value to the plane
property's default value. Resolves an inconsistency on planes that
do not support PREMULTI.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
Cc: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
---
It's not clear what Fixes should point to, so I picked the commit that
introduced the stricter validation of the blend-mode property.
---
drivers/gpu/drm/drm_atomic_state_helper.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index d90d1d7c9cf9..0325caee528a 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -278,7 +278,13 @@ void __drm_atomic_helper_plane_state_init(struct drm_plane_state *plane_state,
plane_state->rotation = DRM_MODE_ROTATE_0;
plane_state->alpha = DRM_BLEND_ALPHA_OPAQUE;
- plane_state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
+
+ if (plane->blend_mode_property) {
+ if (!drm_object_property_get_default_value(&plane->base,
+ plane->blend_mode_property,
+ &val))
+ plane_state->pixel_blend_mode = val;
+ }
if (plane->color_encoding_property) {
if (!drm_object_property_get_default_value(&plane->base,
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm/atomic: Set plane-state pixel_blend_mode to default
2026-09-01 12:25 [PATCH] drm/atomic: Set plane-state pixel_blend_mode to default Thomas Zimmermann
@ 2026-09-03 6:56 ` Thomas Zimmermann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2026-09-03 6:56 UTC (permalink / raw)
To: maarten.lankhorst, mripard, airlied, simona, daniels,
leandro.ribeiro, pekka.paalanen, lowry.li
Cc: dri-devel, sashiko-reviews
Am 01.09.26 um 14:25 schrieb Thomas Zimmermann:
> Initialize the plane state's pixel_blend_mode value to the plane
> property's default value. Resolves an inconsistency on planes that
> do not support PREMULTI.
Never mind. It's a duplicate of
https://lore.kernel.org/dri-devel/2026090341-appraisal-jot-6aec@gregkh/T/#m10bbb3677bbc65b9f358751f174a5fd3d2d319e7
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
> Cc: Leandro Ribeiro <leandro.ribeiro@collabora.com>
> Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> It's not clear what Fixes should point to, so I picked the commit that
> introduced the stricter validation of the blend-mode property.
> ---
> drivers/gpu/drm/drm_atomic_state_helper.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
> index d90d1d7c9cf9..0325caee528a 100644
> --- a/drivers/gpu/drm/drm_atomic_state_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_state_helper.c
> @@ -278,7 +278,13 @@ void __drm_atomic_helper_plane_state_init(struct drm_plane_state *plane_state,
> plane_state->rotation = DRM_MODE_ROTATE_0;
>
> plane_state->alpha = DRM_BLEND_ALPHA_OPAQUE;
> - plane_state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
> +
> + if (plane->blend_mode_property) {
> + if (!drm_object_property_get_default_value(&plane->base,
> + plane->blend_mode_property,
> + &val))
> + plane_state->pixel_blend_mode = val;
> + }
>
> if (plane->color_encoding_property) {
> if (!drm_object_property_get_default_value(&plane->base,
--
--
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] 2+ messages in thread
end of thread, other threads:[~2026-09-03 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 12:25 [PATCH] drm/atomic: Set plane-state pixel_blend_mode to default Thomas Zimmermann
2026-09-03 6:56 ` Thomas Zimmermann
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.