Re: [PATCH v2 0/3] drm/atomic-state-helper: fixes for blend-mode-prop warning

Melissa Wen <[email protected]>
Newsgroups org.freedesktop.lists.dri-devel,org.freedesktop.lists.amd-gfx
Message-ID <[email protected]>

On 04/08/2026 16:00, 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 warn 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.

Hello,

As this series mostly fixes AMD display driver, can I get an ack from 
AMD folks?

Thanks in advance,

Melissa

>
> 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.
>
> - 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.
>
> [1] https://lore.kernel.org/dri-devel/[email protected]/
>
> [v1]: https://lore.kernel.org/dri-devel/[email protected]/
> 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
>
> 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 as blend mode for DCE
>      generations
>
>   .../amd/display/amdgpu_dm/amdgpu_dm_plane.c   | 22 +++++++++++++++++--
>   drivers/gpu/drm/drm_atomic_state_helper.c     |  7 ++++++
>   2 files changed, 27 insertions(+), 2 deletions(-)
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.