Commit 4c247f8c authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher

drm/amd/display: decide link training settings based on channel coding

[how]
Rename initialize_training_settings to decide_training_settings.
Call get link encoding format and decide training settings
based on current channel coding.
Signed-off-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Reviewed-by: default avatarGeorge Shen <George.Shen@amd.com>
Acked-by: default avatarStylon Wang <stylon.wang@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 55bac4a7
......@@ -1231,7 +1231,7 @@ enum link_training_result dp_check_link_loss_status(
return status;
}
static void initialize_training_settings(
static inline void decide_8b_10b_training_settings(
struct dc_link *link,
const struct dc_link_settings *link_setting,
const struct dc_link_training_overrides *overrides,
......@@ -1327,6 +1327,17 @@ static void initialize_training_settings(
lt_settings->enhanced_framing = 1;
}
static void decide_training_settings(
struct dc_link *link,
const struct dc_link_settings *link_settings,
const struct dc_link_training_overrides *overrides,
struct link_training_settings *lt_settings)
{
if (dp_get_link_encoding_format(link_settings) == DP_8b_10b_ENCODING)
decide_8b_10b_training_settings(link, link_settings, overrides, lt_settings);
}
uint8_t dp_convert_to_count(uint8_t lttpr_repeater_count)
{
switch (lttpr_repeater_count) {
......@@ -1542,7 +1553,7 @@ bool dc_link_dp_perform_link_training_skip_aux(
{
struct link_training_settings lt_settings;
initialize_training_settings(
decide_training_settings(
link,
link_setting,
&link->preferred_training_settings,
......@@ -1592,7 +1603,7 @@ enum link_training_result dc_link_dp_perform_link_training(
uint8_t repeater_cnt;
uint8_t repeater_id;
initialize_training_settings(
decide_training_settings(
link,
link_setting,
&link->preferred_training_settings,
......@@ -1877,7 +1888,7 @@ enum link_training_result dc_link_dp_sync_lt_attempt(
enum clock_source_id dp_cs_id = CLOCK_SOURCE_ID_EXTERNAL;
bool fec_enable = false;
initialize_training_settings(
decide_training_settings(
link,
link_settings,
lt_overrides,
......
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