On 12/08/2026 18:34, Wheeler, Daniel wrote:
Public
Hey Melissa,
I've found out that this patch causes some IGT failures with the
igt@kms_plane_alpha_blend tests. I noticed it with a RX 7900 XT on a 4k60 HP
U27. The tests fail with an assertion failure. I posted a snippet below.
Starting subtest: alpha-basic
Starting dynamic subtest: pipe-A-DP-1
[181.052561] (kms_plane_alpha_blend:9570) igt_kms-CRITICAL: Test assertion
failure function do_display_commit, file ../lib/igt_kms.c:4982:
[181.052564] (kms_plane_alpha_blend:9570) igt_kms-CRITICAL: Failed assertion:
ret == 0
[181.052568] (kms_plane_alpha_blend:9570) igt_kms-CRITICAL: Last errno: 22,
Invalid argument
[181.052571] (kms_plane_alpha_blend:9570) igt_kms-CRITICAL: error: -22 != 0
Dynamic subtest pipe-A-DP-1 failed.
Hi Daniel,
Thanks for testing and pointing it out.
I think the failure is caused by including alpha property to primary
planes, so the test runs for primary planes and fails when trying to
disable them (CRTC w/o primary).
I'm not sure if this is essentially an issue in the IGT test or if AMD
primary planes don't support alpha, but I'll send another version to not
add alpha property to primary by now as it isn't related to the blend
mode warning. After I'll look at the driver to understand what is the
right approach.
Best Regards,
Melissa
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Melissa Wen
Sent: Tuesday, August 4, 2026 10:01 AM
To: [email protected]; Deucher, Alexander <[email protected]>; Koenig, Christian
<[email protected]>; [email protected]; Wentland, Harry
<[email protected]>; [email protected]; [email protected];
[email protected]; [email protected]; [email protected]; [email protected]; Li, Sun peng
(Leo) <[email protected]>; [email protected]
Cc: Hung, Alex <[email protected]>; [email protected]; Lyude Paul
<[email protected]>; [email protected]; [email protected]
Subject: [PATCH v2 2/3] drm/amd/display: fix missing blend-mode-prop warning
for DCN
validate_blend_mode_for_alpha_formats() warns when a plane supports formats
with alpha but doesn't expose the blend mode property. Fix this by adding the
same overlay plane blend modes to primary plane, since they are all universal
planes in DCN-generation. Cursor planes support
ARGB8888 format and CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA is set by default
(other color formats are not implemented), so only expose support to PREMULTI,
which is the default blend mode on DRM.
Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha
exposed")
Signed-off-by: Melissa Wen <[email protected]>
---
.../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 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 1b564cfe2120..a276f3730044 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,8 +1923,15 @@ 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) {
+ /* 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.
+ */
+ if ((plane->type == DRM_PLANE_TYPE_OVERLAY ||
+ plane->type == DRM_PLANE_TYPE_PRIMARY) &&
+ plane_cap &&
+ plane_cap->type == DC_PLANE_TYPE_DCN_UNIVERSAL &&
+ 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);
@@ -1933,6 +1940,13 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager
*dm,
drm_plane_create_blend_mode_property(plane, blend_caps);
}
+ /* Cursor color format is set to CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA
+ * by default, so only advertise DRM_MODE_BLEND_PREMULTI blend mode for
+ * this type of plane.
+ */
+ if (plane->type == DRM_PLANE_TYPE_CURSOR)
+ drm_plane_create_blend_mode_property(plane,
+BIT(DRM_MODE_BLEND_PREMULTI));
+
if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
/*
* Allow OVERLAY planes to be used as underlays by assigning an
--
2.53.0