1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/amd/display/amdgpu_dm
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
..
amdgpu_dm.c drm/amd/display: add Coverage blend mode for overlay plane 2022-05-26 14:56:33 -04:00
amdgpu_dm.h 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
amdgpu_dm_color.c drm/amd: fix improper docstring syntax 2021-12-13 16:32:34 -05:00
amdgpu_dm_crc.c drm/amd/display: add connector type check for CRC source set 2021-12-01 17:08:47 -05:00
amdgpu_dm_crc.h drm/amd/display: Refactor suspend/resume of Secure display 2021-05-19 22:39:16 -04:00
amdgpu_dm_debugfs.c drm/amd/display: remove redundant CONFIG_DRM_AMD_DC_DCN in amdgpu_dm 2022-05-10 17:53:13 -04:00
amdgpu_dm_debugfs.h drm/amd/display: Support crc on specific region 2021-03-05 15:11:47 -05:00
amdgpu_dm_hdcp.c drm/display: Move HDCP helpers into display-helper module 2022-04-25 11:19:36 +02:00
amdgpu_dm_hdcp.h drm/amdgpu/display: remove hdcp_srm sysfs on device removal 2021-02-18 16:43:08 -05:00
amdgpu_dm_helpers.c drm/amd/display: remove redundant CONFIG_DRM_AMD_DC_DCN in amdgpu_dm 2022-05-10 17:53:13 -04:00
amdgpu_dm_irq.c drm/amd/display: do not disable an invalid irq source in hdp finish 2022-05-10 17:53:12 -04:00
amdgpu_dm_irq.h drm/amd/display: Support for DMUB AUX 2021-05-10 18:06:44 -04:00
amdgpu_dm_irq_params.h drm/amd/display: Use vblank control events for PSR enable/disable 2021-08-16 15:35:56 -04:00
amdgpu_dm_mst_types.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
amdgpu_dm_mst_types.h drm/amd/display: remove redundant CONFIG_DRM_AMD_DC_DCN in amdgpu_dm 2022-05-10 17:53:13 -04:00
amdgpu_dm_pp_smu.c drm/amd/pm: create a new holder for those APIs used only by legacy ASICs(si/kv) 2022-01-14 17:51:14 -05:00
amdgpu_dm_psr.c drm/amd/display: remove redundant CONFIG_DRM_AMD_DC_DCN in amdgpu_dm 2022-05-10 17:53:13 -04:00
amdgpu_dm_psr.h drm/amd/display: Delay PSR entry 2021-06-21 17:45:14 -04:00
amdgpu_dm_services.c drm/amd/display: Decouple amdgpu_dm_trace from service 2020-10-26 13:33:59 -04:00
amdgpu_dm_trace.h drm/amd/display: Add control mechanism for FPU utilization 2021-08-05 21:17:59 -04:00
dc_fpu.c drm/amd/display: Re-arrange FPU code structure for dcn2x 2021-10-06 15:49:24 -04:00
dc_fpu.h drm/amd/display: Add DC_FP helper to check FPU state 2021-08-05 21:17:59 -04:00
Makefile drm/amd/display: Add control mechanism for FPU 2021-08-05 21:17:59 -04:00