@@ -67,10 +67,8 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
for_each_endpoint_of_node(port, ep) {
remote_port = of_graph_get_remote_port(ep);
- if (!remote_port) {
- of_node_put(ep);
- return 0;
- }
+ if (!remote_port)
+ continue;
possible_crtcs |= drm_of_crtc_port_mask(dev, remote_port);
@@ -730,6 +730,9 @@ EXPORT_SYMBOL(of_graph_get_endpoint_by_regs);
*/
struct device_node *of_graph_get_remote_endpoint(const struct device_node *node)
{
+ if (!of_device_is_available(node))
+ return NULL;
+
/* Get remote endpoint node. */
return of_parse_phandle(node, "remote-endpoint", 0);
}
There are cases in which a SoC allows many different routes between components, but not all of them make sense for a board. With this patch we allow standard status = "disabled" properties for ports. With this a SoC level dtsi file can describe all possible ports and only the ones that make sense for the given hardware are enabled at board level. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/gpu/drm/drm_of.c | 6 ++---- drivers/of/property.c | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-)