summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mediatek/mtk_crtc.c
diff options
context:
space:
mode:
authorIcenowy Zheng <uwu@icenowy.me>2025-05-31 20:11:40 +0800
committerChun-Kuang Hu <chunkuang.hu@kernel.org>2025-07-17 23:19:05 +0000
commit8d121a82fa564e0c8bd86ce4ec56b2a43b9b016e (patch)
tree3cd4e1d59d6eca21502130c2e4117b00515e42f9 /drivers/gpu/drm/mediatek/mtk_crtc.c
parentd208261e9f7c66960587b10473081dc1cecbe50b (diff)
drm/mediatek: only announce AFBC if really supported
Currently even the SoC's OVL does not declare the support of AFBC, AFBC is still announced to the userspace within the IN_FORMATS blob, which breaks modern Wayland compositors like KWin Wayland and others. Gate passing modifiers to drm_universal_plane_init() behind querying the driver of the hardware block for AFBC support. Fixes: c410fa9b07c3 ("drm/mediatek: Add AFBC support to Mediatek DRM driver") Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Reviewed-by: CK Hu <ck.hu@medaitek.com> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20250531121140.387661-1-uwu@icenowy.me/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_crtc.c')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_crtc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_crtc.c b/drivers/gpu/drm/mediatek/mtk_crtc.c
index 6916c8925b41..bc7527542fdc 100644
--- a/drivers/gpu/drm/mediatek/mtk_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_crtc.c
@@ -963,7 +963,8 @@ static int mtk_crtc_init_comp_planes(struct drm_device *drm_dev,
mtk_ddp_comp_supported_rotations(comp),
mtk_ddp_comp_get_blend_modes(comp),
mtk_ddp_comp_get_formats(comp),
- mtk_ddp_comp_get_num_formats(comp), i);
+ mtk_ddp_comp_get_num_formats(comp),
+ mtk_ddp_comp_is_afbc_supported(comp), i);
if (ret)
return ret;