From 0cb5677bed75da40975e78aaae867ec887b522f5 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Sep 2024 09:58:02 +0000 Subject: [PATCH] drm/amd/display: use preferred link settings for dp signal only From Wenjing Liu 67cf14c04ff0ea5c246f80ea3a044c2afb93c99d in linux-6.6.y/6.6.50 abf34ca465f5cd182b07701d3f3d369c0fc04723 in mainline linux --- .../dc/link/protocols/link_dp_capability.c | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c index be8da8bbd96..db0878d59cd 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c +++ b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c @@ -908,21 +908,17 @@ bool link_decide_link_settings(struct dc_stream_state *stream, memset(link_setting, 0, sizeof(*link_setting)); - /* if preferred is specified through AMDDP, use it, if it's enough - * to drive the mode - */ - if (link->preferred_link_setting.lane_count != - LANE_COUNT_UNKNOWN && - link->preferred_link_setting.link_rate != - LINK_RATE_UNKNOWN) { + if (dc_is_dp_signal(stream->signal) && + link->preferred_link_setting.lane_count != LANE_COUNT_UNKNOWN && + link->preferred_link_setting.link_rate != LINK_RATE_UNKNOWN) { + /* if preferred is specified through AMDDP, use it, if it's enough + * to drive the mode + */ *link_setting = link->preferred_link_setting; - return true; - } - - /* MST doesn't perform link training for now - * TODO: add MST specific link training routine - */ - if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) { + } else if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) { + /* MST doesn't perform link training for now + * TODO: add MST specific link training routine + */ decide_mst_link_settings(link, link_setting); } else if (link->connector_signal == SIGNAL_TYPE_EDP) { /* enable edp link optimization for DSC eDP case */ -- 2.20.1