On the legacy ovl_adaptor for MT8195 and MT8188, four MERGE IPs from VPPSYS are used, and those shall be exclusive to the OVL Adaptor driver.
For this reason, add a branch in mtk_ovl_adaptor_is_comp_present() to check if the component that is being checked is MERGE and, if so, iterate through the list of component matches to understand if it is one of those that must be exclusive to OVL Adaptor. This resolves a corner case happening when mediatek-drm retries to probe after a probe deferral, where all MERGE components would get added to both "normal" and OVL Adaptor pipelines. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> --- drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c index ed9a2e35ba8a..bbf1d8ccda05 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c @@ -519,6 +519,17 @@ bool mtk_ovl_adaptor_is_comp_present(struct device_node *node) if (type >= OVL_ADAPTOR_TYPE_NUM) return false; + /* Check if this is one of the MERGE components used in OVL Adaptor */ + if (type == OVL_ADAPTOR_TYPE_MERGE) { + int id = of_alias_get_id(node, private_comp_stem[type]); + + for (int i = OVL_ADAPTOR_MERGE0; i <= OVL_ADAPTOR_MERGE3; i++) + if (comp_matches[i].alias_id == id) + return true; + + return false; + } + /* * In the context of mediatek-drm, ETHDR, MDP_RDMA and Padding are * used exclusively by OVL Adaptor: if this component is not one of -- 2.54.0
