drm/amd/display: Clear MST topology if it fails to resume
authorRoman Li <roman.li@amd.com>
Thu, 1 Dec 2022 14:49:23 +0000 (09:49 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Dec 2022 17:18:18 +0000 (12:18 -0500)
[Why]
In case of failure to resume MST topology after suspend, an emtpty
mst tree prevents further mst hub detection on the same connector.
That causes the issue with MST hub hotplug after it's been unplug in
suspend.

[How]
Stop topology manager on the connector after detecting DM_MST failure.

Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 79c932724eea19cb02f053440c3fb2d43761ec51..c58b6084684e755f0b6f5563843ffba5d214f45b 100644 (file)
@@ -2170,6 +2170,8 @@ static int detect_mst_link_for_all_connectors(struct drm_device *dev)
                                DRM_ERROR("DM_MST: Failed to start MST\n");
                                aconnector->dc_link->type =
                                        dc_connection_single;
+                               ret = dm_helpers_dp_mst_stop_top_mgr(aconnector->dc_link->ctx,
+                                                                    aconnector->dc_link);
                                break;
                        }
                }