Commit cdfd0e62 authored by Vinod Polimera's avatar Vinod Polimera Committed by Dmitry Baryshkov

drm/msm/dp: use atomic callbacks for DP bridge ops

Use atomic variants for DP bridge callback functions so that
the atomic state can be accessed in the interface drivers.
The atomic state will help the driver find out if the display
is in self refresh state.
Signed-off-by: default avatarSankeerth Billakanti <quic_sbillaka@quicinc.com>
Signed-off-by: default avatarVinod Polimera <quic_vpolimer@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/524731/
Link: https://lore.kernel.org/r/1677774797-31063-9-git-send-email-quic_vpolimer@quicinc.comSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 22cb02bc
...@@ -1652,7 +1652,8 @@ int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, ...@@ -1652,7 +1652,8 @@ int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev,
return 0; return 0;
} }
void dp_bridge_enable(struct drm_bridge *drm_bridge) void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge); struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
struct msm_dp *dp = dp_bridge->dp_display; struct msm_dp *dp = dp_bridge->dp_display;
...@@ -1707,7 +1708,8 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge) ...@@ -1707,7 +1708,8 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge)
mutex_unlock(&dp_display->event_mutex); mutex_unlock(&dp_display->event_mutex);
} }
void dp_bridge_disable(struct drm_bridge *drm_bridge) void dp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge); struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
struct msm_dp *dp = dp_bridge->dp_display; struct msm_dp *dp = dp_bridge->dp_display;
...@@ -1718,7 +1720,8 @@ void dp_bridge_disable(struct drm_bridge *drm_bridge) ...@@ -1718,7 +1720,8 @@ void dp_bridge_disable(struct drm_bridge *drm_bridge)
dp_ctrl_push_idle(dp_display->ctrl); dp_ctrl_push_idle(dp_display->ctrl);
} }
void dp_bridge_post_disable(struct drm_bridge *drm_bridge) void dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge,
struct drm_bridge_state *old_bridge_state)
{ {
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge); struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
struct msm_dp *dp = dp_bridge->dp_display; struct msm_dp *dp = dp_bridge->dp_display;
......
...@@ -94,9 +94,9 @@ static const struct drm_bridge_funcs dp_bridge_ops = { ...@@ -94,9 +94,9 @@ static const struct drm_bridge_funcs dp_bridge_ops = {
.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,
.atomic_reset = drm_atomic_helper_bridge_reset, .atomic_reset = drm_atomic_helper_bridge_reset,
.enable = dp_bridge_enable, .atomic_enable = dp_bridge_atomic_enable,
.disable = dp_bridge_disable, .atomic_disable = dp_bridge_atomic_disable,
.post_disable = dp_bridge_post_disable, .atomic_post_disable = dp_bridge_atomic_post_disable,
.mode_set = dp_bridge_mode_set, .mode_set = dp_bridge_mode_set,
.mode_valid = dp_bridge_mode_valid, .mode_valid = dp_bridge_mode_valid,
.get_modes = dp_bridge_get_modes, .get_modes = dp_bridge_get_modes,
......
...@@ -23,9 +23,12 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr ...@@ -23,9 +23,12 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr
struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev, struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev,
struct drm_encoder *encoder); struct drm_encoder *encoder);
void dp_bridge_enable(struct drm_bridge *drm_bridge); void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
void dp_bridge_disable(struct drm_bridge *drm_bridge); struct drm_bridge_state *old_bridge_state);
void dp_bridge_post_disable(struct drm_bridge *drm_bridge); void dp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
struct drm_bridge_state *old_bridge_state);
void dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge,
struct drm_bridge_state *old_bridge_state);
enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge, enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge,
const struct drm_display_info *info, const struct drm_display_info *info,
const struct drm_display_mode *mode); const struct drm_display_mode *mode);
......
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