Commit 93e97b05 authored by Jagan Teki's avatar Jagan Teki Committed by Robert Foss

drm/bridge: dw-mipi-dsi: Switch to atomic operations

Replace atomic version of the enable/disable operations to
continue the transition to the atomic API.

Also added default drm atomic operations for duplicate, destroy
and reset state API's in order to have smooth transition on
atomic API's.

Tested on Engicam i.Core STM32MP1 SoM.
Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211112061741.120898-1-jagan@amarulasolutions.comReviewed-by: default avatarRobert Foss <robert.foss@linaro.org>
parent d9168aa3
...@@ -871,7 +871,8 @@ static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi) ...@@ -871,7 +871,8 @@ static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)
dsi_write(dsi, DSI_INT_MSK1, 0); dsi_write(dsi, DSI_INT_MSK1, 0);
} }
static void dw_mipi_dsi_bridge_post_disable(struct drm_bridge *bridge) static void dw_mipi_dsi_bridge_post_atomic_disable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge); struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
const struct dw_mipi_dsi_phy_ops *phy_ops = dsi->plat_data->phy_ops; const struct dw_mipi_dsi_phy_ops *phy_ops = dsi->plat_data->phy_ops;
...@@ -978,7 +979,8 @@ static void dw_mipi_dsi_bridge_mode_set(struct drm_bridge *bridge, ...@@ -978,7 +979,8 @@ static void dw_mipi_dsi_bridge_mode_set(struct drm_bridge *bridge,
dw_mipi_dsi_mode_set(dsi->slave, adjusted_mode); dw_mipi_dsi_mode_set(dsi->slave, adjusted_mode);
} }
static void dw_mipi_dsi_bridge_enable(struct drm_bridge *bridge) static void dw_mipi_dsi_bridge_atomic_enable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge); struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
...@@ -1035,9 +1037,12 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge, ...@@ -1035,9 +1037,12 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge,
} }
static const struct drm_bridge_funcs dw_mipi_dsi_bridge_funcs = { static const struct drm_bridge_funcs dw_mipi_dsi_bridge_funcs = {
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
.atomic_reset = drm_atomic_helper_bridge_reset,
.atomic_enable = dw_mipi_dsi_bridge_atomic_enable,
.atomic_post_disable = dw_mipi_dsi_bridge_post_atomic_disable,
.mode_set = dw_mipi_dsi_bridge_mode_set, .mode_set = dw_mipi_dsi_bridge_mode_set,
.enable = dw_mipi_dsi_bridge_enable,
.post_disable = dw_mipi_dsi_bridge_post_disable,
.mode_valid = dw_mipi_dsi_bridge_mode_valid, .mode_valid = dw_mipi_dsi_bridge_mode_valid,
.attach = dw_mipi_dsi_bridge_attach, .attach = dw_mipi_dsi_bridge_attach,
}; };
......
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