All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: dri-devel@lists.freedesktop.org
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	briannorris@chromium.org, hoegsberg@gmail.com,
	philippe.cornu@st.com, yannick.fertre@st.com,
	linux-rockchip@lists.infradead.org, nickey.yang@rock-chips.com,
	robh+dt@kernel.org, thierry.reding@gmail.com,
	laurent.pinchart@ideasonboard.com, mka@chromium.org
Subject: [PATCH 3/8] drm/bridge/synopsys: dsi: defer probing if panel not available in bridge-attach
Date: Mon, 11 Jun 2018 15:34:57 +0200	[thread overview]
Message-ID: <20180611133502.1292-4-heiko@sntech.de> (raw)
In-Reply-To: <20180611133502.1292-1-heiko@sntech.de>

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@sntech.de>
---
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index 691f67bc2ff9..1b4f6bb7ea59 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -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;
 
-- 
2.17.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-06-11 13:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 13:34 [RFC PATCH 0/8] drm/rockchip: migrate to common dw-mipi-dsi bridge and dual-dsi Heiko Stuebner
2018-06-11 13:34 ` [PATCH 1/8] drm/bridge/synopsys: dsi: move mipi_dsi_host_unregister to __dw_mipi_dsi_remove Heiko Stuebner
2018-06-11 13:34 ` [PATCH 2/8] drm/bridge/synopsys: dsi: don't call __dw_mipi_dsi_probe from dw_mipi_dsi_bind Heiko Stuebner
2018-06-11 13:34 ` Heiko Stuebner [this message]
2018-06-11 13:34 ` [PATCH 4/8] dt-bindings: display: rockchip: update DSI controller Heiko Stuebner
     [not found]   ` <20180611133502.1292-5-heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2018-06-12 22:08     ` Rob Herring
2018-06-11 13:34 ` [PATCH v8 5/8] drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver Heiko Stuebner
     [not found] ` <20180611133502.1292-1-heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2018-06-11 13:35   ` [PATCH 6/8] drm/dsi: add helper function to find the second host in a dual-dsi setup Heiko Stuebner
2018-06-11 13:35     ` Heiko Stuebner
2018-06-11 13:35 ` [PATCH 7/8] drm/bridge/synopsys: dsi: add dual-dsi support Heiko Stuebner
2018-06-11 13:35 ` [PATCH 8/8] drm/rockchip: dsi: add dual mipi support Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180611133502.1292-4-heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hoegsberg@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mka@chromium.org \
    --cc=nickey.yang@rock-chips.com \
    --cc=philippe.cornu@st.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=yannick.fertre@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.