Skip to contentSkip to conversation

warnings from validate_blend_mode_for_alpha_formats() in next-20260715

PATCH In review Bert Karwatzki 7 participants 12 messages Jul 16 – Aug 26

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") introduces validate_blend_mode_for_alpha_formats() which prints warnings for amdpgu as amdgpu only set blend_mode_property for planes of type DRM_PLANE_TYPE_OVERLAY. I tried to fix this by removing he (plane->type == DRM_PLANE_TYPE_OVERLAY) check in amdgpu_dm_plane_init():

	printk(KERN_INFO "%s: plane=%px plane->type=0x%x plane_cap=%px\n", __func__, plane, plane->type, plane_cap);
	if (plane_cap)
		printk(KERN_INFO "%s: per_pixel_alpha =%u\n", __func__, plane_cap->per_pixel_alpha);
	if (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);

		printk(KERN_INFO "%s: creating alpha and blend mode properties for plane %px\n", __func__, plane);
		drm_plane_create_alpha_property(plane);
		drm_plane_create_blend_mode_property(plane, blend_caps);
	}

But this does not completely silence the warnings becuase for planes of type DRM_PLANE_TYPE_CURSOR plane_cap is NULL. Is this a problem that should be fixed in amdgpu or is should validate_blend_mode_for_alpha_formats() only be called for planes of certain types?

Bert Karwatzki

#1 lore raw

+ Some display folks

Quoted 25 lines · Bert Karwatzki

commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") introduces validate_blend_mode_for_alpha_formats() which prints warnings for amdpgu as amdgpu only set blend_mode_property for planes of type DRM_PLANE_TYPE_OVERLAY. I tried to fix this by removing he (plane->type == DRM_PLANE_TYPE_OVERLAY) check in amdgpu_dm_plane_init():

        printk(KERN_INFO "%s: plane=%px plane->type=0x%x plane_cap=%px\n", __func__, plane, plane->type, plane_cap);
        if (plane_cap)
                printk(KERN_INFO "%s: per_pixel_alpha =%u\n", __func__, plane_cap->per_pixel_alpha);
        if (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);

                printk(KERN_INFO "%s: creating alpha and blend mode properties for plane %px\n", __func__, plane);
                drm_plane_create_alpha_property(plane);
                drm_plane_create_blend_mode_property(plane, blend_caps);
        }

But this does not completely silence the warnings becuase for planes of type DRM_PLANE_TYPE_CURSOR plane_cap is NULL. Is this a problem that should be fixed in amdgpu or is should validate_blend_mode_for_alpha_formats() only be called for planes of certain types?

Bert Karwatzki

#2 lore raw
Quoted 25 lines · Alex Deucher

+ Some display folks

Quoted 22 lines · Bert Karwatzki

commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") introduces validate_blend_mode_for_alpha_formats() which prints warnings for amdpgu as amdgpu only set blend_mode_property for planes of type DRM_PLANE_TYPE_OVERLAY. I tried to fix this by removing he (plane->type == DRM_PLANE_TYPE_OVERLAY) check in amdgpu_dm_plane_init():

        printk(KERN_INFO "%s: plane=%px plane->type=0x%x plane_cap=%px\n", __func__, plane, plane->type, plane_cap);
        if (plane_cap)
                printk(KERN_INFO "%s: per_pixel_alpha =%u\n", __func__, plane_cap->per_pixel_alpha);
        if (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);

                printk(KERN_INFO "%s: creating alpha and blend mode properties for plane %px\n", __func__, plane);
                drm_plane_create_alpha_property(plane);
                drm_plane_create_blend_mode_property(plane, blend_caps);
        }

But this does not completely silence the warnings becuase for planes of type DRM_PLANE_TYPE_CURSOR plane_cap is NULL. Is this a problem that should be fixed in amdgpu or is should validate_blend_mode_for_alpha_formats() only be called for planes of certain types?

IMO validate_blend_mode_for_alpha_formats() should be called for all types of planes. I can't think of anything special about a cursor plane that would justify it being allowed to expose formats with alpha but not the blend mode property.

I'm not familiar with the AMD codebase to suggest the best fix, but the driver would need some way to know whether cursor planes are exposing formats with alpha.

