Commit 82c421ba authored by Michael Strauss's avatar Michael Strauss Committed by Alex Deucher

drm/amd/display: Add fallback defaults for invalid LTTPR DPCD caps

[WHY]
Some sinks are observed to return invalid LTTPR revision and/or invalid
LTTPR link rate capabilities.

[HOW]
Assume any LTTPR which reports invalid max link rate supports HBR3.
Don't validate LTTPR DPCD revision in dp_is_lttpr_present check.
Reviewed-by: default avatarGeorge Shen <george.shen@amd.com>
Reviewed-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Acked-by: default avatarZaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: default avatarMichael Strauss <michael.strauss@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 396477d9
...@@ -363,10 +363,10 @@ bool dp_is_128b_132b_signal(struct pipe_ctx *pipe_ctx) ...@@ -363,10 +363,10 @@ bool dp_is_128b_132b_signal(struct pipe_ctx *pipe_ctx)
bool dp_is_lttpr_present(struct dc_link *link) bool dp_is_lttpr_present(struct dc_link *link)
{ {
/* Some sink devices report invalid LTTPR revision, so don't validate against that cap */
return (dp_parse_lttpr_repeater_count(link->dpcd_caps.lttpr_caps.phy_repeater_cnt) != 0 && return (dp_parse_lttpr_repeater_count(link->dpcd_caps.lttpr_caps.phy_repeater_cnt) != 0 &&
link->dpcd_caps.lttpr_caps.max_lane_count > 0 && link->dpcd_caps.lttpr_caps.max_lane_count > 0 &&
link->dpcd_caps.lttpr_caps.max_lane_count <= 4 && link->dpcd_caps.lttpr_caps.max_lane_count <= 4);
link->dpcd_caps.lttpr_caps.revision.raw >= 0x14);
} }
/* in DP compliance test, DPR-120 may have /* in DP compliance test, DPR-120 may have
...@@ -399,7 +399,20 @@ static enum dc_link_rate get_link_rate_from_max_link_bw( ...@@ -399,7 +399,20 @@ static enum dc_link_rate get_link_rate_from_max_link_bw(
static enum dc_link_rate get_lttpr_max_link_rate(struct dc_link *link) static enum dc_link_rate get_lttpr_max_link_rate(struct dc_link *link)
{ {
enum dc_link_rate lttpr_max_link_rate = link->dpcd_caps.lttpr_caps.max_link_rate;
enum dc_link_rate lttpr_max_link_rate = LINK_RATE_UNKNOWN;
switch (link->dpcd_caps.lttpr_caps.max_link_rate) {
case LINK_RATE_LOW:
case LINK_RATE_HIGH:
case LINK_RATE_HIGH2:
case LINK_RATE_HIGH3:
lttpr_max_link_rate = link->dpcd_caps.lttpr_caps.max_link_rate;
break;
default:
// Assume all LTTPRs support up to HBR3 to improve misbehaving sink interop
lttpr_max_link_rate = LINK_RATE_HIGH3;
}
if (link->dpcd_caps.lttpr_caps.supported_128b_132b_rates.bits.UHBR20) if (link->dpcd_caps.lttpr_caps.supported_128b_132b_rates.bits.UHBR20)
lttpr_max_link_rate = LINK_RATE_UHBR20; lttpr_max_link_rate = LINK_RATE_UHBR20;
......
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