mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 16:07:27 +07:00
drm/i915/dp: Fix eDP on PCH DP on CPT/PPT
According to the gen6 docs, only the DP_A port (on-CPU eDP) still uses the old IBX bit shift for the link training pattern setup bits. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
1c95822afe
commit
82d165557e
@ -829,7 +829,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
|
|||||||
if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
|
if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
|
||||||
intel_dp->DP |= DP_SYNC_VS_HIGH;
|
intel_dp->DP |= DP_SYNC_VS_HIGH;
|
||||||
|
|
||||||
if (HAS_PCH_CPT(dev) && !is_edp(intel_dp))
|
if (HAS_PCH_CPT(dev) && !is_cpu_edp(intel_dp))
|
||||||
intel_dp->DP |= DP_LINK_TRAIN_OFF_CPT;
|
intel_dp->DP |= DP_LINK_TRAIN_OFF_CPT;
|
||||||
else
|
else
|
||||||
intel_dp->DP |= DP_LINK_TRAIN_OFF;
|
intel_dp->DP |= DP_LINK_TRAIN_OFF;
|
||||||
@ -1558,7 +1558,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
|
|||||||
DP_LINK_CONFIGURATION_SIZE);
|
DP_LINK_CONFIGURATION_SIZE);
|
||||||
|
|
||||||
DP |= DP_PORT_EN;
|
DP |= DP_PORT_EN;
|
||||||
if (HAS_PCH_CPT(dev) && !is_edp(intel_dp))
|
if (HAS_PCH_CPT(dev) && !is_cpu_edp(intel_dp))
|
||||||
DP &= ~DP_LINK_TRAIN_MASK_CPT;
|
DP &= ~DP_LINK_TRAIN_MASK_CPT;
|
||||||
else
|
else
|
||||||
DP &= ~DP_LINK_TRAIN_MASK;
|
DP &= ~DP_LINK_TRAIN_MASK;
|
||||||
@ -1577,7 +1577,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
|
|||||||
DP = (DP & ~(DP_VOLTAGE_MASK|DP_PRE_EMPHASIS_MASK)) | signal_levels;
|
DP = (DP & ~(DP_VOLTAGE_MASK|DP_PRE_EMPHASIS_MASK)) | signal_levels;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HAS_PCH_CPT(dev) && !is_edp(intel_dp))
|
if (HAS_PCH_CPT(dev) && !is_cpu_edp(intel_dp))
|
||||||
reg = DP | DP_LINK_TRAIN_PAT_1_CPT;
|
reg = DP | DP_LINK_TRAIN_PAT_1_CPT;
|
||||||
else
|
else
|
||||||
reg = DP | DP_LINK_TRAIN_PAT_1;
|
reg = DP | DP_LINK_TRAIN_PAT_1;
|
||||||
@ -1652,7 +1652,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
|
|||||||
DP = (DP & ~(DP_VOLTAGE_MASK|DP_PRE_EMPHASIS_MASK)) | signal_levels;
|
DP = (DP & ~(DP_VOLTAGE_MASK|DP_PRE_EMPHASIS_MASK)) | signal_levels;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HAS_PCH_CPT(dev) && !is_edp(intel_dp))
|
if (HAS_PCH_CPT(dev) && !is_cpu_edp(intel_dp))
|
||||||
reg = DP | DP_LINK_TRAIN_PAT_2_CPT;
|
reg = DP | DP_LINK_TRAIN_PAT_2_CPT;
|
||||||
else
|
else
|
||||||
reg = DP | DP_LINK_TRAIN_PAT_2;
|
reg = DP | DP_LINK_TRAIN_PAT_2;
|
||||||
@ -1693,7 +1693,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
|
|||||||
++tries;
|
++tries;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HAS_PCH_CPT(dev) && !is_edp(intel_dp))
|
if (HAS_PCH_CPT(dev) && !is_cpu_edp(intel_dp))
|
||||||
reg = DP | DP_LINK_TRAIN_OFF_CPT;
|
reg = DP | DP_LINK_TRAIN_OFF_CPT;
|
||||||
else
|
else
|
||||||
reg = DP | DP_LINK_TRAIN_OFF;
|
reg = DP | DP_LINK_TRAIN_OFF;
|
||||||
@ -1723,7 +1723,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
|
|||||||
udelay(100);
|
udelay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HAS_PCH_CPT(dev) && !is_edp(intel_dp)) {
|
if (HAS_PCH_CPT(dev) && !is_cpu_edp(intel_dp)) {
|
||||||
DP &= ~DP_LINK_TRAIN_MASK_CPT;
|
DP &= ~DP_LINK_TRAIN_MASK_CPT;
|
||||||
I915_WRITE(intel_dp->output_reg, DP | DP_LINK_TRAIN_PAT_IDLE_CPT);
|
I915_WRITE(intel_dp->output_reg, DP | DP_LINK_TRAIN_PAT_IDLE_CPT);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user