Quoted 3 lines
Quoted 3 lines

Bert Karwatzki

Signature · 1 line
Leandro Ribeiro
#3 lore raw

Am Freitag, dem 17.07.2026 um 19:54 -0300 schrieb Leandro Ribeiro:

Quoted 28 lines · Alex Deucher
Quoted 25 lines

+ Some display folks

Quoted 22 lines · Bert Karwatzki

commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") introduces validate_blend_mode_for_alpha_formats() which prints warnings for amdpgu as amdgpu only set blend_mode_property for planes of type DRM_PLANE_TYPE_OVERLAY. I tried to fix this by removing he (plane->type == DRM_PLANE_TYPE_OVERLAY) check in amdgpu_dm_plane_init():

        printk(KERN_INFO "%s: plane=%px plane->type=0x%x plane_cap=%px\n", __func__, plane, plane->type, plane_cap);
        if (plane_cap)
                printk(KERN_INFO "%s: per_pixel_alpha =%u\n", __func__, plane_cap->per_pixel_alpha);
        if (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);

                printk(KERN_INFO "%s: creating alpha and blend mode properties for plane %px\n", __func__, plane);
                drm_plane_create_alpha_property(plane);
                drm_plane_create_blend_mode_property(plane, blend_caps);
        }

But this does not completely silence the warnings becuase for planes of type DRM_PLANE_TYPE_CURSOR plane_cap is NULL. Is this a problem that should be fixed in amdgpu or is should validate_blend_mode_for_alpha_formats() only be called for planes of certain types?

Quoted 12 lines

IMO validate_blend_mode_for_alpha_formats() should be called for all types of planes. I can't think of anything special about a cursor plane that would justify it being allowed to expose formats with alpha but not the blend mode property.

I'm not familiar with the AMD codebase to suggest the best fix, but the driver would need some way to know whether cursor planes are exposing formats with alpha.

Quoted 3 lines
Quoted 3 lines

Bert Karwatzki

So I looked through the code and found that the cursor planes are initiallized by amdgpu_dm_crtc_init() which calls amdgpu_dm_plane_init() with plane_cap = NULL. So I was able to silence the warning by introducing a dummy_plane_cap in amdgpu_dm_crtc_init() and dropping the plane->type check in amdgpu_dm_plane_init().

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +5 -1
index d63688b9d93d..7fb118444d14 100644
@@ -731,13 +731,17 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
        struct drm_plane *cursor_plane;
        bool has_degamma;
        int res = -ENOMEM;
+       struct dc_plane_cap dummy_cap = {
+               .type = DC_PLANE_TYPE_DCE_RGB,
+               .per_pixel_alpha = 1,
+       };
 
        cursor_plane = kzalloc_obj(*cursor_plane);
        if (!cursor_plane)
                goto fail;
 
        cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
-       res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+       res = amdgpu_dm_plane_init(dm, cursor_plane, 0, &dummy_cap);
 
        acrtc = kzalloc_obj(struct amdgpu_crtc);
        if (!acrtc)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 -2
index 26f35434a92f..20785fb451dd 100644
@@ -1932,8 +1932,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
        if (res)
                return res;
 
-       if (plane->type == DRM_PLANE_TYPE_OVERLAY &&
-           plane_cap && plane_cap->per_pixel_alpha) {
+       if (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);

One can probably also omit the .type field in the dummy_cap struct and also does not have to check if plance_cap is NULL anymore.

Bert Karwatzki

#4 lore raw

Am Samstag, dem 18.07.2026 um 11:21 +0200 schrieb Bert Karwatzki:

Quoted 85 lines

Am Freitag, dem 17.07.2026 um 19:54 -0300 schrieb Leandro Ribeiro:

Quoted 28 lines · Alex Deucher
Quoted 25 lines

+ Some display folks

Quoted 22 lines · Bert Karwatzki

commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") introduces validate_blend_mode_for_alpha_formats() which prints warnings for amdpgu as amdgpu only set blend_mode_property for planes of type DRM_PLANE_TYPE_OVERLAY. I tried to fix this by removing he (plane->type == DRM_PLANE_TYPE_OVERLAY) check in amdgpu_dm_plane_init():

        printk(KERN_INFO "%s: plane=%px plane->type=0x%x plane_cap=%px\n", __func__, plane, plane->type, plane_cap);
        if (plane_cap)
                printk(KERN_INFO "%s: per_pixel_alpha =%u\n", __func__, plane_cap->per_pixel_alpha);
        if (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);

                printk(KERN_INFO "%s: creating alpha and blend mode properties for plane %px\n", __func__, plane);
                drm_plane_create_alpha_property(plane);
                drm_plane_create_blend_mode_property(plane, blend_caps);
        }

