Commit f031ba12 authored by George Shen's avatar George Shen Committed by Alex Deucher

drm/amd/display: Update test link rate DPCD bit field to match spec

[Why]
An SCR was made to the DP2.0 spec that updated the bit field definition
for UHBR13.5 in the test link rate DPCD register.

[How]
Add new translation to match the SCR update. Keep old translation for
backwards compatibility.
Reviewed-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Acked-by: default avatarHersen Wu <hersenxs.wu@amd.com>
Signed-off-by: default avatarGeorge Shen <george.shen@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8df0d7d3
...@@ -142,7 +142,8 @@ enum dp_test_link_rate { ...@@ -142,7 +142,8 @@ enum dp_test_link_rate {
DP_TEST_LINK_RATE_HBR3 = 0x1E, DP_TEST_LINK_RATE_HBR3 = 0x1E,
DP_TEST_LINK_RATE_UHBR10 = 0x01, DP_TEST_LINK_RATE_UHBR10 = 0x01,
DP_TEST_LINK_RATE_UHBR20 = 0x02, DP_TEST_LINK_RATE_UHBR20 = 0x02,
DP_TEST_LINK_RATE_UHBR13_5 = 0x03, DP_TEST_LINK_RATE_UHBR13_5_LEGACY = 0x03, /* For backward compatibility*/
DP_TEST_LINK_RATE_UHBR13_5 = 0x04,
}; };
struct dc_link_settings { struct dc_link_settings {
......
...@@ -53,6 +53,7 @@ static enum dc_link_rate get_link_rate_from_test_link_rate(uint8_t test_rate) ...@@ -53,6 +53,7 @@ static enum dc_link_rate get_link_rate_from_test_link_rate(uint8_t test_rate)
return LINK_RATE_UHBR10; return LINK_RATE_UHBR10;
case DP_TEST_LINK_RATE_UHBR20: case DP_TEST_LINK_RATE_UHBR20:
return LINK_RATE_UHBR20; return LINK_RATE_UHBR20;
case DP_TEST_LINK_RATE_UHBR13_5_LEGACY:
case DP_TEST_LINK_RATE_UHBR13_5: case DP_TEST_LINK_RATE_UHBR13_5:
return LINK_RATE_UHBR13_5; return LINK_RATE_UHBR13_5;
default: default:
...@@ -119,6 +120,11 @@ static void dp_test_send_link_training(struct dc_link *link) ...@@ -119,6 +120,11 @@ static void dp_test_send_link_training(struct dc_link *link)
1); 1);
link_settings.link_rate = get_link_rate_from_test_link_rate(test_rate); link_settings.link_rate = get_link_rate_from_test_link_rate(test_rate);
if (link_settings.link_rate == LINK_RATE_UNKNOWN) {
DC_LOG_ERROR("%s: Invalid test link rate.", __func__);
ASSERT(0);
}
/* Set preferred link settings */ /* Set preferred link settings */
link->verified_link_cap.lane_count = link_settings.lane_count; link->verified_link_cap.lane_count = link_settings.lane_count;
link->verified_link_cap.link_rate = link_settings.link_rate; link->verified_link_cap.link_rate = link_settings.link_rate;
...@@ -457,7 +463,7 @@ static void set_crtc_test_pattern(struct dc_link *link, ...@@ -457,7 +463,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
controller_color_space = pipe_ctx->stream_res.test_pattern_params.color_space; controller_color_space = pipe_ctx->stream_res.test_pattern_params.color_space;
if (controller_color_space == CONTROLLER_DP_COLOR_SPACE_UDEFINED) { if (controller_color_space == CONTROLLER_DP_COLOR_SPACE_UDEFINED) {
DC_LOG_WARNING("%s: Color space must be defined for test pattern", __func__); DC_LOG_ERROR("%s: Color space must be defined for test pattern", __func__);
ASSERT(0); ASSERT(0);
} }
......
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