Commit c032d846 authored by Sean Anderson's avatar Sean Anderson Committed by Tomi Valkeinen

drm: zynqmp_dp: Adjust training values per-lane

The feedback we get from the DPRX is per-lane. Make changes using this
information, instead of picking the maximum values from all lanes. This
results in more-consistent training on marginal links.
Signed-off-by: default avatarSean Anderson <sean.anderson@linux.dev>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240423171859.3953024-5-sean.anderson@linux.dev
parent 25af9c1a
......@@ -606,19 +606,12 @@ static void zynqmp_dp_adjust_train(struct zynqmp_dp *dp,
u8 link_status[DP_LINK_STATUS_SIZE])
{
u8 *train_set = dp->train_set;
u8 voltage = 0, preemphasis = 0;
u8 i;
for (i = 0; i < dp->mode.lane_cnt; i++) {
u8 v = drm_dp_get_adjust_request_voltage(link_status, i);
u8 p = drm_dp_get_adjust_request_pre_emphasis(link_status, i);
if (v > voltage)
voltage = v;
if (p > preemphasis)
preemphasis = p;
}
u8 voltage = drm_dp_get_adjust_request_voltage(link_status, i);
u8 preemphasis =
drm_dp_get_adjust_request_pre_emphasis(link_status, i);
if (voltage >= DP_TRAIN_VOLTAGE_SWING_LEVEL_3)
voltage |= DP_TRAIN_MAX_SWING_REACHED;
......@@ -626,8 +619,8 @@ static void zynqmp_dp_adjust_train(struct zynqmp_dp *dp,
if (preemphasis >= DP_TRAIN_PRE_EMPH_LEVEL_2)
preemphasis |= DP_TRAIN_MAX_PRE_EMPHASIS_REACHED;
for (i = 0; i < dp->mode.lane_cnt; i++)
train_set[i] = voltage | preemphasis;
}
}
/**
......
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