Commit 4654a2f7 authored by Roman Li's avatar Roman Li Committed by Alex Deucher

drm/amd/display: add detect caps for edp

1. The caps detect sequence for edp is different from dp.
   Added separate function for edp.
2. Removed max_link_setting and replaced it with verified
   to avoid confusion.
3. Reverted sink count guard for edp powerdown as unnecessary
   with the changes above.
Signed-off-by: default avatarRoman Li <Roman.Li@amd.com>
Signed-off-by: default avatarTony Cheng <tony.cheng@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cd273548
......@@ -585,7 +585,7 @@ bool dc_link_detect(struct dc_link *link, bool boot)
}
case SIGNAL_TYPE_EDP: {
detect_dp_sink_caps(link);
detect_edp_sink_caps(link);
sink_caps.transaction_type =
DDC_TRANSACTION_TYPE_I2C_OVER_AUX;
sink_caps.signal = SIGNAL_TYPE_EDP;
......
......@@ -1147,7 +1147,6 @@ bool dp_hbr_verify_link_cap(
LINK_SPREAD_DISABLED;
}
link->max_link_setting = link->verified_link_cap;
return success;
}
......@@ -1466,7 +1465,7 @@ void decide_link_settings(struct dc_stream *stream,
* 2. could support the b/w requested by the timing
*/
while (current_link_setting.link_rate <=
link->max_link_setting.link_rate) {
link->verified_link_cap.link_rate) {
link_bw = bandwidth_in_kbps_from_link_settings(
&current_link_setting);
if (req_bw <= link_bw) {
......@@ -1475,7 +1474,7 @@ void decide_link_settings(struct dc_stream *stream,
}
if (current_link_setting.lane_count <
link->max_link_setting.lane_count) {
link->verified_link_cap.lane_count) {
current_link_setting.lane_count =
increase_lane_count(
current_link_setting.lane_count);
......@@ -2294,6 +2293,12 @@ void detect_dp_sink_caps(struct dc_link *link)
/* TODO save sink caps in link->sink */
}
void detect_edp_sink_caps(struct dc_link *link)
{
retrieve_link_cap(link);
link->verified_link_cap = link->reported_link_cap;
}
void dc_link_dp_enable_hpd(const struct dc_link *link)
{
struct link_encoder *encoder = link->link_enc;
......
......@@ -114,9 +114,7 @@ void dp_disable_link_phy(struct dc_link *link, enum signal_type signal)
if (signal == SIGNAL_TYPE_EDP) {
link->link_enc->funcs->backlight_control(link->link_enc, false);
if (link->dpcd_sink_count)
link->link_enc->funcs->power_control(link->link_enc,
false);
link->link_enc->funcs->power_control(link->link_enc, false);
}
link->link_enc->funcs->disable_output(link->link_enc, signal);
......
......@@ -744,7 +744,6 @@ struct dc_link {
*/
struct dc_link_settings reported_link_cap;
struct dc_link_settings verified_link_cap;
struct dc_link_settings max_link_setting;
struct dc_link_settings cur_link_settings;
struct dc_lane_settings cur_lane_setting;
struct dc_link_settings preferred_link_setting;
......
......@@ -63,6 +63,8 @@ bool is_mst_supported(struct dc_link *link);
void detect_dp_sink_caps(struct dc_link *link);
void detect_edp_sink_caps(struct dc_link *link);
bool is_dp_active_dongle(const struct dc_link *link);
void dp_enable_mst_on_sink(struct dc_link *link, bool enable);
......
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