But this does not completely silence the warnings becuase for planes of type DRM_PLANE_TYPE_CURSOR plane_cap is NULL. Is this a problem that should be fixed in amdgpu or is should validate_blend_mode_for_alpha_formats() only be called for planes of certain types?

Quoted 12 lines

IMO validate_blend_mode_for_alpha_formats() should be called for all types of planes. I can't think of anything special about a cursor plane that would justify it being allowed to expose formats with alpha but not the blend mode property.

I'm not familiar with the AMD codebase to suggest the best fix, but the driver would need some way to know whether cursor planes are exposing formats with alpha.

Quoted 3 lines
Quoted 3 lines

Bert Karwatzki

So I looked through the code and found that the cursor planes are initiallized by amdgpu_dm_crtc_init() which calls amdgpu_dm_plane_init() with plane_cap = NULL. So I was able to silence the warning by introducing a dummy_plane_cap in amdgpu_dm_crtc_init() and dropping the plane->type check in amdgpu_dm_plane_init().

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +5 -1
index d63688b9d93d..7fb118444d14 100644
@@ -731,13 +731,17 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
        struct drm_plane *cursor_plane;
        bool has_degamma;
        int res = -ENOMEM;
+       struct dc_plane_cap dummy_cap = {
+               .type = DC_PLANE_TYPE_DCE_RGB,
+               .per_pixel_alpha = 1,
+       };
 
        cursor_plane = kzalloc_obj(*cursor_plane);
        if (!cursor_plane)
                goto fail;
 
        cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
-       res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+       res = amdgpu_dm_plane_init(dm, cursor_plane, 0, &dummy_cap);
 
        acrtc = kzalloc_obj(struct amdgpu_crtc);
        if (!acrtc)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 -2
index 26f35434a92f..20785fb451dd 100644
@@ -1932,8 +1932,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
        if (res)
                return res;
 
-       if (plane->type == DRM_PLANE_TYPE_OVERLAY &&
-           plane_cap && plane_cap->per_pixel_alpha) {
+       if (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);
Quoted 4 lines

One can probably also omit the .type field in the dummy_cap struct and also does not have to check if plance_cap is NULL anymore.

Bert Karwatzki

This might seem problematic as this unconditionally sets per_pixel_alpha = true for cursor planes, but currently the only pixel format used for cursor planes in amdgpu is DRM_FORMAT_ARGB8888:

$ grep -B 1 -A 3 'cursor_formats\[\]' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
static const u32 cursor_formats[] = {
	DRM_FORMAT_ARGB8888
};

Bert Karwatzki

#5 lore raw

PATCH 1/8 display: fix blend_mode for non-overlay planes

Previously drm_plane_create_blend_mode_property() was only called for planes of type DRM_PLANE_TYPE_OVERLAY. Since commit commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") this results in warnings from validate_blend_mode_for_alpha_formats(). We fix this here by calling drm_plane_create_blend_mode_property() for all plane types if the plane is supporting a format with per_pixel_alpha.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c  | 5 ++++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +4 -1
index 62eac6e65334..a6a54351ea56 100644
@@ -755,13 +755,16 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
 	struct drm_plane *cursor_plane;
 	bool has_degamma;
 	int res = -ENOMEM;
+	struct dc_plane_cap dummy_cap = {
+		.per_pixel_alpha = 1,
+	};
 
 	cursor_plane = kzalloc_obj(*cursor_plane);
 	if (!cursor_plane)
 		goto fail;
 
 	cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
-	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, &dummy_cap);
 
 	acrtc = kzalloc_obj(struct amdgpu_crtc);
 	if (!acrtc)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 -2
