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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-02-21 07:18, Sean Paul wrote:
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@xxxxxxxxxxxx>

Reviewed-by: Jeykumar Sankaran <jsanka@xxxxxxxxxxxxxx>

---
 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++) {

--
Jeykumar S
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux