summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du/rcar_du_kms.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-12-11 01:26:04 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-12-23 12:01:48 +0200
commit347d761c74f75d55a36350ae7505498bd56b33ec (patch)
tree6f608cba5fd2960c2dd35dafdc6b505f470f0339 /drivers/gpu/drm/rcar-du/rcar_du_kms.c
parent3b2b36e5f0ba60f5a7a770ab1bae3264b8d090b8 (diff)
downloadop-kernel-dev-347d761c74f75d55a36350ae7505498bd56b33ec.zip
op-kernel-dev-347d761c74f75d55a36350ae7505498bd56b33ec.tar.gz
drm: rcar-du: Don't fail probe in case of partial encoder init error
If an encoder fails to initialize the device can still be used without the failed encoder. Don't propagate the error out of the probe function but just skip the failed encoder. As a special case a deferred probe request from the encoder is still propagated out of the probe function in order not to break the deferred probing mechanism. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_kms.c')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_kms.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index 0c5ee61..cc9136e 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -346,8 +346,14 @@ static int rcar_du_encoders_init(struct rcar_du_device *rcdu)
/* Process the output pipeline. */
ret = rcar_du_encoders_init_one(rcdu, output, &ep);
if (ret < 0) {
- of_node_put(ep_node);
- return ret;
+ if (ret == -EPROBE_DEFER) {
+ of_node_put(ep_node);
+ return ret;
+ }
+
+ dev_info(rcdu->dev,
+ "encoder initialization failed, skipping\n");
+ continue;
}
num_encoders += ret;
@@ -413,6 +419,11 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
if (ret < 0)
return ret;
+ if (ret == 0) {
+ dev_err(rcdu->dev, "error: no encoder could be initialized\n");
+ return -EINVAL;
+ }
+
num_encoders = ret;
/* Set the possible CRTCs and possible clones. There's always at least
OpenPOWER on IntegriCloud