Commit 3625a1f5 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Fix DP_TRAIN_MAX_{PRE_EMPHASIS,SWING}_REACHED handling

The DP spec says:
"The transmitter shall support at least three levels of voltage
 swing (Levels 0, 1, and 2).

 If only three levels of voltage swing are supported (VOLTAGE
 SWING SET field (bits 1:0) are programmed to 10 (Level 2)),
 this bit shall be set to 1, and cleared in all other cases.

 If all four levels of voltage swing are supported (VOLTAGE
 SWING SET field (bits 1:0) are programmed to 11 (Level 3)),
 this bit shall be set to 1,and cleared in all other cases."

Let's follow that exactly instead of the current apporach
where we can set those also for vswing/preemph levels 0 or 1
(or 2 when the platform max is 3).
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-7-ville.syrjala@linux.intel.comReviewed-by: default avatarImre Deak <imre.deak@intel.com>
parent 0f69403d
...@@ -67,8 +67,9 @@ void intel_dp_get_adjust_train(struct intel_dp *intel_dp, ...@@ -67,8 +67,9 @@ void intel_dp_get_adjust_train(struct intel_dp *intel_dp,
if (p >= preemph_max) if (p >= preemph_max)
p = preemph_max | DP_TRAIN_MAX_PRE_EMPHASIS_REACHED; p = preemph_max | DP_TRAIN_MAX_PRE_EMPHASIS_REACHED;
voltage_max = min(intel_dp->voltage_max(intel_dp), v = min(v, dp_voltage_max(p));
dp_voltage_max(p));
voltage_max = intel_dp->voltage_max(intel_dp);
if (v >= voltage_max) if (v >= voltage_max)
v = voltage_max | DP_TRAIN_MAX_SWING_REACHED; v = voltage_max | DP_TRAIN_MAX_SWING_REACHED;
......
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