From: sashiko-bot@kernel.org
To: "MuXian Chen" <a18165943161@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: drop RGBA8888 from plane format lists
Date: Sun, 01 Nov 2026 12:05:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-192397@kernel.org> (raw)
In-Reply-To: <20261030164327.8461-1-a18165943161@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/amd/display: broken KUnit test dm_test_get_plane_formats()
--
commit f2e839f51941e28c7b37c695841346e690a5a04b
Author: MuXian Chen <a18165943161@gmail.com>
drm/amd/display: drop RGBA8888 from plane format lists
This commit removes DRM_FORMAT_RGBA8888 from rgb_formats[] and
overlay_formats[] because DC lacks a corresponding surface pixel format,
causing fill_dc_plane_info_and_addr() to fail with -EINVAL when a
compositor selects it.
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5339
> 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 06d9ff2c32c52..931c4ad677c7e 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
> @@ -48,11 +48,13 @@
> * For future use cases we should either initialize them dynamically based on
> * plane capabilities, or initialize this array to all formats, so internal drm
> * check will succeed, and let DC implement proper check
> + *
> + * DC has no surface format for DRM_FORMAT_RGBA8888, so it must not be
> + * advertised here or in overlay_formats.
> */
> static const uint32_t rgb_formats[] = {
> DRM_FORMAT_XRGB8888,
> DRM_FORMAT_ARGB8888,
> - DRM_FORMAT_RGBA8888,
> DRM_FORMAT_XRGB2101010,
> DRM_FORMAT_XBGR2101010,
> DRM_FORMAT_ARGB2101010,
> @@ -69,7 +71,6 @@ static const uint32_t rgb_formats[] = {
> static const uint32_t overlay_formats[] = {
> DRM_FORMAT_XRGB8888,
> DRM_FORMAT_ARGB8888,
> - DRM_FORMAT_RGBA8888,
[Severity: Medium]
As reported by Sashiko on v1 [1], removing DRM_FORMAT_RGBA8888 reduces
ARRAY_SIZE(rgb_formats) from 14 to 13 and ARRAY_SIZE(overlay_formats) from
9 to 8.
In drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c,
dm_test_get_plane_formats() calls amdgpu_dm_plane_get_plane_formats() and
checks the returned format counts:
plane->type = DRM_PLANE_TYPE_PRIMARY;
KUNIT_EXPECT_EQ(test, amdgpu_dm_plane_get_plane_formats(plane, NULL, formats, 32), 14);
cap->pixel_format_support.nv12 = true;
cap->pixel_format_support.p010 = true;
cap->pixel_format_support.fp16 = true;
KUNIT_EXPECT_EQ(test, amdgpu_dm_plane_get_plane_formats(plane, cap, formats, 32), 20);
plane->type = DRM_PLANE_TYPE_OVERLAY;
KUNIT_EXPECT_EQ(test, amdgpu_dm_plane_get_plane_formats(plane, NULL, formats, 32), 9);
universal_cap->type = DC_PLANE_TYPE_DCN_UNIVERSAL;
KUNIT_EXPECT_EQ(test,
amdgpu_dm_plane_get_plane_formats(plane, universal_cap, formats, 32),
14);
Should these four KUNIT_EXPECT_EQ assertions in dm_test_get_plane_formats()
be updated to expect 13, 19, 8, and 13 so the amdgpu_dm_plane KUnit test
suite does not fail?
[1] https://lore.kernel.org/r/20261030171816.11610-1-a18165943161@gmail.com
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261030164327.8461-1-a18165943161@gmail.com?part=1
prev parent reply other threads:[~2026-11-01 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 16:43 [PATCH] drm/amd/display: drop RGBA8888 from plane format lists MuXian Chen
2026-11-01 12:05 ` sashiko-bot [this message]
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=sashiko-outbox-192397@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=a18165943161@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.