index 824ef3ce5de0..4c0c6a8a0dac 100644
@@ -2208,8 +2208,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
 	if (res)
 		return res;
 
-	if (plane->type == DRM_PLANE_TYPE_OVERLAY &&
-	    plane_cap && plane_cap->per_pixel_alpha) {
+	if (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);
Signature · 1 line
2.55.0
Tested-by on v1 1/8
#6 lore raw

Re: [PATCH 1/8] display: fix blend_mode for non-overlay planes

Quoted 41 lines · Bert Karwatzki

Previously drm_plane_create_blend_mode_property() was only called for planes of type DRM_PLANE_TYPE_OVERLAY. Since commit commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") this results in warnings from validate_blend_mode_for_alpha_formats(). We fix this here by calling drm_plane_create_blend_mode_property() for all plane types if the plane is supporting a format with per_pixel_alpha.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c  | 5 ++++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +4 -1
index 62eac6e65334..a6a54351ea56 100644
@@ -755,13 +755,16 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
 	struct drm_plane *cursor_plane;
 	bool has_degamma;
 	int res = -ENOMEM;
+	struct dc_plane_cap dummy_cap = {
+		.per_pixel_alpha = 1,
+	};
 
 	cursor_plane = kzalloc_obj(*cursor_plane);
 	if (!cursor_plane)
 		goto fail;
 
 	cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
-	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, &dummy_cap);
 
 	acrtc = kzalloc_obj(struct amdgpu_crtc);
 	if (!acrtc)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +0 -0
index 824ef3ce5de0..4c0c6a8a0dac 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · line 2214

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 -2
@@ -2208,8 +2208,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
 	if (res)
 		return res;
 
-	if (plane->type == DRM_PLANE_TYPE_OVERLAY &&
-	    plane_cap && plane_cap->per_pixel_alpha) {
+	if (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);

Not sure where the full patch set is, but this does make the warning go away.

#7 lore raw

Re: [PATCH 1/8] display: fix blend_mode for non-overlay planes

Am Freitag, dem 21.08.2026 um 14:47 -0400 schrieb Joshua Peisach:

Quoted 55 lines · Bert Karwatzki
Quoted 41 lines

Previously drm_plane_create_blend_mode_property() was only called for planes of type DRM_PLANE_TYPE_OVERLAY. Since commit commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") this results in warnings from validate_blend_mode_for_alpha_formats(). We fix this here by calling drm_plane_create_blend_mode_property() for all plane types if the plane is supporting a format with per_pixel_alpha.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c  | 5 ++++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +4 -1
index 62eac6e65334..a6a54351ea56 100644
@@ -755,13 +755,16 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
 	struct drm_plane *cursor_plane;
 	bool has_degamma;
 	int res = -ENOMEM;
+	struct dc_plane_cap dummy_cap = {
+		.per_pixel_alpha = 1,
+	};
 
 	cursor_plane = kzalloc_obj(*cursor_plane);
 	if (!cursor_plane)
 		goto fail;
 
 	cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
-	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, &dummy_cap);
 
 	acrtc = kzalloc_obj(struct amdgpu_crtc);
 	if (!acrtc)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +0 -0
index 824ef3ce5de0..4c0c6a8a0dac 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · line 2214

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 -2
@@ -2208,8 +2208,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
 	if (res)
 		return res;
 
