Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	Inki Dae <inki.dae@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Neil Armstrong <narmstrong@linaro.org>,
	Robert Foss <robert.foss@linaro.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: Marek Vasut <marex@denx.de>,
	linux-samsung-soc@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-amarula <linux-amarula@amarulasolutions.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v11 3/3] drm: exynos: dsi: Restore proper bridge chain order
Date: Mon, 12 Dec 2022 23:59:23 +0530	[thread overview]
Message-ID: <20221212182923.29155-4-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20221212182923.29155-1-jagan@amarulasolutions.com>

Restore the proper bridge chain by finding the previous bridge
in the chain instead of passing NULL.

This establishes a proper bridge chain while attaching downstream
bridges.

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v11:
- add bridge.pre_enable_prev_first
Changes for v10:
- collect Marek review tag

 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index ec673223d6b7..9d10a89d28f1 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1428,7 +1428,8 @@ static int exynos_dsi_attach(struct drm_bridge *bridge,
 {
 	struct exynos_dsi *dsi = bridge_to_dsi(bridge);
 
-	return drm_bridge_attach(bridge->encoder, dsi->out_bridge, NULL, flags);
+	return drm_bridge_attach(bridge->encoder, dsi->out_bridge, bridge,
+				 flags);
 }
 
 static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = {
@@ -1474,7 +1475,10 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
 
 	drm_bridge_add(&dsi->bridge);
 
-	drm_bridge_attach(encoder, &dsi->bridge, NULL, 0);
+	drm_bridge_attach(encoder, &dsi->bridge,
+			  list_first_entry_or_null(&encoder->bridge_chain,
+						   struct drm_bridge,
+						   chain_node), 0);
 
 	/*
 	 * This is a temporary solution and should be made by more generic way.
@@ -1709,6 +1713,7 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 	dsi->bridge.funcs = &exynos_dsi_bridge_funcs;
 	dsi->bridge.of_node = dev->of_node;
 	dsi->bridge.type = DRM_MODE_CONNECTOR_DSI;
+	dsi->bridge.pre_enable_prev_first = true;
 
 	ret = component_add(dev, &exynos_dsi_component_ops);
 	if (ret)
-- 
2.25.1


  parent reply	other threads:[~2022-12-12 18:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 18:29 [PATCH v11 0/3] drm: exynos: dsi: Restore the bridge chain Jagan Teki
2022-12-12 18:29 ` [PATCH v11 1/3] drm: panel: Enable prepare_prev_first flag for samsung-s6e panels Jagan Teki
2022-12-14  8:48   ` Frieder Schrempf
2022-12-12 18:29 ` [PATCH v11 2/3] drm/bridge: tc358764: Enable pre_enable_prev_first flag Jagan Teki
2022-12-14  8:48   ` Frieder Schrempf
2022-12-12 18:29 ` Jagan Teki [this message]
2022-12-14  8:50   ` [PATCH v11 3/3] drm: exynos: dsi: Restore proper bridge chain order Frieder Schrempf
2023-01-20 18:56   ` Dave Stevenson
2023-01-20 19:09     ` Jagan Teki
2023-01-20 19:42       ` Dave Stevenson
2023-01-23  9:16         ` Frieder Schrempf
2023-01-23 10:34         ` Jagan Teki
2023-01-06 17:56 ` [PATCH v11 0/3] drm: exynos: dsi: Restore the bridge chain Jagan Teki
2023-01-12  2:26   ` 대인기/Tizen Platform Lab(SR)/삼성전자
2023-01-19 18:19     ` Jagan Teki
2023-01-26  6:20       ` 대인기/Tizen Platform Lab(SR)/삼성전자

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=20221212182923.29155-4-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=marex@denx.de \
    --cc=narmstrong@linaro.org \
    --cc=robert.foss@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=sw0312.kim@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox