From nobody Sun Feb 8 12:31:17 2026 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D79F53644DB; Fri, 6 Feb 2026 12:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770382692; cv=none; b=ZI5ZpZPEyTJOvmHGh+10GaTLATGq5Hg+pfdRhYvFs+RRVqKliSa5qQQ/v0F6788yKBiuY+dFcArmPRx4lBWdpvnAL8edcL1guyTum9zFmHelBMx6VpoHRq7Wsu8fv10mF8x4G8Kf4Wd0Z8hBIrVm18MDxpYgjRmGaPK/NOmeA5Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770382692; c=relaxed/simple; bh=0BCwj7+OybXEwow2+aiHN4hG1F5D6vqrTvgpkGQnl8o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BpwNo4Zu7OF2Qj+VMvP7pHtP42GDaVU1dzdn+LgVvRkNVJomK/dWJQBuz1kjJAG4I+c/mhZ0ofaQfdfV9o1EfJXeIZ6XGKDoR+TLwJq5kn1TDPRWVQIEwonntYJgc+fvyK6axhFAh5lDL+YgsNSFnvbVT/2GlaUSAXoK0yIUflk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=FQtnmZx+; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=Xr/k269h; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="FQtnmZx+"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="Xr/k269h" Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4f6vJx6ppXz9vHM; Fri, 6 Feb 2026 13:58:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1770382690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=llgXl1mE8bc/+pFeFK8Wf0YdvBqmM9KcT1a3EQ5d55c=; b=FQtnmZx+cNsWxhGtEVONGv7U1ygvr9t2SH18ew1lt0NNElAZ8lOz3U4yA/VWb/tg7RwRQj dHLiU+jPkQ5+e8TKv1BZt/IMMbjhpNsS3uc5Z9SGy1RHmV+Y6x810FmjDo9noQRSVrIF7g p0r7vT2fhUZB5h2XOAg3v1l/hvUueyyRDvtJcDE9pr0p+3ONPb/8N/A4kOAc/xnMWLd8ut 7JRbe+ZsSiOFzquGpUwR4rvdZDznY/0GE9eJB27KxD6zin/BGZORcyMgsia8irheMeoaX0 7IzX9hFF+/QruRd9sO/z1LaEvuzPwptbPEu2HY7LoPl0e2D79RoXeJMfgz9GUQ== Authentication-Results: outgoing_mbo_mout; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b="Xr/k269h"; spf=pass (outgoing_mbo_mout: domain of marek.vasut+renesas@mailbox.org designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=marek.vasut+renesas@mailbox.org From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1770382688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=llgXl1mE8bc/+pFeFK8Wf0YdvBqmM9KcT1a3EQ5d55c=; b=Xr/k269h0oQIaFECs9ujS9B7jQDQlNf0KRkSqFXgv8YjiHqa5gqu15zosi9JzmOdHMADMf hgsEQsK0mfXUpQIvDBjknQo250+sUgBR7N2vU4QBrP1iGeaQzSIbhjc5aV6LDWRkG7jgk1 eAzJd2FOxNlD0gjcbcKHcs44GrEhPiyrXPy4feyeVidP1QDCQmmABKXzeIZNV1FZIp/pbZ 4IM+82SOdjbYtpAqDX9EkTvFHFH/PCu5KZb9ll1/KtesWBil4d8urhweQiS50u8FnTd/nO gO1UIDG4LEC6Xt9N3/dhM/wbxcWBPEAasRSe4+29Cau1zOg227eaOWnAcZpdwQ== To: dri-devel@lists.freedesktop.org Cc: Marek Vasut , Luca Ceresoli , Andrzej Hajda , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Robert Foss , Simona Vetter , Thomas Zimmermann , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v2] drm/bridge: waveshare-dsi: Register and attach our DSI device at probe Date: Fri, 6 Feb 2026 13:57:53 +0100 Message-ID: <20260206125801.78705-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: ebf340d77ff1dffcde5 X-MBO-RS-META: h9kizgeey8nho63mht4btn5efcornqr7 X-Rspamd-Queue-Id: 4f6vJx6ppXz9vHM Content-Type: text/plain; charset="utf-8" In order to avoid any probe ordering issue, the best practice is to move the secondary MIPI-DSI device registration and attachment to the MIPI-DSI host at probe time. Besides solving the probe ordering problems, this makes the bridge work with R-Car DU. The R-Car DU will attempt to locate the DSI host bridge in its own rcar_du_probe()->rcar_du_modeset_init()->rcar_du_encoder_init() by calling of_drm_find_bridge() which calls of_drm_find_and_get_bridge() and iterates over bridge_list to locate the DSI host bridge. However, unless the WS driver calls mipi_dsi_attach() in probe(), the DSI host bridge .attach callback rcar_mipi_dsi_host_attach() is not called and the DSI host bridge is not added into bridge_list. Therefore the of_drm_find_and_get_bridge() called from du_probe() will never find the DSI host bridge and probe will indefinitelly fail with -EPROBE_DEFER. The circular dependency here is, that if rcar_du_encoder_init() would manage to find the DSI host bridge, it would call the WS driver .attach callback ws_bridge_bridge_attach(), but this is too late and can never happen. This change avoids the circular dependency. Reviewed-by: Luca Ceresoli Signed-off-by: Marek Vasut --- Note that this is similar to e.g. commit 6ef7ee48765f ("drm/bridge: sn65dsi83: Register and attach our DSI device at= probe") and pretty much what every other DSI-to-DPI bridge does. --- Cc: Andrzej Hajda Cc: David Airlie Cc: Jernej Skrabec Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Luca Ceresoli Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Simona Vetter Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- V2: - Update commit message with issue description - Add RB from Luca --- drivers/gpu/drm/bridge/waveshare-dsi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/waveshare-dsi.c b/drivers/gpu/drm/bridg= e/waveshare-dsi.c index 43f4e7412d722..9254446f54958 100644 --- a/drivers/gpu/drm/bridge/waveshare-dsi.c +++ b/drivers/gpu/drm/bridge/waveshare-dsi.c @@ -80,11 +80,6 @@ static int ws_bridge_bridge_attach(struct drm_bridge *br= idge, enum drm_bridge_attach_flags flags) { struct ws_bridge *ws =3D bridge_to_ws_bridge(bridge); - int ret; - - ret =3D ws_bridge_attach_dsi(ws); - if (ret) - return ret; =20 return drm_bridge_attach(encoder, ws->next_bridge, &ws->bridge, flags); @@ -179,7 +174,7 @@ static int ws_bridge_probe(struct i2c_client *i2c) ws->bridge.of_node =3D dev->of_node; devm_drm_bridge_add(dev, &ws->bridge); =20 - return 0; + return ws_bridge_attach_dsi(ws); } =20 static const struct of_device_id ws_bridge_of_ids[] =3D { --=20 2.51.0