Skip to content

Commit 3c6a743

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> (cherry picked from commit 62320fb) Cc: stable@vger.kernel.org
1 parent 570a66b commit 3c6a743

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

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

35673568
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
35683569
continue;
@@ -3572,7 +3573,14 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
35723573
aconnector->mst_root)
35733574
continue;
35743575

3575-
drm_dp_mst_topology_queue_probe(&aconnector->mst_mgr);
3576+
scoped_guard(mutex, &aconnector->mst_mgr.lock) {
3577+
init = !aconnector->mst_mgr.mst_primary;
3578+
}
3579+
if (init)
3580+
dm_helpers_dp_mst_start_top_mgr(aconnector->dc_link->ctx,
3581+
aconnector->dc_link, false);
3582+
else
3583+
drm_dp_mst_topology_queue_probe(&aconnector->mst_mgr);
35763584
}
35773585
drm_connector_list_iter_end(&iter);
35783586

0 commit comments

Comments
 (0)