drm/amd/display: create a function to decide mst link settings
[why] create a dedicated function to make mst link settings decision, so that the policy's decision is made in a unified place. Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
5a7c86e168
commit
c08321cb18
1 changed files with 9 additions and 5 deletions
|
|
@ -2431,6 +2431,12 @@ static bool decide_edp_link_settings(struct dc_link *link, struct dc_link_settin
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool decide_mst_link_settings(const struct dc_link *link, struct dc_link_settings *link_setting)
|
||||
{
|
||||
*link_setting = link->verified_link_cap;
|
||||
return true;
|
||||
}
|
||||
|
||||
void decide_link_settings(struct dc_stream_state *stream,
|
||||
struct dc_link_settings *link_setting)
|
||||
{
|
||||
|
|
@ -2456,11 +2462,9 @@ void decide_link_settings(struct dc_stream_state *stream,
|
|||
* TODO: add MST specific link training routine
|
||||
*/
|
||||
if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) {
|
||||
*link_setting = link->verified_link_cap;
|
||||
return;
|
||||
}
|
||||
|
||||
if (link->connector_signal == SIGNAL_TYPE_EDP) {
|
||||
if (decide_mst_link_settings(link, link_setting))
|
||||
return;
|
||||
} else if (link->connector_signal == SIGNAL_TYPE_EDP) {
|
||||
if (decide_edp_link_settings(link, link_setting, req_bw))
|
||||
return;
|
||||
} else if (decide_dp_link_settings(link, link_setting, req_bw))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue