All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/bridge: Fix drm_bridge_chain_pre_enable()
@ 2019-12-27 14:41 Boris Brezillon
  2019-12-27 14:41 ` [PATCH 2/3] drm/vc4: dsi: Fix bridge chain handling Boris Brezillon
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Boris Brezillon @ 2019-12-27 14:41 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, Marek Szyprowski, Eric Anholt
  Cc: Boris Brezillon, dri-devel

Stop iterating on the bridge chain when we reach the bridge element.
That's what other helpers do and should allow bridge implementations
to execute a pre_enable operation on a sub-chain.

Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/gpu/drm/drm_bridge.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index c2cf0c90fa26..b3b269ec6a39 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -357,6 +357,9 @@ void drm_bridge_chain_pre_enable(struct drm_bridge *bridge)
 	list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) {
 		if (iter->funcs->pre_enable)
 			iter->funcs->pre_enable(iter);
+
+		if (iter == bridge)
+			break;
 	}
 }
 EXPORT_SYMBOL(drm_bridge_chain_pre_enable);
-- 
2.23.0

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-01-07 15:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-27 14:41 [PATCH 1/3] drm/bridge: Fix drm_bridge_chain_pre_enable() Boris Brezillon
2019-12-27 14:41 ` [PATCH 2/3] drm/vc4: dsi: Fix bridge chain handling Boris Brezillon
2020-01-07 15:17   ` Andrzej Hajda
2019-12-27 14:41 ` [PATCH 3/3] drm/exynos: " Boris Brezillon
2020-01-06  7:41   ` Boris Brezillon
2020-01-07  9:11   ` Marek Szyprowski
2020-01-07 13:34     ` Boris Brezillon
2020-01-07 14:30   ` Andrzej Hajda
2020-01-06 10:29 ` [PATCH 1/3] drm/bridge: Fix drm_bridge_chain_pre_enable() Laurent Pinchart
2020-01-07 15:27   ` Andrzej Hajda
2020-01-07 15:33     ` Boris Brezillon

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.