summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
diff options
context:
space:
mode:
authorMelissa Wen <mwen@igalia.com>2022-03-29 19:18:35 -0100
committerAlex Deucher <alexander.deucher@amd.com>2022-04-07 16:34:32 -0400
commit67229b27ed6fdb6bfce04f61ce4026c57b32ba15 (patch)
tree3267ccc2332f176fce24ddd3d6003825f5f2957a /drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
parent5273e82c5f47fff94058ff8ee002650476e24719 (diff)
downloadlinux-67229b27ed6fdb6bfce04f61ce4026c57b32ba15.tar.bz2
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h')
0 files changed, 0 insertions, 0 deletions