From patchwork Mon Jun 11 13:34:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 10457817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24566601A0 for ; Mon, 11 Jun 2018 13:35:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1526E28477 for ; Mon, 11 Jun 2018 13:35:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09C0428479; Mon, 11 Jun 2018 13:35:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A62A628477 for ; Mon, 11 Jun 2018 13:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2P4mHPR/kcZc3vNv66ZkNt+13ZAt9DOZTBYwwPfO4OQ=; b=ErSTZ9GshlEGAFLjcYji4uHNuL uFnMIxqNYAEIKprY5SjCg0Jnn1PT7YyP2Cu3lfNarisSwfsKLAeZo009aS9ecDSdN6iZyZ9WOpRIv Ilvs/DUNV6hYeVQaMZbM5JscQqPS5Fm7fkxhQOUeLYhcbLNtmTc12a2M4Lhpn7fZb1Ds6VqQUxr2J rE/ZsUOlMRWUA8nHz8Zv5C3EqqRiUsiunUz6l8sPz84wV6l433MlNdpDAj1V3W4U1mXTgEo8PZ0Ly 7cTXpz4uoEBddTQFp89R6SpdOnknyQBSuixJbAt65MEgPXsJaZyQjnFLlzuwe7q0BKCKOnB/C33zv 84fizzLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSMyy-0007b3-HH; Mon, 11 Jun 2018 13:35:40 +0000 Received: from gloria.sntech.de ([95.129.55.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSMyu-0007Qq-A7 for linux-rockchip@lists.infradead.org; Mon, 11 Jun 2018 13:35:39 +0000 Received: from wd0341.dip.tu-dresden.de ([141.76.109.85] helo=phil.dip.tu-dresden.de) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fSMyY-0001rB-Ty; Mon, 11 Jun 2018 15:35:14 +0200 From: Heiko Stuebner To: dri-devel@lists.freedesktop.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 Message-Id: <20180611133502.1292-4-heiko@sntech.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180611133502.1292-1-heiko@sntech.de> References: <20180611133502.1292-1-heiko@sntech.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180611_063536_540237_18178097 X-CRM114-Status: GOOD ( 11.97 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, architt@codeaurora.org, Heiko Stuebner , a.hajda@samsung.com, 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, seanpaul@chromium.org, mka@chromium.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;