drm/msm: Only add available components
PATCH 1/1 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.
---
drivers/gpu/drm/msm/msm_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/msm_drv.c +4 -2
@@ -1190,8 +1190,10 @@ 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); }
Signature · 6 lines
2.20.0.rc1.387.gf8505762e3-goog _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
Quoted 10 lines · Douglas Anderson
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.
Signed-off-by Douglas Anderson <[email protected]>
yeah, that seems like a reasonable thing to do
Quoted 23 lines
---
drivers/gpu/drm/msm/msm_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/msm/msm_drv.c +4
-3@@ -1190,8 +1190,10 @@ 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); } --
Quoted 2 lines
2.20.0.rc1.387.gf8505762e3-goog
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno