Commit c2af7364 authored by Philippe CORNU's avatar Philippe CORNU Committed by Philippe Cornu

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: default avatarPhilippe Cornu <philippe.cornu@st.com>
Reviewed-by: default avatarYannick Fertré <yannick.fertre@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180417113441.8214-1-philippe.cornu@st.com
parent cc4e44d5
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment