Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+3 -1
+3 -1
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
··· 335 335 max_alpha = 0x3ff; 336 336 fg_alpha = pstate->base.alpha >> 6; 337 337 } 338 - bg_alpha = max_alpha - fg_alpha; 339 338 340 339 /* default to opaque blending */ 341 340 if (pstate->base.pixel_blend_mode == DRM_MODE_BLEND_PIXEL_NONE || 342 341 !format->alpha_enable) { 343 342 blend_op = DPU_BLEND_FG_ALPHA_FG_CONST | 344 343 DPU_BLEND_BG_ALPHA_BG_CONST; 344 + bg_alpha = max_alpha - fg_alpha; 345 345 } else if (pstate->base.pixel_blend_mode == DRM_MODE_BLEND_PREMULTI) { 346 346 blend_op = DPU_BLEND_FG_ALPHA_FG_CONST | 347 347 DPU_BLEND_BG_ALPHA_FG_PIXEL; ··· 350 350 blend_op |= DPU_BLEND_BG_MOD_ALPHA | 351 351 DPU_BLEND_BG_INV_MOD_ALPHA; 352 352 } else { 353 + bg_alpha = 0; 353 354 blend_op |= DPU_BLEND_BG_INV_ALPHA; 354 355 } 355 356 } else { ··· 364 363 DPU_BLEND_BG_MOD_ALPHA | 365 364 DPU_BLEND_BG_INV_MOD_ALPHA; 366 365 } else { 366 + bg_alpha = 0; 367 367 blend_op |= DPU_BLEND_BG_INV_ALPHA; 368 368 } 369 369 }