mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
drm/msm/dpu: simplify bg_alpha selection
In order to be more obvious in fg_alpha / bg_alpha handling during the blending programming drop the default setting for background alpha value and set it explicitly in all cases. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/697896/ Link: https://lore.kernel.org/r/20260112-dpu-rework-alpha-v2-1-d168785911d5@oss.qualcomm.com
This commit is contained in:
parent
6efced27f5
commit
eef07fd9aa
|
|
@ -335,13 +335,13 @@ static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
|
|||
max_alpha = 0x3ff;
|
||||
fg_alpha = pstate->base.alpha >> 6;
|
||||
}
|
||||
bg_alpha = max_alpha - fg_alpha;
|
||||
|
||||
/* default to opaque blending */
|
||||
if (pstate->base.pixel_blend_mode == DRM_MODE_BLEND_PIXEL_NONE ||
|
||||
!format->alpha_enable) {
|
||||
blend_op = DPU_BLEND_FG_ALPHA_FG_CONST |
|
||||
DPU_BLEND_BG_ALPHA_BG_CONST;
|
||||
bg_alpha = max_alpha - fg_alpha;
|
||||
} else if (pstate->base.pixel_blend_mode == DRM_MODE_BLEND_PREMULTI) {
|
||||
blend_op = DPU_BLEND_FG_ALPHA_FG_CONST |
|
||||
DPU_BLEND_BG_ALPHA_FG_PIXEL;
|
||||
|
|
@ -350,6 +350,7 @@ static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
|
|||
blend_op |= DPU_BLEND_BG_MOD_ALPHA |
|
||||
DPU_BLEND_BG_INV_MOD_ALPHA;
|
||||
} else {
|
||||
bg_alpha = 0;
|
||||
blend_op |= DPU_BLEND_BG_INV_ALPHA;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -363,6 +364,7 @@ static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
|
|||
DPU_BLEND_BG_MOD_ALPHA |
|
||||
DPU_BLEND_BG_INV_MOD_ALPHA;
|
||||
} else {
|
||||
bg_alpha = 0;
|
||||
blend_op |= DPU_BLEND_BG_INV_ALPHA;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user