Commit 1a1ce789 authored by Jagan Teki's avatar Jagan Teki Committed by Inki Dae

drm: exynos: dsi: Restore proper bridge chain order

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: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
Reviewed-by: default avatarFrieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 4aa5fc8d
...@@ -1445,7 +1445,8 @@ static int exynos_dsi_attach(struct drm_bridge *bridge, ...@@ -1445,7 +1445,8 @@ static int exynos_dsi_attach(struct drm_bridge *bridge,
{ {
struct exynos_dsi *dsi = bridge_to_dsi(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 = { static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = {
...@@ -1491,7 +1492,10 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, ...@@ -1491,7 +1492,10 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
drm_bridge_add(&dsi->bridge); 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. * This is a temporary solution and should be made by more generic way.
...@@ -1726,6 +1730,7 @@ static int exynos_dsi_probe(struct platform_device *pdev) ...@@ -1726,6 +1730,7 @@ static int exynos_dsi_probe(struct platform_device *pdev)
dsi->bridge.funcs = &exynos_dsi_bridge_funcs; dsi->bridge.funcs = &exynos_dsi_bridge_funcs;
dsi->bridge.of_node = dev->of_node; dsi->bridge.of_node = dev->of_node;
dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; dsi->bridge.type = DRM_MODE_CONNECTOR_DSI;
dsi->bridge.pre_enable_prev_first = true;
ret = component_add(dev, &exynos_dsi_component_ops); ret = component_add(dev, &exynos_dsi_component_ops);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment