From: "Timur Kristóf" <timur.kristof@gmail.com>
To: airlied@gmail.com, alexander.deucher@amd.com,
christian.koenig@amd.com, daniels@collabora.com,
harry.wentland@amd.com, leandro.ribeiro@collabora.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
pekka.paalanen@collabora.com, simona@ffwll.ch,
siqueira@igalia.com, sunpeng.li@amd.com, tzimmermann@suse.de,
Melissa Wen <mwen@igalia.com>
Cc: "Alex Hung" <alex.hung@amd.com>,
"Daniel Wheeler" <Daniel.Wheeler@amd.com>,
kernel-dev@igalia.com, "Lyude Paul" <lyude@redhat.com>,
"Viktor Jägersküpper" <viktor_jaegerskuepper@freenet.de>,
"Mikhail Gavrilov" <mikhail.v.gavrilov@gmail.com>,
"Xaver Hugl" <xaver.hugl@gmail.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 0/3] drm/atomic-state-helper: fixes for blend-mode-prop warning
Date: Wed, 26 Aug 2026 18:49:05 +0200 [thread overview]
Message-ID: <OBTNak9WT7OSHXS1TK53DA@gmail.com> (raw)
In-Reply-To: <20260826104143.39077-1-mwen@igalia.com>
On Wednesday, August 26, 2026 12:37:04 PM Central European Summer Time Melissa
Wen wrote:
> PREMULTI was the default DRM blend mode until 9813e158d13d
> ("drm/drm_blend: allow blend mode property without PREMULTI") introduced
> the possibility of exposing the blend mode property without PREMULTI
> being supported. However, __drm_atomic_helper_plane_state_init() still
> resets pixel_blend_mode to PREMULTI (hardcoded), ignoring the supported
> mode in this property. In the same series, 860e748bddcc ("drm: ensure
> blend mode supported if pixel format with alpha exposed") starts warning
> drivers that supports alpha formats in a given planes but doesn't
> support blend mode property, which includes AMD primary and cursor
> planes.
>
> For AMD DCN families, overlay and primary planes support the three blend
> modes, and therefore PREMULTI is still the default mode. So the warning
> can be fixed by just creating blend mode properties for primary planes
> too. PREMULTI is the default/unique mode for cursor planes in DCN and
> DCE driver. However, looks like PIXEL_NONE is the unique blend mode
> supported by DCE-generation driver. I don't have the hardware to check
> it out, but looking at the code I understand that, even if the hardware
> can do PREMULTI or COVERAGE, the way it programs registers doesn't make
> these other blend modes actually available.
Hi Melissa,
Thanks for noticing and fixing this.
To make the code a bit easier to follow, I recommend moving the consideration
for blending and alpha properties to a smaller helper function. That's just my
personal preference though. The way you wrote it in the series is also good.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
>
> Bearing this in mind, this series is organized as follow:
>
> - Patch 1 fixes the pixel_blend_mode reset when the blend mode property
> is advertised without PREMULTI support. It's needed for AMD
> DCE-generation (patch 3) and I think with this we can also remove a
> workaround in nouveau nv50_wndw_default_state() caused by the
> hardcoded PREMULTI default value [1].
>
> - Patch 2 fixes the missing-blend-mode-property warning for DCN primary
> plane and for DCN+DCE cursor plane. The alpha property keeps only on
> overlay planes because looks like this is not supported by AMD primary
> planes and it doesn't affect the blend mode warning we are targetting.
> Enabling alpha properties to primary was also causing -EINVAL on IGT
> alpha tests because it started testing primary planes and disabling it
> (which is not allowed by the AMD display driver).
>
> - Patch 3 fixes the warning for DCE primary plane, but I detached this
> solution from the previous patch because I don't have hardware to
> validate if my assumption about PIXEL_NONE-only is correct. Also, I
> added PREMULTI to the list of supported blend mode to avoid uAPI
> regressions since it was the required/default mode for many years and,
> without overlay plane, PIXEL_NONE and PREMULTI are equivalent for
> primary on top of a black blackground.
>
> [1]
> https://lore.kernel.org/dri-devel/20260720215058.398210-3-lyude@redhat.com/
>
> [v1]:
> https://lore.kernel.org/dri-devel/20260722183240.626522-1-mwen@igalia.com/
> Changes:
> - new patch for pixel_blend_mode default value other than PREMULTI.
> - remove DCE11 which supports per_pixel_alpha but doesn't support
> DCN_UNIVERSAL_PLANE. - new patch for the primary plane blend mode on
> DCE-generations
>
> [v2]:
> https://lore.kernel.org/dri-devel/20260804140758.107683-1-mwen@igalia.com/
> Changes:
> - keep alpha property only for overlay planes (looks like primary plane
> doesn't actually support it) - alpha prop in primary planes causes IGT
> test failures with RX 7900 XT on a 4k60 HP U27 as reported by Daniel
> Wheeler.
> - improve readability of if conditions (Alex H)
> - add Leandro's r-b tags.
>
> [v3]:
> https://lore.kernel.org/dri-devel/20260813143605.106104-1-mwen@igalia.com/
> Changes:
> - add Daniel's, Mikhail's and Viktor's tested-by tag, accordingly
> - add Alex H r-b tag
> - add PREMULTI to the DCE list of supported blend modes to avoid
> uAPI regression reported by Viktor.
>
> Best Regards,
>
> Melissa
>
> Melissa Wen (3):
> drm/atomic-state-helper: set pixel_blend_mode to prop default on reset
> drm/amd/display: fix missing blend-mode-prop warning for DCN
> drm/amd/display: advertise PIXEL_NONE and PREMULTI blend mode for DCE
>
> .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 31 +++++++++++++++++--
> drivers/gpu/drm/drm_atomic_state_helper.c | 7 +++++
> 2 files changed, 35 insertions(+), 3 deletions(-)
next prev parent reply other threads:[~2026-08-26 16:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 10:37 [PATCH v4 0/3] drm/atomic-state-helper: fixes for blend-mode-prop warning Melissa Wen
2026-08-26 10:37 ` [PATCH v4 1/3] drm/atomic-state-helper: set pixel_blend_mode to prop default on reset Melissa Wen
2026-08-26 10:37 ` [PATCH v4 2/3] drm/amd/display: fix missing blend-mode-prop warning for DCN Melissa Wen
2026-08-26 10:37 ` [PATCH v4 3/3] drm/amd/display: advertise PIXEL_NONE and PREMULTI blend mode for DCE Melissa Wen
2026-08-26 10:47 ` Melissa Wen
2026-08-26 17:08 ` Alex Hung
2026-08-26 16:49 ` Timur Kristóf [this message]
2026-08-27 17:17 ` [PATCH v4 0/3] drm/atomic-state-helper: fixes for blend-mode-prop warning Melissa Wen
2026-08-27 13:34 ` Alex Deucher
2026-08-27 16:37 ` Melissa Wen
2026-08-27 17:14 ` Melissa Wen
2026-08-28 7:22 ` Thorsten Leemhuis
2026-08-28 12:19 ` Viktor Jägersküpper
2026-09-01 7:12 ` Thorsten Leemhuis
2026-09-02 18:58 ` Melissa Wen
2026-09-03 4:59 ` Greg KH
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=OBTNak9WT7OSHXS1TK53DA@gmail.com \
--to=timur.kristof@gmail.com \
--cc=Daniel.Wheeler@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=kernel-dev@igalia.com \
--cc=leandro.ribeiro@collabora.com \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=mripard@kernel.org \
--cc=mwen@igalia.com \
--cc=pekka.paalanen@collabora.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
--cc=tzimmermann@suse.de \
--cc=viktor_jaegerskuepper@freenet.de \
--cc=xaver.hugl@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox