Commit 1932250d authored by zain wang's avatar zain wang Committed by Andrzej Hajda

drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode

Enhanced mode is required by the eDP 1.2 specification, and not doing it
early could result in a period of time where we have a link transmitting
idle packets without it. Since there is no reason to disable it, we just
enable it at the beginning of link training and then keep it on all the
time.

Cc: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: default avatarzain wang <wzz@rock-chips.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarThierry Escande <thierry.escande@collabora.com>
Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: default avatarArchit Taneja <architt@codeaurora.org>
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-10-enric.balletbo@collabora.com
parent 606c5e64
...@@ -281,6 +281,8 @@ static int analogix_dp_link_start(struct analogix_dp_device *dp) ...@@ -281,6 +281,8 @@ static int analogix_dp_link_start(struct analogix_dp_device *dp)
retval = drm_dp_dpcd_write(&dp->aux, DP_LINK_BW_SET, buf, 2); retval = drm_dp_dpcd_write(&dp->aux, DP_LINK_BW_SET, buf, 2);
if (retval < 0) if (retval < 0)
return retval; return retval;
/* set enhanced mode if available */
analogix_dp_set_enhanced_mode(dp);
/* Set TX pre-emphasis to minimum */ /* Set TX pre-emphasis to minimum */
for (lane = 0; lane < lane_count; lane++) for (lane = 0; lane < lane_count; lane++)
...@@ -593,8 +595,6 @@ static int analogix_dp_process_equalizer_training(struct analogix_dp_device *dp) ...@@ -593,8 +595,6 @@ static int analogix_dp_process_equalizer_training(struct analogix_dp_device *dp)
dev_dbg(dp->dev, "fast link training %s\n", dev_dbg(dp->dev, "fast link training %s\n",
dp->fast_train_enable ? "supported" : "unsupported"); dp->fast_train_enable ? "supported" : "unsupported");
/* set enhanced mode if available */
analogix_dp_set_enhanced_mode(dp);
dp->link_train.lt_state = FINISHED; dp->link_train.lt_state = FINISHED;
return 0; return 0;
...@@ -940,8 +940,6 @@ static int analogix_dp_commit(struct analogix_dp_device *dp) ...@@ -940,8 +940,6 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
} }
analogix_dp_enable_scramble(dp, 1); analogix_dp_enable_scramble(dp, 1);
analogix_dp_enable_rx_to_enhanced_mode(dp, 1);
analogix_dp_enable_enhanced_mode(dp, 1);
analogix_dp_init_video(dp); analogix_dp_init_video(dp);
ret = analogix_dp_config_video(dp); ret = analogix_dp_config_video(dp);
......
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