1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/amd/display/dc/dcn20
Melissa Wen 67229b27ed drm/amd/display: don't ignore alpha property on pre-multiplied mode
"Pre-multiplied" is the default pixel blend mode for KMS/DRM, as
documented in supported_modes of drm_plane_create_blend_mode_property():
https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/drm_blend.c

In this mode, both 'pixel alpha' and 'plane alpha' participate in the
calculation, as described by the pixel blend mode formula in KMS/DRM
documentation:

out.rgb = plane_alpha * fg.rgb +
          (1 - (plane_alpha * fg.alpha)) * bg.rgb

Considering the blend config mechanisms we have in the driver so far,
the alpha mode that better fits this blend mode is the
_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN, where the value for global_gain
is the plane alpha (global_alpha).

With this change, alpha property stops to be ignored. It also addresses
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1734

v2:
 * keep the 8-bit value for global_alpha_value (Nicholas)
 * correct the logical ordering for combined global gain (Nicholas)
 * apply to dcn10 too (Nicholas)

Signed-off-by: Melissa Wen <mwen@igalia.com>
Tested-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Tested-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-04-07 16:34:32 -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 drm/amd/display: Add DSCL memory low power support 2020-12-01 16:03:40 -05:00
dcn20_dpp_cm.c drm/amd/display: Delete several unneeded bool conversions 2021-05-11 09:44:35 -04:00
dcn20_dsc.c drm/amd/display: fixed the DSC power off sequence during Driver PnP 2021-11-22 14:45:02 -05:00
dcn20_dsc.h drm/amd/display: Add DSC_DBG_EN shift/mask for dcn3 2020-08-17 14:09:27 -04:00
dcn20_dwb.c drm/amd/display: [backport] dwb dm + efc support 2019-06-22 09:34:11 -05:00
dcn20_dwb.h drm/amd/display: Add DCN2 DWB 2019-06-21 18:59:35 -05:00
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: don't ignore alpha property on pre-multiplied mode 2022-04-07 16:34:32 -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 drm/amd/display: cleanup of function pointer tables 2019-11-19 10:12:53 -05:00
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 drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN (v3) 2020-11-04 17:11:37 -05:00
dcn20_mmhubbub.c drm/amd/display: Add DCN2 MMHUBBUB 2019-06-21 18:59:34 -05:00
dcn20_mmhubbub.h drm/amd/display: Update register defines 2020-02-11 11:50:18 -05:00
dcn20_mpc.c drm/amd/display: fix function scopes 2021-12-13 16:34:26 -05:00
dcn20_mpc.h drm/amd/display: Use cursor locking to prevent flip delays 2020-04-28 16:19:56 -04:00
dcn20_opp.c drm/amd/display: Raise DPG height during timing synchronization 2020-10-26 13:29:21 -04:00
dcn20_opp.h drm/amd/display: Raise DPG height during timing synchronization 2020-10-26 13:29:21 -04:00
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-05 10:29:47 -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 drm/amd/display: Poll for GPUVM context ready (v2) 2019-07-18 14:18:09 -05:00
dcn20_vmid.h drm/amd/display: Update register defines 2020-02-11 11:50:18 -05:00
Makefile drm/amd/display: move FPU-related code from dcn20 to dml folder 2022-03-15 14:25:16 -04:00