mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
drm/tegra: dp: Track link capabilities alongside settings
Store capabilities in max_* fields and add separate fields for the currently selected settings. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
1abd6b3304
commit
c728e2d4a6
4 changed files with 39 additions and 28 deletions
|
@ -849,14 +849,14 @@ int drm_dp_aux_train(struct drm_dp_aux *aux, struct drm_dp_link *link,
|
|||
if (tp == DP_TRAINING_PATTERN_DISABLE)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < link->num_lanes; i++)
|
||||
for (i = 0; i < link->lanes; i++)
|
||||
values[i] = DP_TRAIN_MAX_PRE_EMPHASIS_REACHED |
|
||||
DP_TRAIN_PRE_EMPH_LEVEL_0 |
|
||||
DP_TRAIN_MAX_SWING_REACHED |
|
||||
DP_TRAIN_VOLTAGE_SWING_LEVEL_0;
|
||||
|
||||
err = drm_dp_dpcd_write(aux, DP_TRAINING_LANE0_SET, values,
|
||||
link->num_lanes);
|
||||
link->lanes);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
@ -868,13 +868,13 @@ int drm_dp_aux_train(struct drm_dp_aux *aux, struct drm_dp_link *link,
|
|||
|
||||
switch (tp) {
|
||||
case DP_TRAINING_PATTERN_1:
|
||||
if (!drm_dp_clock_recovery_ok(status, link->num_lanes))
|
||||
if (!drm_dp_clock_recovery_ok(status, link->lanes))
|
||||
return -EAGAIN;
|
||||
|
||||
break;
|
||||
|
||||
case DP_TRAINING_PATTERN_2:
|
||||
if (!drm_dp_channel_eq_ok(status, link->num_lanes))
|
||||
if (!drm_dp_channel_eq_ok(status, link->lanes))
|
||||
return -EAGAIN;
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue