[Freedreno] [PATCH RESEND 05/10] drm/msm: Defer probe if display component not found

Sean Paul seanpaul at chromium.org
Wed Feb 21 15:18:33 UTC 2018


The downstream driver relies on Makefile ordering of files to ensure
components probe in the right order. This took me entirely too long to
sort out, so don't rely on that any longer.

Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
 drivers/gpu/drm/msm/msm_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 9532321a0e4f..30c56b873fbe 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -1784,6 +1784,7 @@ static int add_display_components(struct device *dev,
 	if (of_device_is_compatible(dev->of_node, "qcom,dpu-kms")) {
 		struct device_node *np = dev->of_node;
 		unsigned int i;
+		bool found = false;
 
 #ifdef CONFIG_DRM_MSM_DSI_STAGING
 		for (i = 0; i < MAX_DSI_ACTIVE_DISPLAY; i++) {
@@ -1794,8 +1795,11 @@ static int add_display_components(struct device *dev,
 				component_match_add(dev, matchptr, compare_of,
 						node);
 				pr_debug("Added component = %s\n", name);
+				found = true;
 			}
 		}
+		if (!found)
+			return -EPROBE_DEFER;
 #endif
 
 		for (i = 0; ; i++) {
-- 
2.16.1.291.g4437f3f132-goog



More information about the Freedreno mailing list