summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe CORNU <philippe.cornu@st.com>2018-04-17 13:34:41 +0200
committerPhilippe Cornu <philippe.cornu@st.com>2018-04-27 10:39:45 +0200
commitc2af73645d3a67cc2e4a750179048a4c6d5110a1 (patch)
tree70132edcc96d0157c0c0045d5bdf8e89fc3cb5e9
parentcc4e44d5156933272df02d27f99322100e1edd1d (diff)
drm/stm: ltdc: fix deferred endpoint management
When a driver related to one of the endpoints is deferred due to probe dependencies (i2c, spi...) but the other one is ready, ltdc probe continues and the deferred driver will never be probed again. The fix consists in waiting for all deferred endpoints before continuing the ltdc probe. Signed-off-by: Philippe Cornu <philippe.cornu@st.com> Reviewed-by: Yannick Fertré <yannick.fertre@st.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180417113441.8214-1-philippe.cornu@st.com
-rw-r--r--drivers/gpu/drm/stm/ltdc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index e3121d9e4230..014cef8cef37 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -987,14 +987,13 @@ int ltdc_load(struct drm_device *ddev)
&bridge[i]);
/*
- * If at least one endpoint is ready, continue probing,
- * else if at least one endpoint is -EPROBE_DEFER and
- * there is no previous ready endpoints, defer probing.
+ * If at least one endpoint is -EPROBE_DEFER, defer probing,
+ * else if at least one endpoint is ready, continue probing.
*/
- if (!ret)
+ if (ret == -EPROBE_DEFER)
+ return ret;
+ else if (!ret)
endpoint_not_ready = 0;
- else if (ret == -EPROBE_DEFER && endpoint_not_ready)
- endpoint_not_ready = -EPROBE_DEFER;
}
if (endpoint_not_ready)