diff options
author | Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> | 2017-06-12 16:21:17 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2017-06-13 07:52:18 +0200 |
commit | 068b315e260ab7dbc553b863052da28c6877872f (patch) | |
tree | 569898fe5b3cd139c7733c55dae7e916361c54b8 | |
parent | e76884fb1ab60e52abe5598c4ca5d3f236cd9b8a (diff) |
drm: rockchip: limit EPROBE_DEFER retries in rockchip_dp_bind
A typo in the panel's "compatible" string in the dts
used to cause an infinite EPROBE_DEFER loop that effectively
kills the box as bootup never completes.
Now we abort after 10 retries.
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
-rw-r--r-- | drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 70a508423fa0..492a6751605d 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -316,6 +316,9 @@ static int rockchip_dp_drm_create_encoder(struct rockchip_dp_device *dp) return 0; } +/* number of times we will return EPROBE_DEFER when we cannot find the panel */ +static int panel_retries_left = 10; + static int rockchip_dp_bind(struct device *dev, struct device *master, void *data) { @@ -346,7 +349,12 @@ static int rockchip_dp_bind(struct device *dev, struct device *master, if (!panel) { DRM_ERROR("failed to find panel\n"); of_node_put(panel_node); - return -EPROBE_DEFER; + if (panel_retries_left > 0) { + panel_retries_left--; + return -EPROBE_DEFER; + } + DRM_ERROR("failed to find panel: giving up\n"); + return -ENODEV; } of_node_put(panel_node); } |