[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210214194102.126146-6-jagan@amarulasolutions.com>
Date: Mon, 15 Feb 2021 01:11:00 +0530
From: Jagan Teki <jagan@...rulasolutions.com>
To: Maxime Ripard <mripard@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...l.net>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>
Cc: dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-amarula@...rulasolutions.com,
Jagan Teki <jagan@...rulasolutions.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>
Subject: [PATCH v3 5/7] drm: bridge: Queue the bridge chain instead of stacking
drm_bridge_attach has stacked the bridge chain, so the bridge
that gets pushed last can trigger its bridge function pre_enable
first from drm_atomic_bridge_chain_pre_enable.
This indeed gives a chance to trigger slave bridge pre_enable
first without triggering its host bridge pre_enable for the
usual host to slave device model like DSI host with panel slave.
For fully enabled bridge drivers, host bridge pre_enable has all
host related clock, reset, PHY configuration code that needs to
initialized before sending commands or configuration from a slave
to communicate its host.
Queue the bridge chain instead of stacking it so-that the bridges
that got enqueued first can have a chance to trigger first.
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@...e.de>
Signed-off-by: Jagan Teki <jagan@...rulasolutions.com>
---
Changes for v3:
- new patch
drivers/gpu/drm/drm_bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index 64f0effb52ac..e75d1a080c55 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -191,9 +191,9 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
bridge->encoder = encoder;
if (previous)
- list_add(&bridge->chain_node, &previous->chain_node);
+ list_add_tail(&bridge->chain_node, &previous->chain_node);
else
- list_add(&bridge->chain_node, &encoder->bridge_chain);
+ list_add_tail(&bridge->chain_node, &encoder->bridge_chain);
if (bridge->funcs->attach) {
ret = bridge->funcs->attach(bridge, flags);
--
2.25.1
Powered by blists - more mailing lists