diff options
author | Rob Clark <robdclark@gmail.com> | 2014-12-02 18:50:30 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2015-02-01 23:32:44 +0300 |
commit | a5ec308ac15d7abf6b801a15e027fe9534cc35a8 (patch) | |
tree | 8f19be45e8b32ae228b3058a7df1ce014659503c | |
parent | 0045398131e48cba3d759a2ad435d8b45640652e (diff) | |
download | linux-a5ec308ac15d7abf6b801a15e027fe9534cc35a8.tar.xz |
drm/msm/dp: use link power helpers
Now that we have a helper for drm_dp_link_power_down(), use dp helpers
instead of rolling our own.
Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r-- | drivers/gpu/drm/msm/edp/edp_ctrl.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/gpu/drm/msm/edp/edp_ctrl.c b/drivers/gpu/drm/msm/edp/edp_ctrl.c index 5e0f89ea89e5..3e246210c46f 100644 --- a/drivers/gpu/drm/msm/edp/edp_ctrl.c +++ b/drivers/gpu/drm/msm/edp/edp_ctrl.c @@ -458,23 +458,6 @@ static void edp_fill_link_cfg(struct edp_ctrl *ctrl) DBG("rate=%d lane=%d", ctrl->link_rate, ctrl->lane_cnt); } -static int edp_sink_power_state(struct edp_ctrl *ctrl, u8 state) -{ - u8 s = state; - - DBG("%d", s); - - if (ctrl->dp_link.revision < 0x11) - return 0; - - if (drm_dp_dpcd_write(ctrl->drm_aux, DP_SET_POWER, &s, 1) < 1) { - pr_err("%s: Set power state to panel failed\n", __func__); - return -ENOLINK; - } - - return 0; -} - static void edp_config_ctrl(struct edp_ctrl *ctrl) { u32 data; @@ -1008,7 +991,7 @@ static void edp_ctrl_on_worker(struct work_struct *work) edp_ctrl_link_enable(ctrl, 1); edp_ctrl_irq_enable(ctrl, 1); - ret = edp_sink_power_state(ctrl, DP_SET_POWER_D0); + ret = drm_dp_link_power_up(ctrl->drm_aux, &ctrl->dp_link); if (ret) goto fail; @@ -1055,7 +1038,7 @@ static void edp_ctrl_off_worker(struct work_struct *work) edp_state_ctrl(ctrl, 0); - edp_sink_power_state(ctrl, DP_SET_POWER_D3); + drm_dp_link_power_down(ctrl->drm_aux, &ctrl->dp_link); edp_ctrl_irq_enable(ctrl, 0); |