On 24/08/2026 23:02, Viktor Jägersküpper wrote:
On 8/24/26 22:38, Viktor Jägersküpper wrote:
[ Adding Timur ]

On 8/13/26 16:30, Melissa Wen wrote:
DCE can support PREMULTI and COVERAGE blend mode depending on its
generation, however current driver implementation either doesn't expose
more than primary and cursor plane, or doesn't program registers for any
blend mode other than PIXEL_NONE. To fix the missing-blend-mode-prop
warning according to current DCE plane caps, create blend mode property
with PIXEL_NONE only for primary planes, instead of the DRM default
PREMULTI.

Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha 
exposed")
Reviewed-by: Leandro Ribeiro <[email protected]>
Signed-off-by: Melissa Wen <[email protected]>

---
v3:
- fix indentation (Alex H)
---
  .../amd/display/amdgpu_dm/amdgpu_dm_plane.c    | 18 +++++++++++-------
  1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
index ab9bbe8ca333..3b5b6943b67d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
@@ -1923,14 +1923,18 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager 
*dm,
        if (res)
                return res;
- /* TODO: Check which blend modes are supported in DCE-generation
-        * planes, i.e. DC_PLANE_TYPE_DCE_RGB/UNDERLAY and expose blend mode
-        * property accordingly.
+       /* Blend mode support varies on DCE generations according to HW caps
+        * and number of planes per CRTC. However, as current driver
+        * implementation only creates one primary and one cursor plane per
+        * CRTC for DCE (overlay is only created if
+        * DC_PLANE_TYPE_DCN_UNIVERSAL), the primary plane blend mode ends up
+        * being always PIXEL_NONE across DCE versions.
         */
-       if ((plane->type == DRM_PLANE_TYPE_OVERLAY ||
-            plane->type == DRM_PLANE_TYPE_PRIMARY) &&
-           plane_cap && plane_cap->per_pixel_alpha &&
-           plane_cap->type == DC_PLANE_TYPE_DCN_UNIVERSAL) {
+       if (plane_cap && plane_cap->type != DC_PLANE_TYPE_DCN_UNIVERSAL) {
+               drm_plane_create_blend_mode_property(plane, 
BIT(DRM_MODE_BLEND_PIXEL_NONE));
+       } else if ((plane->type == DRM_PLANE_TYPE_OVERLAY ||
+                   plane->type == DRM_PLANE_TYPE_PRIMARY) &&
+                  plane_cap && plane_cap->per_pixel_alpha) {
                unsigned int blend_caps = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
                                          BIT(DRM_MODE_BLEND_PREMULTI) |
                                          BIT(DRM_MODE_BLEND_COVERAGE);
With this patch applied to the mainline kernel, my display freezes when
Kwin is started (either by SDDM or by launching a KDE Plasma session).
GDM and Gnome work fine. The journal doesn't have much information, it's
mainly this:

I suspect KDE is not interpreting correctly the blend mode, but I think we can
keep it working as before by adding PREMULTI. In the end there is no overlay
plane for DCE, and PIXEL_NONE and PREMULTI are equivalent when one
primary is composed on top of a black background.

Can you replace this commit by the patch attached?
It might solve the issue as long as background continues being black.
I didn't apply it to drm-misc, so let me know how does this new patch works
on your side.

/cc Xaver to take a look at the KDE part.

Melissa


kwin_wayland[8402]: Applying output configuration failed!

and after that several KDE processes with:

<kde_process>[xxxx]: There are no outputs - creating placeholder screen

Any idea how I can debug this further? Maybe ask the KDE developers?

With only the first two patches of this series applied, Kwin works as
before, but I get the warnings of course.
I completely forgot that I'm observing this with AMD Pitcairn running
KDE 6.7.4 on Arch Linux. The kernel is built from source (mainline as of
today) with this patch series applied on top.

Viktor
From 9d097db70ee2bcfa35d307673c91c39f9dcad5f2 Mon Sep 17 00:00:00 2001
From: Melissa Wen <[email protected]>
Date: Tue, 4 Aug 2026 12:44:28 +0200
Subject: [PATCH] drm/amd/display: advertise PIXEL_NONE and PREMULTI blend mode
 for DCE

DCE can support PREMULTI and COVERAGE blend mode depending on its
generation, however current driver implementation either doesn't expose
more than primary and cursor plane, or doesn't program registers for any
blend mode other than PIXEL_NONE. To fix the missing-blend-mode-prop
warning according to current DCE plane caps, create blend mode property
with PIXEL_NONE and PREMULTI for primary planes. As long as the
background is black and there is no overlay plane, PIXEL_NONE and
PREMULTI are equivalent, and PREMULTI has been the mandatory/default
mode for years, so keep it to avoid regressions.

Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
Reviewed-by: Leandro Ribeiro <[email protected]> #v2
Signed-off-by: Melissa Wen <[email protected]>

---
v3:
- fix indentation (Alex H)
v4:
- add PREMULTI to avoid regression (reported by Viktor)
---
 .../amd/display/amdgpu_dm/amdgpu_dm_plane.c   | 24 +++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
index ab9bbe8ca333..402f0d333150 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
@@ -1923,14 +1923,24 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
 	if (res)
 		return res;
 
-	/* TODO: Check which blend modes are supported in DCE-generation
-	 * planes, i.e. DC_PLANE_TYPE_DCE_RGB/UNDERLAY and expose blend mode
-	 * property accordingly.
+	/* Blend mode support varies on DCE generations according to HW caps
+	 * and number of planes per CRTC. However, as current driver
+	 * implementation only creates one primary and one cursor plane per
+	 * CRTC for DCE (overlay is only created if
+	 * DC_PLANE_TYPE_DCN_UNIVERSAL), the primary plane blend mode is
+	 * ignored across DCE versions. Keep PREMULTI to avoid uAPI
+	 * regressions: it was the default/mandatory mode for many years and,
+	 * with no overlay plane, primary composes on top of a black
+	 * background, where PREMULTI and PIXEL_NONE are equivalent.
 	 */
-	if ((plane->type == DRM_PLANE_TYPE_OVERLAY ||
-	     plane->type == DRM_PLANE_TYPE_PRIMARY) &&
-	    plane_cap && plane_cap->per_pixel_alpha &&
-	    plane_cap->type == DC_PLANE_TYPE_DCN_UNIVERSAL) {
+	if (plane_cap && plane_cap->type != DC_PLANE_TYPE_DCN_UNIVERSAL) {
+		unsigned int blend_caps = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
+					  BIT(DRM_MODE_BLEND_PREMULTI);
+
+		drm_plane_create_blend_mode_property(plane, blend_caps);
+	} else if ((plane->type == DRM_PLANE_TYPE_OVERLAY ||
+		    plane->type == DRM_PLANE_TYPE_PRIMARY) &&
+		   plane_cap && plane_cap->per_pixel_alpha) {
 		unsigned int blend_caps = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
 					  BIT(DRM_MODE_BLEND_PREMULTI) |
 					  BIT(DRM_MODE_BLEND_COVERAGE);
-- 
2.53.0

Reply via email to