[PATCH 2/7] drm/bridge: tc358768: Set pre_enable_prev_first for reverse order

Tomi Valkeinen posted 7 patches 3 months, 3 weeks ago
[PATCH 2/7] drm/bridge: tc358768: Set pre_enable_prev_first for reverse order
Posted by Tomi Valkeinen 3 months, 3 weeks ago
From: Parth Pancholi <parth.pancholi@toradex.com>

Enable the pre_enable_prev_first flag on the tc358768 bridge to reverse
the pre-enable order, calling bridge pre_enable before panel prepare.
This ensures the bridge is ready before sending panel init commands in
the case of panels sending init commands in panel prepare function.

Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 drivers/gpu/drm/bridge/tc358768.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c
index c95d164bd3a0..dab9cdf5cb98 100644
--- a/drivers/gpu/drm/bridge/tc358768.c
+++ b/drivers/gpu/drm/bridge/tc358768.c
@@ -448,6 +448,8 @@ static int tc358768_dsi_host_attach(struct mipi_dsi_host *host,
 						    DRM_MODE_CONNECTOR_DSI);
 		if (IS_ERR(bridge))
 			return PTR_ERR(bridge);
+
+		bridge->pre_enable_prev_first = true;
 	}
 
 	priv->output.dev = dev;

-- 
2.43.0
Re: [PATCH 2/7] drm/bridge: tc358768: Set pre_enable_prev_first for reverse order
Posted by Francesco Dolcini 1 month, 3 weeks ago
On Tue, Oct 21, 2025 at 04:22:58PM +0300, Tomi Valkeinen wrote:
> From: Parth Pancholi <parth.pancholi@toradex.com>
> 
> Enable the pre_enable_prev_first flag on the tc358768 bridge to reverse
> the pre-enable order, calling bridge pre_enable before panel prepare.
> This ensures the bridge is ready before sending panel init commands in
> the case of panels sending init commands in panel prepare function.
> 
> Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>