From: "Guo, Bing" <bing....@amd.com>

Why:
When resume from sleep or hiberation, blocked MST Topology discovery might
need to be used.

How:
Added "DETECT_REASON_RESUMEFROMS3S4" to enum dc_detect_reason; use it to
require blocked MST Topology discovery.

Reviewed-by: Wenjing Liu <wenjing....@amd.com>
Acked-by: Jasdeep Dhillon <jdhil...@amd.com>
Signed-off-by: "Bing Guo" <bing....@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
 drivers/gpu/drm/amd/display/dc/dc_link.h      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index cb6c91cd6e83..ec4b300ec067 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -831,7 +831,7 @@ static bool discover_dp_mst_topology(struct dc_link *link, 
enum dc_detect_reason
        link->type = dc_connection_mst_branch;
        dm_helpers_dp_update_branch_info(link->ctx, link);
        if (dm_helpers_dp_mst_start_top_mgr(link->ctx,
-                       link, reason == DETECT_REASON_BOOT)) {
+                       link, (reason == DETECT_REASON_BOOT || reason == 
DETECT_REASON_RESUMEFROMS3S4))) {
                link_disconnect_sink(link);
        } else {
                link->type = dc_connection_sst_branch;
diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h 
b/drivers/gpu/drm/amd/display/dc/dc_link.h
index e7ead9e25318..9ad3ee4079c3 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_link.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_link.h
@@ -312,6 +312,7 @@ void dc_link_blank_dp_stream(struct dc_link *link, bool 
hw_init);
  */
 enum dc_detect_reason {
        DETECT_REASON_BOOT,
+       DETECT_REASON_RESUMEFROMS3S4,
        DETECT_REASON_HPD,
        DETECT_REASON_HPDRX,
        DETECT_REASON_FALLBACK,
-- 
2.25.1

Reply via email to