]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/mediatek: Support DRM plane alpha in Mixer
authorHsiao Chien Sung <shawn.sung@mediatek.com>
Wed, 19 Jun 2024 16:38:54 +0000 (00:38 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 20 Jun 2024 13:57:36 +0000 (13:57 +0000)
Set the plane alpha according to DRM plane property.

Reviewed-by: CK Hu <ck.hu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-14-a9d62d2e2c7e@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_ethdr.c

index bf5826b7e77607d23a652a08d42af7e3b6c4e751..36021cb8df62de2a3ee106851a5ad7984dbaf251 100644 (file)
@@ -170,8 +170,10 @@ void mtk_ethdr_layer_config(struct device *dev, unsigned int idx,
                return;
        }
 
-       if (state->base.fb && state->base.fb->format->has_alpha)
-               alpha_con = MIXER_ALPHA_AEN | MIXER_ALPHA;
+       if (state->base.fb) {
+               alpha_con |= MIXER_ALPHA_AEN;
+               alpha_con |= state->base.alpha & MIXER_ALPHA;
+       }
 
        if (state->base.fb && !state->base.fb->format->has_alpha) {
                /*