Skip to content

Commit 62320fb

Browse files
Wayne Linalexdeucher
authored andcommitted
drm/amd/display: Enable mst when it's detected but yet to be initialized
[Why] drm_dp_mst_topology_queue_probe() is used under the assumption that mst is already initialized. If we connect system with SST first then switch to the mst branch during suspend, we will fail probing topology by calling the wrong API since the mst manager is yet to be initialized. [How] At dm_resume(), once it's detected as mst branc connected, check if the mst is initialized already. If not, call dm_helpers_dp_mst_start_top_mgr() instead to initialize mst V2: Adjust the commit msg a bit Fixes: bc06819 ("drm/amd/display: Don't write DP_MSTM_CTRL after LT") Cc: Fangzhi Zuo <jerry.zuo@amd.com> Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e1ca536 commit 62320fb

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3624,6 +3624,7 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
36243624
/* Do mst topology probing after resuming cached state*/
36253625
drm_connector_list_iter_begin(ddev, &iter);
36263626
drm_for_each_connector_iter(connector, &iter) {
3627+
bool init = false;
36273628

36283629
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
36293630
continue;
@@ -3633,7 +3634,14 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
36333634
aconnector->mst_root)
36343635
continue;
36353636

3636-
drm_dp_mst_topology_queue_probe(&aconnector->mst_mgr);
3637+
scoped_guard(mutex, &aconnector->mst_mgr.lock) {
3638+
init = !aconnector->mst_mgr.mst_primary;
3639+
}
3640+
if (init)
3641+
dm_helpers_dp_mst_start_top_mgr(aconnector->dc_link->ctx,
3642+
aconnector->dc_link, false);
3643+
else
3644+
drm_dp_mst_topology_queue_probe(&aconnector->mst_mgr);
36373645
}
36383646
drm_connector_list_iter_end(&iter);
36393647

0 commit comments

Comments
 (0)