-	if (plane->type == DRM_PLANE_TYPE_OVERLAY &&
-	    plane_cap && plane_cap->per_pixel_alpha) {
+	if (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);

Not sure where the full patch set is, but this does make the warning go away.

Quoted 1 line

This is actually the only patch, the 1/8 is an artifact from using git format-patch which I forgot to remove.

Bert Karwatzki

#8 lore raw

Re: [PATCH 1/8] display: fix blend_mode for non-overlay planes

This looks like a fix for the same problem Melissa tried to address in

https://lore.kernel.org/amd-gfx/DS0PR12MB65342AEDED0D035DFA92E4189CA32@DS0PR12MB6534.namprd12.prod.outlook.com/T/#mf6847a9e8d013adae40afa3c2ca0c64ebd3fcb50

Please advise if it is for a different issue.

Thanks.

Quoted 62 lines · Bert Karwatzki

Am Freitag, dem 21.08.2026 um 14:47 -0400 schrieb Joshua Peisach:

Quoted 55 lines · Bert Karwatzki
Quoted 41 lines

Previously drm_plane_create_blend_mode_property() was only called for planes of type DRM_PLANE_TYPE_OVERLAY. Since commit commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") this results in warnings from validate_blend_mode_for_alpha_formats(). We fix this here by calling drm_plane_create_blend_mode_property() for all plane types if the plane is supporting a format with per_pixel_alpha.

---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c  | 5 ++++-
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +--
  2 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +4 -1
index 62eac6e65334..a6a54351ea56 100644
@@ -755,13 +755,16 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
  	struct drm_plane *cursor_plane;
  	bool has_degamma;
  	int res = -ENOMEM;
+	struct dc_plane_cap dummy_cap = {
+		.per_pixel_alpha = 1,
+	};
 
  	cursor_plane = kzalloc_obj(*cursor_plane);
  	if (!cursor_plane)
  		goto fail;
 
  	cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
-	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, &dummy_cap);
 
  	acrtc = kzalloc_obj(struct amdgpu_crtc);
  	if (!acrtc)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +0 -0
index 824ef3ce5de0..4c0c6a8a0dac 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · line 2214

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 -2
@@ -2208,8 +2208,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
  	if (res)
  		return res;
 
