Commit 2b96b036 authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher

drm/amd/display: rename lane_settings to hw_lane_settings

[why]
This is one of the major steps to decouple hw lane settings
from dpcd lane settings.
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarAlan Liu <HaoPing.Liu@amd.com>
Signed-off-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 95133f41
...@@ -540,11 +540,11 @@ static ssize_t dp_phy_settings_write(struct file *f, const char __user *buf, ...@@ -540,11 +540,11 @@ static ssize_t dp_phy_settings_write(struct file *f, const char __user *buf,
/* apply phy settings from user */ /* apply phy settings from user */
for (r = 0; r < link_lane_settings.link_settings.lane_count; r++) { for (r = 0; r < link_lane_settings.link_settings.lane_count; r++) {
link_lane_settings.lane_settings[r].VOLTAGE_SWING = link_lane_settings.hw_lane_settings[r].VOLTAGE_SWING =
(enum dc_voltage_swing) (param[0]); (enum dc_voltage_swing) (param[0]);
link_lane_settings.lane_settings[r].PRE_EMPHASIS = link_lane_settings.hw_lane_settings[r].PRE_EMPHASIS =
(enum dc_pre_emphasis) (param[1]); (enum dc_pre_emphasis) (param[1]);
link_lane_settings.lane_settings[r].POST_CURSOR2 = link_lane_settings.hw_lane_settings[r].POST_CURSOR2 =
(enum dc_post_cursor2) (param[2]); (enum dc_post_cursor2) (param[2]);
} }
...@@ -738,7 +738,7 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct file *f, const char __us ...@@ -738,7 +738,7 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct file *f, const char __us
} }
for (i = 0; i < (unsigned int)(link_training_settings.link_settings.lane_count); i++) for (i = 0; i < (unsigned int)(link_training_settings.link_settings.lane_count); i++)
link_training_settings.lane_settings[i] = link->cur_lane_setting[i]; link_training_settings.hw_lane_settings[i] = link->cur_lane_setting[i];
dc_link_set_test_pattern( dc_link_set_test_pattern(
link, link,
......
...@@ -1660,15 +1660,15 @@ static void override_training_settings( ...@@ -1660,15 +1660,15 @@ static void override_training_settings(
lt_settings->always_match_dpcd_with_hw_lane_settings = false; lt_settings->always_match_dpcd_with_hw_lane_settings = false;
} }
for (lane = 0; lane < LANE_COUNT_DP_MAX; lane++) { for (lane = 0; lane < LANE_COUNT_DP_MAX; lane++) {
lt_settings->lane_settings[lane].VOLTAGE_SWING = lt_settings->hw_lane_settings[lane].VOLTAGE_SWING =
lt_settings->voltage_swing != NULL ? lt_settings->voltage_swing != NULL ?
*lt_settings->voltage_swing : *lt_settings->voltage_swing :
VOLTAGE_SWING_LEVEL0; VOLTAGE_SWING_LEVEL0;
lt_settings->lane_settings[lane].PRE_EMPHASIS = lt_settings->hw_lane_settings[lane].PRE_EMPHASIS =
lt_settings->pre_emphasis != NULL ? lt_settings->pre_emphasis != NULL ?
*lt_settings->pre_emphasis *lt_settings->pre_emphasis
: PRE_EMPHASIS_DISABLED; : PRE_EMPHASIS_DISABLED;
lt_settings->lane_settings[lane].POST_CURSOR2 = lt_settings->hw_lane_settings[lane].POST_CURSOR2 =
lt_settings->post_cursor2 != NULL ? lt_settings->post_cursor2 != NULL ?
*lt_settings->post_cursor2 *lt_settings->post_cursor2
: POST_CURSOR2_DISABLED; : POST_CURSOR2_DISABLED;
...@@ -1935,8 +1935,8 @@ static void print_status_message( ...@@ -1935,8 +1935,8 @@ static void print_status_message(
link_rate, link_rate,
lt_settings->link_settings.lane_count, lt_settings->link_settings.lane_count,
lt_result, lt_result,
lt_settings->lane_settings[0].VOLTAGE_SWING, lt_settings->hw_lane_settings[0].VOLTAGE_SWING,
lt_settings->lane_settings[0].PRE_EMPHASIS, lt_settings->hw_lane_settings[0].PRE_EMPHASIS,
lt_spread); lt_spread);
} }
......
...@@ -177,13 +177,13 @@ static uint8_t dpia_build_set_config_data(enum dpia_set_config_type type, ...@@ -177,13 +177,13 @@ static uint8_t dpia_build_set_config_data(enum dpia_set_config_type type,
break; break;
case DPIA_SET_CFG_SET_VSPE: case DPIA_SET_CFG_SET_VSPE:
/* Assume all lanes have same drive settings. */ /* Assume all lanes have same drive settings. */
data.set_vspe.swing = lt_settings->lane_settings[0].VOLTAGE_SWING; data.set_vspe.swing = lt_settings->hw_lane_settings[0].VOLTAGE_SWING;
data.set_vspe.pre_emph = lt_settings->lane_settings[0].PRE_EMPHASIS; data.set_vspe.pre_emph = lt_settings->hw_lane_settings[0].PRE_EMPHASIS;
data.set_vspe.max_swing_reached = data.set_vspe.max_swing_reached =
lt_settings->lane_settings[0].VOLTAGE_SWING == lt_settings->hw_lane_settings[0].VOLTAGE_SWING ==
VOLTAGE_SWING_MAX_LEVEL ? 1 : 0; VOLTAGE_SWING_MAX_LEVEL ? 1 : 0;
data.set_vspe.max_pre_emph_reached = data.set_vspe.max_pre_emph_reached =
lt_settings->lane_settings[0].PRE_EMPHASIS == lt_settings->hw_lane_settings[0].PRE_EMPHASIS ==
PRE_EMPHASIS_MAX_LEVEL ? 1 : 0; PRE_EMPHASIS_MAX_LEVEL ? 1 : 0;
break; break;
default: default:
...@@ -405,7 +405,7 @@ static enum link_training_result dpia_training_cr_non_transparent( ...@@ -405,7 +405,7 @@ static enum link_training_result dpia_training_cr_non_transparent(
/* Update VS/PE. */ /* Update VS/PE. */
dp_decide_lane_settings(lt_settings, dpcd_lane_adjust, dp_decide_lane_settings(lt_settings, dpcd_lane_adjust,
lt_settings->lane_settings, lt_settings->hw_lane_settings,
lt_settings->dpcd_lane_settings); lt_settings->dpcd_lane_settings);
retry_count++; retry_count++;
} }
......
...@@ -94,7 +94,6 @@ struct link_training_settings { ...@@ -94,7 +94,6 @@ struct link_training_settings {
/* TODO: turn lane settings below into mandatory fields /* TODO: turn lane settings below into mandatory fields
* as initial lane configuration * as initial lane configuration
*/ */
struct dc_lane_settings lane_settings[LANE_COUNT_DP_MAX];
enum dc_voltage_swing *voltage_swing; enum dc_voltage_swing *voltage_swing;
enum dc_pre_emphasis *pre_emphasis; enum dc_pre_emphasis *pre_emphasis;
enum dc_post_cursor2 *post_cursor2; enum dc_post_cursor2 *post_cursor2;
......
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