linux/drivers/gpu/drm/amd/display/dc/dcn20
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 drm/amd/display: move FPU-related code from dcn20 to dml folder 2022-03-15 14:25:16 -04:00
dcn20_dccg.c drm/amd/display: Add interface for ADD & DROP PIXEL Registers 2021-06-08 12:22:42 -04:00
dcn20_dccg.h drm/amd/display: Disable physym clock 2022-01-25 18:00:35 -05:00
dcn20_dpp.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn20_dpp.h
dcn20_dpp_cm.c drm/amd/display: Delete several unneeded bool conversions 2021-05-11 09:44:35 -04:00
dcn20_dsc.c Merge tag 'amd-drm-next-5.19-2022-05-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2022-05-19 14:09:54 +10:00
dcn20_dsc.h drm/display: Move DSC header and helpers into display-helper module 2022-04-25 11:19:36 +02:00
dcn20_dwb.c
dcn20_dwb.h
dcn20_dwb_scl.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn20_hubbub.c drm/amd/display: log additional register state for debug 2021-07-21 13:39:25 -04:00
dcn20_hubbub.h drm/amd/display: log additional register state for debug 2021-07-21 13:39:25 -04:00
dcn20_hubp.c drm/amd/display: Modify plane removal sequence to avoid hangs. 2022-03-02 18:40:07 -05:00
dcn20_hubp.h drm/amd/display: implement dc_mode_memclk 2021-12-14 16:08:41 -05:00
dcn20_hwseq.c drm/amd/display: add Coverage blend mode for overlay plane 2022-05-26 14:56:33 -04:00
dcn20_hwseq.h drm/amd/display: implement dc_mode_memclk 2021-12-14 16:08:41 -05:00
dcn20_init.c drm/amd: append missing includes 2021-12-13 16:32:34 -05:00
dcn20_init.h
dcn20_link_encoder.c drm/amdgpu/display: restore AUX_DPHY_TX_CONTROL for DCN2.x 2021-04-09 16:38:31 -04:00
dcn20_link_encoder.h
dcn20_mmhubbub.c
dcn20_mmhubbub.h
dcn20_mpc.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn20_mpc.h
dcn20_opp.c
dcn20_opp.h
dcn20_optc.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn20_optc.h drm/amd/display: fixed the DSC power off sequence during Driver PnP 2021-11-22 14:45:02 -05:00
dcn20_resource.c drm/amd/display: remove assert for odm transition case 2022-04-06 12:02:57 -04:00
dcn20_resource.h drm/amd/display: move FPU-related code from dcn20 to dml folder 2022-03-15 14:25:16 -04:00
dcn20_stream_encoder.c drm/amd/display: revert "Reset fifo after enable otg" 2022-02-02 18:26:31 -05:00
dcn20_stream_encoder.h drm/amd/display: Add DPCD writes at key points 2021-09-14 15:57:09 -04:00
dcn20_vmid.c
dcn20_vmid.h