drm/bridge/synopsys: dsi: defer probing if panel not

A patch from »drm/rockchip: migrate to common dw-mipi-dsi bridge and dual-dsi« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Mon, 4 Jun 2018 11:11:35 +0200

Commit-Message

When the panel-driver is build as a module it currently fails hard as the panel cannot be probed directly: dw_mipi_dsi_bind() __dw_mipi_dsi_probe() creates dsi bus creates panel device triggers panel module load panel not probed (module not loaded or panel probe slow) drm_bridge_attach fails with -EINVAL due to empty panel_bridge So emit a -EPROBE_DEFER in that case to give the driver another chance at getting the display later. Signed-off-by: Heiko Stuebner <heiko@...>

Patch-Comment

drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 +++ 1 file changed, 3 insertions(+)

Statistics

  • 3 lines added
  • 0 lines removed

Changes

---------------- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c -----------------
index 691f67bc2ff9..1b4f6bb7ea59 100644
@@ -839,6 +839,9 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge)
return -ENODEV;
}
+ if (!dsi->panel_bridge)
+ return -EPROBE_DEFER;
+
/* Set the encoder type as caller does not know it */
bridge->encoder->encoder_type = DRM_MODE_ENCODER_DSI;
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...