drm: rcar-du: Skip disabled outputs
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 1 Dec 2016 11:07:49 +0000 (13:07 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 4 Apr 2017 14:04:17 +0000 (17:04 +0300)
When a DT node connected to a DU output is disabled no bridge will ever
be instantiated for it. Skip the output in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_kms.c

index f38fc2f3f93d9c196380be1d1ac632ccd1965e89..f4125c8ca902100fea09090f1725a255f316c310 100644 (file)
@@ -302,6 +302,13 @@ static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu,
                return -ENODEV;
        }
 
+       if (!of_device_is_available(entity)) {
+               dev_dbg(rcdu->dev,
+                       "connected entity %s is disabled, skipping\n",
+                       entity->full_name);
+               return -ENODEV;
+       }
+
        entity_ep_node = of_parse_phandle(ep->local_node, "remote-endpoint", 0);
 
        for_each_endpoint_of_node(entity, ep_node) {