Skip to content

Commit eb17c59

Browse files
Hsiao Chien SungChun-Kuang Hu
authored andcommitted
drm/mediatek: Support "None" blending in Mixer
Support "None" alpha blending mode on MediaTek's chips. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20240717-alpha-blending-v4-2-4b1c806c0749@mediatek.com/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
1 parent 1f66fe6 commit eb17c59

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpu/drm/mediatek/mtk_ethdr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (c) 2021 MediaTek Inc.
44
*/
55

6+
#include <drm/drm_blend.h>
67
#include <drm/drm_fourcc.h>
78
#include <drm/drm_framebuffer.h>
89
#include <linux/clk.h>
@@ -175,7 +176,8 @@ void mtk_ethdr_layer_config(struct device *dev, unsigned int idx,
175176
alpha_con |= state->base.alpha & MIXER_ALPHA;
176177
}
177178

178-
if (state->base.fb && !state->base.fb->format->has_alpha) {
179+
if ((state->base.fb && !state->base.fb->format->has_alpha) ||
180+
state->base.pixel_blend_mode == DRM_MODE_BLEND_PIXEL_NONE) {
179181
/*
180182
* Mixer doesn't support CONST_BLD mode,
181183
* use a trick to make the output equivalent

0 commit comments

Comments
 (0)