Browse Source

drm/msm: Don't fail bind if nothing connected to dsi

If there is no bridge or panel connected to a dsi node, don't fail the
entire msm bind. Just ignore the dsi block and move on.

Cc: Doug Anderson <dianders@chromium.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>

Signed-off-by: Rob Clark <robdclark@gmail.com>
Sean Paul 7 years ago
parent
commit
9888495a14
1 changed files with 7 additions and 2 deletions
  1. 7 2
      drivers/gpu/drm/msm/dsi/dsi.c

+ 7 - 2
drivers/gpu/drm/msm/dsi/dsi.c

@@ -118,8 +118,13 @@ static int dsi_bind(struct device *dev, struct device *master, void *data)
 
 
 	DBG("");
 	DBG("");
 	msm_dsi = dsi_init(pdev);
 	msm_dsi = dsi_init(pdev);
-	if (IS_ERR(msm_dsi))
-		return PTR_ERR(msm_dsi);
+	if (IS_ERR(msm_dsi)) {
+		/* Don't fail the bind if the dsi port is not connected */
+		if (PTR_ERR(msm_dsi) == -ENODEV)
+			return 0;
+		else
+			return PTR_ERR(msm_dsi);
+	}
 
 
 	priv->dsi[msm_dsi->id] = msm_dsi;
 	priv->dsi[msm_dsi->id] = msm_dsi;