Skip to content

Commit

Permalink
drm/i915: Disable LTTPR support when the LTTPR rev < 1.4
Browse files Browse the repository at this point in the history
By the specification the 0xF0000 - 0xF02FF range is only valid if the
LTTPR revision at 0xF0000 is at least 1.4. Disable the LTTPR support
otherwise.

Fixes: 7b2a4ab ("drm/i915: Switch to LTTPR transparent mode link training")
Cc: <[email protected]> # v5.11
Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 1663ad4)
Signed-off-by: Rodrigo Vivi <[email protected]>
  • Loading branch information
ideak authored and jackpot51 committed Apr 1, 2021
1 parent ee5716c commit 8818780
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions drivers/gpu/drm/i915/display/intel_dp_link_training.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,23 @@ static void intel_dp_read_lttpr_phy_caps(struct intel_dp *intel_dp,
static bool intel_dp_read_lttpr_common_caps(struct intel_dp *intel_dp)
{
if (drm_dp_read_lttpr_common_caps(&intel_dp->aux,
intel_dp->lttpr_common_caps) < 0) {
intel_dp_reset_lttpr_common_caps(intel_dp);
return false;
}
intel_dp->lttpr_common_caps) < 0)
goto reset_caps;

drm_dbg_kms(&dp_to_i915(intel_dp)->drm,
"LTTPR common capabilities: %*ph\n",
(int)sizeof(intel_dp->lttpr_common_caps),
intel_dp->lttpr_common_caps);

/* The minimum value of LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV is 1.4 */
if (intel_dp->lttpr_common_caps[0] < 0x14)
goto reset_caps;

return true;

reset_caps:
intel_dp_reset_lttpr_common_caps(intel_dp);
return false;
}

static bool
Expand Down

0 comments on commit 8818780

Please sign in to comment.