From: Thomas Zimmermann <tzimmermann@suse.de>
To: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@gmail.com, simona@ffwll.ch, daniels@collabora.com,
leandro.ribeiro@collabora.com, pekka.paalanen@collabora.com,
lowry.li@arm.com
Cc: dri-devel@lists.freedesktop.org, sashiko-reviews@lists.linux.dev,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH] drm/atomic: Set plane-state pixel_blend_mode to default
Date: Tue, 1 Sep 2026 14:25:26 +0200 [thread overview]
Message-ID: <20260901122731.83854-1-tzimmermann@suse.de> (raw)
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
next reply other threads:[~2026-09-01 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 12:25 Thomas Zimmermann [this message]
2026-09-03 6:56 ` [PATCH] drm/atomic: Set plane-state pixel_blend_mode to default 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=20260901122731.83854-1-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=leandro.ribeiro@collabora.com \
--cc=lowry.li@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=pekka.paalanen@collabora.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=simona@ffwll.ch \
/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.