Skip to content

Commit 8a4b2fc

Browse files
Marek Vasutrobertfoss
authored andcommitted
drm/bridge: tc358762: Split register programming from pre-enable to enable
Move the register programming part, which actually enables the bridge and makes it push data out of its DPI side, into the enable callback. The DSI host like DSIM may not be able to transmit commands in pre_enable, moving the register programming into enable assures it can transmit commands. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a4c253d commit 8a4b2fc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/gpu/drm/bridge/tc358762.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,17 @@ static void tc358762_pre_enable(struct drm_bridge *bridge)
162162
usleep_range(5000, 10000);
163163
}
164164

165+
ctx->pre_enabled = true;
166+
}
167+
168+
static void tc358762_enable(struct drm_bridge *bridge)
169+
{
170+
struct tc358762 *ctx = bridge_to_tc358762(bridge);
171+
int ret;
172+
165173
ret = tc358762_init(ctx);
166174
if (ret < 0)
167175
dev_err(ctx->dev, "error initializing bridge (%d)\n", ret);
168-
169-
ctx->pre_enabled = true;
170176
}
171177

172178
static int tc358762_attach(struct drm_bridge *bridge,
@@ -181,6 +187,7 @@ static int tc358762_attach(struct drm_bridge *bridge,
181187
static const struct drm_bridge_funcs tc358762_bridge_funcs = {
182188
.post_disable = tc358762_post_disable,
183189
.pre_enable = tc358762_pre_enable,
190+
.enable = tc358762_enable,
184191
.attach = tc358762_attach,
185192
};
186193

0 commit comments

Comments
 (0)