linux/drivers/gpu/drm/amd/display/dc/dcn10
Sung Joon Kim 76818cdd11 drm/amd/display: add Coverage blend mode for overlay plane
According to the KMS man page, there is a
"Coverage" alpha blend mode that assumes the
pixel color values have NOT been pre-multiplied
and will be done when the actual blending to
the background color values happens.

Previously, this mode hasn't been enabled
in our driver and it was assumed that all
normal overlay planes are pre-multiplied
by default.

When a 3rd party app is used to input a image
in a specific format, e.g. PNG, as a source
of a overlay plane to blend with the background
primary plane, the pixel color values are not
pre-multiplied. So by adding "Coverage" blend
mode, our driver will support those cases.

Issue fixed: Overlay plane alpha channel blending is incorrect
Issue tracker: https://gitlab.freedesktop.org/drm/amd/-/issues/1769

Reference:
https://dri.freedesktop.org/docs/drm/gpu/drm-kms.html#plane-composition-properties

Adding Coverage support also enables IGT
kms_plane_alpha_blend Coverage subtests:
1. coverage-7efc
2. coverage-vs-premult-vs-constant

Changes
1. Add DRM_MODE_BLEND_COVERAGE blend mode capability
2. Add "pre_multiplied_alpha" flag for Coverage case
3. Read the correct flag and set the DCN MPCC
pre_multiplied register bit (only on overlay plane)

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1769
Signed-off-by: Sung Joon Kim <Sungjoon.Kim@amd.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-05-26 14:56:33 -04:00
..
Makefile
dcn10_cm_common.c
dcn10_cm_common.h
dcn10_dpp.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn10_dpp.h drm/amd/display: Remove the repeated dpp1_full_bypass declaration 2021-06-18 17:14:36 -04:00
dcn10_dpp_cm.c
dcn10_dpp_dscl.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn10_dwb.c
dcn10_dwb.h
dcn10_hubbub.c drm/amd/display: Add pstate verification and recovery for DCN31 2022-03-15 14:33:57 -04:00
dcn10_hubbub.h drm/amd/display: remove compbuf size wait 2021-07-21 13:39:25 -04:00
dcn10_hubp.c drm/amd/display: make hubp1_wait_pipe_read_start() static 2022-04-19 13:58:32 -04:00
dcn10_hubp.h drm/amd/display: make hubp1_wait_pipe_read_start() static 2022-04-19 13:58:32 -04:00
dcn10_hw_sequencer.c drm/amd/display: add Coverage blend mode for overlay plane 2022-05-26 14:56:33 -04:00
dcn10_hw_sequencer.h drm/amd/display: Refactor visual confirm 2021-06-08 12:18:37 -04:00
dcn10_hw_sequencer_debug.c
dcn10_hw_sequencer_debug.h
dcn10_init.c drm/amd/display: Added power down for DCN10 2021-12-30 08:54:44 -05:00
dcn10_init.h
dcn10_ipp.c
dcn10_ipp.h drm/amd/display: add cyan_skillfish display support 2021-10-04 15:22:57 -04:00
dcn10_link_encoder.c drm/amd/display: add set dp lane settings to link_hwss 2022-02-02 18:26:32 -05:00
dcn10_link_encoder.h drm/amd/display: add set dp lane settings to link_hwss 2022-02-02 18:26:32 -05:00
dcn10_mpc.c drm/amd/display: Refactor visual confirm 2021-06-08 12:18:37 -04:00
dcn10_mpc.h
dcn10_opp.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn10_opp.h
dcn10_optc.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn10_optc.h drm/amd/display: log additional register state for debug 2021-07-21 13:39:25 -04:00
dcn10_resource.c drm/amd/display: remove DC_FP_* wrapper from dml folder 2022-03-31 23:05:54 -04:00
dcn10_resource.h drm/amd/display: move FPU code from dcn10 to dml/dcn10 folder 2022-03-15 14:25:16 -04:00
dcn10_stream_encoder.c drm/amd/display: Add Audio readback registers 2022-04-25 17:10:17 -04:00
dcn10_stream_encoder.h drm/amd/display: Add Audio readback registers 2022-04-25 17:10:17 -04:00