From 80065ab5bcf2546669113060a5ce51402784323f Mon Sep 17 00:00:00 2001 From: Alex Hung Date: Sat, 29 Aug 2026 13:38:06 -0600 Subject: [PATCH] drm/amd/display: Test DCC reject for multi-plane format [WHAT] Extend the amdgpu_dm_plane_format_mod_supported() test to cover the rejection of a format that carries an extra plane alongside a DCC modifier. [HOW] Reuse the existing GFX9 DCC modifier and ask for XRGB8888_A8, whose 4 bytes-per-pixel main plane passes the bpp check but whose alpha plane collides with the DCC metadata plane. Assisted-by: Copilot:Claude-Opus-5 Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Hung Signed-off-by: Chenyu Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- .../drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c index 5ae627bb55cc..4d8d431bba48 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c @@ -506,6 +506,11 @@ static void dm_test_format_mod_supported(struct kunit *test) KUNIT_EXPECT_FALSE(test, amdgpu_dm_plane_format_mod_supported(plane, DRM_FORMAT_NV12, listed_mod)); + + /* 4 bytes per pixel, but its extra plane collides with the DCC metadata plane. */ + KUNIT_EXPECT_FALSE(test, + amdgpu_dm_plane_format_mod_supported(plane, DRM_FORMAT_XRGB8888_A8, + listed_mod)); } /**