Skip to content

Commit 8262b49

Browse files
zehortigozarodrigovivi
authored andcommitted
drm/i915/dp: Return the right vswing tables
DDI ports have its encoders initialized with INTEL_OUTPUT_DDI type and later eDP ports that have the type changed to INTEL_OUTPUT_EDP. But for all other DDI ports it can drive HDMI or DP depending on what user connects to the ports. ehl_get_combo_buf_trans() and tgl_get_combo_buf_trans() was checking for INTEL_OUTPUT_DP that was never true, causing wrong vswing tables being used. So here replacing the INTEL_OUTPUT_DP checks by the valid output types that this functions receives as parameters. HDMI cases will be correctly handled as it do not use encoder->type, instead it calls the functions with INTEL_OUTPUT_HDMI as type parameter and HDMI don't have retraining. v2: changed INTEL_OUTPUT_DDI to INTEL_OUTPUT_EDP and INTEL_OUTPUT_HDMI Fixes: bd3cf6f ("drm/i915/dp/tgl+: Update combo phy vswing tables") Cc: Clinton A Taylor <[email protected]> Cc: Matt Roper <[email protected]> Cc: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: José Roberto de Souza <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 7098811) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 6e8a36c commit 8262b49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/i915/display/intel_ddi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ static const struct cnl_ddi_buf_trans *
947947
ehl_get_combo_buf_trans(struct drm_i915_private *dev_priv, int type, int rate,
948948
int *n_entries)
949949
{
950-
if (type == INTEL_OUTPUT_DP && rate > 270000) {
950+
if (type != INTEL_OUTPUT_HDMI && type != INTEL_OUTPUT_EDP &&
951+
rate > 270000) {
951952
*n_entries = ARRAY_SIZE(ehl_combo_phy_ddi_translations_hbr2_hbr3);
952953
return ehl_combo_phy_ddi_translations_hbr2_hbr3;
953954
}
@@ -959,7 +960,7 @@ static const struct cnl_ddi_buf_trans *
959960
tgl_get_combo_buf_trans(struct drm_i915_private *dev_priv, int type, int rate,
960961
int *n_entries)
961962
{
962-
if (type != INTEL_OUTPUT_DP) {
963+
if (type == INTEL_OUTPUT_HDMI || type == INTEL_OUTPUT_EDP) {
963964
return icl_get_combo_buf_trans(dev_priv, type, rate, n_entries);
964965
} else if (rate > 270000) {
965966
*n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr2);

0 commit comments

Comments
 (0)