Commit a6ea7d26 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Robert Foss

drm: bridge: ti-sn65dsi83: Switch to atomic operations

Use the atomic version of the enable/disable operations to continue the
transition to the atomic API, started with the introduction of
.atomic_get_input_bus_fmts(). This will be needed to access the mode
from the atomic state.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210621125518.13715-4-laurent.pinchart@ideasonboard.com
parent 7f0b7f5e
...@@ -291,7 +291,8 @@ static int sn65dsi83_attach(struct drm_bridge *bridge, ...@@ -291,7 +291,8 @@ static int sn65dsi83_attach(struct drm_bridge *bridge,
return ret; return ret;
} }
static void sn65dsi83_pre_enable(struct drm_bridge *bridge) static void sn65dsi83_atomic_pre_enable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge);
...@@ -366,7 +367,8 @@ static u8 sn65dsi83_get_dsi_div(struct sn65dsi83 *ctx) ...@@ -366,7 +367,8 @@ static u8 sn65dsi83_get_dsi_div(struct sn65dsi83 *ctx)
return dsi_div - 1; return dsi_div - 1;
} }
static void sn65dsi83_enable(struct drm_bridge *bridge) static void sn65dsi83_atomic_enable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge);
unsigned int pval; unsigned int pval;
...@@ -475,7 +477,8 @@ static void sn65dsi83_enable(struct drm_bridge *bridge) ...@@ -475,7 +477,8 @@ static void sn65dsi83_enable(struct drm_bridge *bridge)
regmap_write(ctx->regmap, REG_IRQ_STAT, pval); regmap_write(ctx->regmap, REG_IRQ_STAT, pval);
} }
static void sn65dsi83_disable(struct drm_bridge *bridge) static void sn65dsi83_atomic_disable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge);
...@@ -484,7 +487,8 @@ static void sn65dsi83_disable(struct drm_bridge *bridge) ...@@ -484,7 +487,8 @@ static void sn65dsi83_disable(struct drm_bridge *bridge)
regmap_write(ctx->regmap, REG_RC_PLL_EN, 0x00); regmap_write(ctx->regmap, REG_RC_PLL_EN, 0x00);
} }
static void sn65dsi83_post_disable(struct drm_bridge *bridge) static void sn65dsi83_atomic_post_disable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge);
...@@ -575,13 +579,13 @@ sn65dsi83_atomic_get_input_bus_fmts(struct drm_bridge *bridge, ...@@ -575,13 +579,13 @@ sn65dsi83_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
} }
static const struct drm_bridge_funcs sn65dsi83_funcs = { static const struct drm_bridge_funcs sn65dsi83_funcs = {
.attach = sn65dsi83_attach, .attach = sn65dsi83_attach,
.pre_enable = sn65dsi83_pre_enable, .atomic_pre_enable = sn65dsi83_atomic_pre_enable,
.enable = sn65dsi83_enable, .atomic_enable = sn65dsi83_atomic_enable,
.disable = sn65dsi83_disable, .atomic_disable = sn65dsi83_atomic_disable,
.post_disable = sn65dsi83_post_disable, .atomic_post_disable = sn65dsi83_atomic_post_disable,
.mode_valid = sn65dsi83_mode_valid, .mode_valid = sn65dsi83_mode_valid,
.mode_set = sn65dsi83_mode_set, .mode_set = sn65dsi83_mode_set,
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment