From 9455b48fbbd43652355347ef222a4eb9ec737ad0 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Tue, 7 May 2019 10:45:19 -0400 Subject: [PATCH] drm/msm: Only add available components When trying to get the display up on my sdm845 board I noticed that the display wouldn't probe if I had the dsi1 node marked as "disabled" even though my board doesn't use dsi1. It looks like the msm code adds all nodes to its list of components even if they are disabled. I believe this doesn't work because all registered components need to come up before we finish probing. Let's do like other DRM code and only add available components. Change-Id: I00738a7f9fa572f12067066e86ea7974693b3aab Signed-off-by: Douglas Anderson Reviewed-by: Rob Clark Signed-off-by: Rob Clark Link: https://patchwork.kernel.org/patch/10712329/ Git-commit: d1d9d0e1724d6a7123b4280fdf6630ae70f96c9c Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Nilaan Gunabalachandran --- msm/msm_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msm/msm_drv.c b/msm/msm_drv.c index 62669088cc..7055cca7f5 100644 --- a/msm/msm_drv.c +++ b/msm/msm_drv.c @@ -1839,8 +1839,9 @@ static int add_components_mdp(struct device *mdp_dev, if (!intf) continue; - drm_of_component_match_add(master_dev, matchptr, compare_of, - intf); + if (of_device_is_available(intf)) + drm_of_component_match_add(master_dev, matchptr, + compare_of, intf); of_node_put(intf); }