-	if (plane->type == DRM_PLANE_TYPE_OVERLAY &&
-	    plane_cap && plane_cap->per_pixel_alpha) {
+	if (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);

Not sure where the full patch set is, but this does make the warning go away.

Quoted 1 line

This is actually the only patch, the 1/8 is an artifact from using git format-patch which I forgot to remove.

Bert Karwatzki

#9 lore raw

Re: [PATCH 1/8] display: fix blend_mode for non-overlay planes

Am Freitag, dem 21.08.2026 um 14:31 -0600 schrieb Alex Hung:

Quoted 71 lines

This looks like a fix for the same problem Melissa tried to address in

https://lore.kernel.org/amd-gfx/DS0PR12MB65342AEDED0D035DFA92E4189CA32@DS0PR12MB6534.namprd12.prod.outlook.com/T/#mf6847a9e8d013adae40afa3c2ca0c64ebd3fcb50

Please advise if it is for a different issue.

Thanks.

Quoted 62 lines · Bert Karwatzki

Am Freitag, dem 21.08.2026 um 14:47 -0400 schrieb Joshua Peisach:

Quoted 55 lines · Bert Karwatzki
Quoted 41 lines

Previously drm_plane_create_blend_mode_property() was only called for planes of type DRM_PLANE_TYPE_OVERLAY. Since commit commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") this results in warnings from validate_blend_mode_for_alpha_formats(). We fix this here by calling drm_plane_create_blend_mode_property() for all plane types if the plane is supporting a format with per_pixel_alpha.

---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c  | 5 ++++-
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +--
  2 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +4 -1
index 62eac6e65334..a6a54351ea56 100644
@@ -755,13 +755,16 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
  	struct drm_plane *cursor_plane;
  	bool has_degamma;
  	int res = -ENOMEM;
+	struct dc_plane_cap dummy_cap = {
+		.per_pixel_alpha = 1,
+	};
 
  	cursor_plane = kzalloc_obj(*cursor_plane);
  	if (!cursor_plane)
  		goto fail;
 
  	cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
-	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+	res = amdgpu_dm_plane_init(dm, cursor_plane, 0, &dummy_cap);
 
  	acrtc = kzalloc_obj(struct amdgpu_crtc);
  	if (!acrtc)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +0 -0
index 824ef3ce5de0..4c0c6a8a0dac 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · line 2214

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 -2
@@ -2208,8 +2208,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
  	if (res)
  		return res;
 
-	if (plane->type == DRM_PLANE_TYPE_OVERLAY &&
-	    plane_cap && plane_cap->per_pixel_alpha) {
+	if (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);

Not sure where the full patch set is, but this does make the warning go away.

Quoted 1 line

This is actually the only patch, the 1/8 is an artifact from using git format-patch which I forgot to remove.

Bert Karwatzki

Patch 2 of this series

https://lore.kernel.org/amd-gfx/DS0PR12MB65342AEDED0D035DFA92E4189CA32@DS0PR12MB6534.namprd12.prod.outlook.com/T/#mf6847a9e8d013adae40afa3c2ca0c64ebd3fcb50

is fixing the same issue, I think.

Bert Karwatzki

#10 lore raw
In reply to Bert Karwatzki

Hi,

this is not a linux-next-only issue any more: 860e748bddcc came in with the drm-next pull of the 7.3 merge window, so it now warns on plain mainline. Here it fires 16 times on every boot - 8 per GPU, on the 4 primary and 4 cursor planes of each of the two cards in this machine:

[PLANE:44:plane-0] pixel format with alpha exposed but blend mode not setup

  WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0xa16/0x13b0

I ran into it on 7.2.0-2709dd5ae32f, bisected it to 860e748bddcc and confirmed by reverting that commit, before I found this thread. Hardware:
0000:03:00.0 Navi 31 (DCN 3.2) and 0000:0f:00.0 Raphael iGPU (DCN 3.1.5).

Nobody has put this on regzbot yet, so:

#regzbot introduced: 860e748bddcc
#regzbot title: drm: WARNING at drm_mode_config_validate() for planes exposing alpha without a blend mode property #regzbot monitor: https://lore.kernel.org/all/[email protected]/

Status as far as I can see it: Melissa Wen's v3 series (monitored above) fixes amdgpu for both DCN and DCE, has Reviewed-by from Alex Hung and Tested-by from Daniel Wheeler, and I tested it here too - the warnings are gone on both GPUs. It is in neither linux-next nor amd-staging-drm-next so far. 271e90eb5f9f ("drm: use drm_warn() in validate_blend_mode_for_alpha_formats()") turns the splat into a plain warning and went to drm-next on 2026-08-20 as part of drm-misc-next-fixes-2026-08-20, but has not reached mainline either. Other drivers are being fixed in separate threads (imx dcss, rockchip, vkms).

Since this was introduced during the 7.3 merge window, the fixes should land in 7.3 rather than wait for the next one.

Signature · 2 lines
Thanks,
Mikhail
#11 lore raw
Quoted 29 lines · Mikhail Gavrilov

Hi,

this is not a linux-next-only issue any more: 860e748bddcc came in with the drm-next pull of the 7.3 merge window, so it now warns on plain mainline. Here it fires 16 times on every boot - 8 per GPU, on the 4 primary and 4 cursor planes of each of the two cards in this machine:

[PLANE:44:plane-0] pixel format with alpha exposed but blend mode not setup

  WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0xa16/0x13b0

I ran into it on 7.2.0-2709dd5ae32f, bisected it to 860e748bddcc and confirmed by reverting that commit, before I found this thread. Hardware:
0000:03:00.0 Navi 31 (DCN 3.2) and 0000:0f:00.0 Raphael iGPU (DCN 3.1.5).

Nobody has put this on regzbot yet, so:

#regzbot introduced: 860e748bddcc
#regzbot title: drm: WARNING at drm_mode_config_validate() for planes exposing alpha without a blend mode property #regzbot monitor: https://lore.kernel.org/all/[email protected]/

Status as far as I can see it: Melissa Wen's v3 series (monitored above) fixes amdgpu for both DCN and DCE, has Reviewed-by from Alex Hung and Tested-by from Daniel Wheeler, and I tested it here too - the warnings are gone on both GPUs. It is in neither linux-next nor amd-staging-drm-next so far. 271e90eb5f9f ("drm: use drm_warn() in validate_blend_mode_for_alpha_formats()") turns the splat into a plain warning and went to drm-next on 2026-08-20 as part of drm-misc-next-fixes-2026-08-20, but has not reached mainline either. Other drivers are being fixed in separate threads (imx dcss, rockchip, vkms).

Quoted 2 lines

Since this was introduced during the 7.3 merge window, the fixes should land in 7.3 rather than wait for the next one.

I can confirm this regression. It's hitting me here too on Linus's latest tree. It's not good to boot and have a bunch of warnings already happening, resulting in a "tainted" kernel before I have the chance to break anything manually myself...

thanks,

greg k-h