aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2017-01-04 03:44:58 -0500
committerRob Clark <robdclark@gmail.com>2017-02-06 11:28:44 -0500
commita1b1a4f7e4c3cf3352ae477b86ddea2d4ed35d3e (patch)
tree33bc4fb109af1fdb478da4df06c52d065c2144c4
parent10967a0687b13a27d77b4a77d97010359cb8267f (diff)
drm/msm/dsi: Don't error if a DSI host doesn't have a device connected
The driver returns an error if a DSI DT node is populated, but no device is connected to it or if the data-lane map isn't present. Ideally, such a DSI node shouldn't be probed at all (i.e, its status should be set to "disabled in DT"), but there isn't any harm in registering the DSI device even if it doesn't have a bridge/panel connected to it. Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_host.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index eb0903d37e5c..c4dad9084a3a 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1559,8 +1559,9 @@ static int dsi_host_parse_lane_data(struct msm_dsi_host *msm_host,
1559 1559
1560 prop = of_find_property(ep, "data-lanes", &len); 1560 prop = of_find_property(ep, "data-lanes", &len);
1561 if (!prop) { 1561 if (!prop) {
1562 dev_dbg(dev, "failed to find data lane mapping\n"); 1562 dev_dbg(dev,
1563 return -EINVAL; 1563 "failed to find data lane mapping, using default\n");
1564 return 0;
1564 } 1565 }
1565 1566
1566 num_lanes = len / sizeof(u32); 1567 num_lanes = len / sizeof(u32);
@@ -1617,7 +1618,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host)
1617 struct device *dev = &msm_host->pdev->dev; 1618 struct device *dev = &msm_host->pdev->dev;
1618 struct device_node *np = dev->of_node; 1619 struct device_node *np = dev->of_node;
1619 struct device_node *endpoint, *device_node; 1620 struct device_node *endpoint, *device_node;
1620 int ret; 1621 int ret = 0;
1621 1622
1622 /* 1623 /*
1623 * Get the endpoint of the output port of the DSI host. In our case, 1624 * Get the endpoint of the output port of the DSI host. In our case,
@@ -1641,8 +1642,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host)
1641 /* Get panel node from the output port's endpoint data */ 1642 /* Get panel node from the output port's endpoint data */
1642 device_node = of_graph_get_remote_port_parent(endpoint); 1643 device_node = of_graph_get_remote_port_parent(endpoint);
1643 if (!device_node) { 1644 if (!device_node) {
1644 dev_err(dev, "%s: no valid device\n", __func__); 1645 dev_dbg(dev, "%s: no valid device\n", __func__);
1645 ret = -ENODEV;
1646 goto err; 1646 goto err;
1647 } 1647 }
1648 1648