drm: mxsfb: Silence -EPROBE_DEFER while waiting for bridge
Subsystems (4)
cover drm: mxsfb: Silence -EPROBE_DEFER while waiting for bridge
It can take multiple iterations until all components for an attached DSI bridge are up leading to several:
[ 3.796425] mxsfb 30320000.lcd-controller: Cannot connect bridge: -517 [ 3.816952] mxsfb 30320000.lcd-controller: [drm:mxsfb_probe [mxsfb]] *ERROR* failed to attach bridge: -517
Silence this by checking for -EPROBE_DEFER and using dev_err_probe() so we set a deferred reason in case a dependency fails to probe (which quickly happens on small config/DT changes due to the rather long probe chain which can include bridges, phys, panels, backights, leds, etc.).
This also removes the only DRM_DEV_ERROR() usage, the rest of the driver uses dev_err().
Guido Günther (1):
drm: mxsfb: Silence -EPROBE_DEFER while waiting for bridge
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm: mxsfb: Silence -EPROBE_DEFER while waiting for bridge
It can take multiple iterations until all components for an attached DSI bridge are up leading to several:
[ 3.796425] mxsfb 30320000.lcd-controller: Cannot connect bridge: -517 [ 3.816952] mxsfb 30320000.lcd-controller: [drm:mxsfb_probe [mxsfb]] *ERROR* failed to attach bridge: -517
Silence this by checking for -EPROBE_DEFER and using dev_err_probe() so we set a deferred reason in case a dependency fails to probe (which quickly happens on small config/DT changes due to the rather long probe chain which can include bridges, phys, panels, backights, leds, etc.).
This also removes the only DRM_DEV_ERROR() usage, the rest of the driver uses dev_err().
--- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +4 -6
@@ -134,11 +134,8 @@ static int mxsfb_attach_bridge(struct mxsfb_drm_private *mxsfb)return -ENODEV ; ret =drm_bridge_attach (&mxsfb->encoder, bridge,NULL ,0 ); -if (ret) { -DRM_DEV_ERROR (drm->dev, -"failed to attach bridge: %d\n" , ret); -return ret; - } +if (ret) +return dev_err_probe (drm->dev, ret,"Failed to attach bridge\n" ); mxsfb->bridge = bridge;
@@ -212,7 +209,8 @@ static int mxsfb_load(struct drm_device *drm, ret =mxsfb_attach_bridge (mxsfb);if (ret) { -dev_err (drm->dev,"Cannot connect bridge: %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_err (drm->dev,"Cannot connect bridge: %d\n" , ret); goto err_vblank; }
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 11 lines · Guido Günther
It can take multiple iterations until all components for an attached DSI bridge are up leading to several:
[ 3.796425] mxsfb 30320000.lcd-controller: Cannot connect bridge: -517 [ 3.816952] mxsfb 30320000.lcd-controller: [drm:mxsfb_probe [mxsfb]] *ERROR* failed to attach bridge: -517Silence this by checking for -EPROBE_DEFER and using
dev_err_probe()so we set a deferred reason in case a dependency fails to probe (which quickly happens on small config/DT changes due to the rather long probe chain which can include bridges, phys, panels, backights, leds, etc.).
Quoted 5 lines
This also removes the only
DRM_DEV_ERROR()usage, the rest of the driver usesdev_err().Signed-off-by Guido Günther <[email protected]>Fixes c42001e357f7 ("drm: mxsfb: Use drm_panel_bridge")
Queued up for 5.11, thanks for your patch.
-Daniel
Quoted 35 lines
--- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/mxsfb/mxsfb_drv.c +4
-6@@ -134,11 +134,8 @@ static int mxsfb_attach_bridge(struct mxsfb_drm_private *mxsfb)return -ENODEV ; ret =drm_bridge_attach (&mxsfb->encoder, bridge,NULL ,0 ); -if (ret) { -DRM_DEV_ERROR (drm->dev, -"failed to attach bridge: %d\n" , ret); -return ret; - } +if (ret) +return dev_err_probe (drm->dev, ret,"Failed to attach bridge\n" ); mxsfb->bridge = bridge;@@ -212,7 +209,8 @@ static int mxsfb_load(struct drm_device *drm, ret =mxsfb_attach_bridge (mxsfb);if (ret) { -dev_err (drm->dev,"Cannot connect bridge: %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_err (drm->dev,"Cannot connect bridge: %d\n" , ret); goto err_vblank; }Signature · 1 line
2.29.2
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel