diff options
author | Marek Vasut <marex@denx.de> | 2023-06-15 23:18:58 +0300 |
---|---|---|
committer | Robert Foss <rfoss@kernel.org> | 2023-06-22 12:13:26 +0300 |
commit | 8a4b2fc9c91afb3b0509dfc0ea59dcb5a9f1a48e (patch) | |
tree | 34b860ad743e130231a6ae7a41b67b38ce1b8874 /drivers/gpu/drm/bridge | |
parent | a4c253d4f39dc656c0bd2aee9c9a6c7ee7a7c1bc (diff) | |
download | linux-8a4b2fc9c91afb3b0509dfc0ea59dcb5a9f1a48e.tar.xz |
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 <marex@denx.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201902.566182-1-marex@denx.de
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r-- | drivers/gpu/drm/bridge/tc358762.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c index 5641395fd310..df9703eacab1 100644 --- a/drivers/gpu/drm/bridge/tc358762.c +++ b/drivers/gpu/drm/bridge/tc358762.c @@ -162,11 +162,17 @@ static void tc358762_pre_enable(struct drm_bridge *bridge) usleep_range(5000, 10000); } + ctx->pre_enabled = true; +} + +static void tc358762_enable(struct drm_bridge *bridge) +{ + struct tc358762 *ctx = bridge_to_tc358762(bridge); + int ret; + ret = tc358762_init(ctx); if (ret < 0) dev_err(ctx->dev, "error initializing bridge (%d)\n", ret); - - ctx->pre_enabled = true; } static int tc358762_attach(struct drm_bridge *bridge, @@ -181,6 +187,7 @@ static int tc358762_attach(struct drm_bridge *bridge, static const struct drm_bridge_funcs tc358762_bridge_funcs = { .post_disable = tc358762_post_disable, .pre_enable = tc358762_pre_enable, + .enable = tc358762_enable, .attach = tc358762_attach, }; |