[PATCH v2 1/1] drm/bridge: Silence error messages upon probe deferral
Alexander Stein
alexander.stein at ew.tq-group.com
Tue Aug 22 11:52:00 UTC 2023
When -EPROBE_DEFER is returned do not raise an error, but silently return
this error instead. Fixes error like this:
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc at 0/bus at 30800000/mipi-dsi at 30a00000 to encoder None-34: -517
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc at 0/bus at 30800000/mipi-dsi at 30a00000 to encoder None-34: -517
Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
---
Changes in v2:
* Adjust the indentation
Considering Laurent's input IMHO -517 should not occur when using component
framework, e.g. drivers/gpu/drm/mcde/mcde_drv.c. This should warrant to only
print an error if it is not deferred probe.
dev_err_probe() sounds reasonable, but this is something which should be done
in drivers. It is also arguable if this message is "hidden" within a debug
statement.
drivers/gpu/drm/drm_bridge.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index 39e68e45bb124..132180a03c0eb 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -352,13 +352,15 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
bridge->encoder = NULL;
list_del(&bridge->chain_node);
+ if (ret != -EPROBE_DEFER) {
#ifdef CONFIG_OF
- DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n",
- bridge->of_node, encoder->name, ret);
+ DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n",
+ bridge->of_node, encoder->name, ret);
#else
- DRM_ERROR("failed to attach bridge to encoder %s: %d\n",
- encoder->name, ret);
+ DRM_ERROR("failed to attach bridge to encoder %s: %d\n",
+ encoder->name, ret);
#endif
+ }
return ret;
}
--
2.34.1
More information about the dri-devel
mailing list