]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Don't write DP_MSTM_CTRL after LT
authorWayne Lin <Wayne.Lin@amd.com>
Fri, 25 Oct 2024 04:27:26 +0000 (12:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Apr 2025 08:06:36 +0000 (10:06 +0200)
commit bc068194f548ef1f230d96c4398046bf59165992 upstream.

[Why]
Observe after suspend/resme, we can't light up mst monitors under specific
mst hub. The reason is that driver still writes DPCD DP_MSTM_CTRL after LT.
It's forbidden even we write the same value for that dpcd register.

[How]
We already resume the mst branch device dpcd settings during
resume_mst_branch_status(). Leverage drm_dp_mst_topology_queue_probe() to
only probe the topology, not calling drm_dp_mst_topology_mgr_resume() which
will set DP_MSTM_CTRL as well.

Reviewed-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[cascardo: adjust context in local declarations]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 986ee37688c16cf2f86709e957424e35b9780b27..2b7f98a2e36f55e0db6e9cc6c97c98251245bca9 100644 (file)
@@ -2825,8 +2825,7 @@ static int dm_resume(void *handle)
        struct dm_atomic_state *dm_state = to_dm_atomic_state(dm->atomic_obj.state);
        enum dc_connection_type new_connection_type = dc_connection_none;
        struct dc_state *dc_state;
-       int i, r, j, ret;
-       bool need_hotplug = false;
+       int i, r, j;
 
        if (amdgpu_in_reset(adev)) {
                dc_state = dm->cached_dc_state;
@@ -3003,23 +3002,16 @@ static int dm_resume(void *handle)
                    aconnector->mst_root)
                        continue;
 
-               ret = drm_dp_mst_topology_mgr_resume(&aconnector->mst_mgr, true);
-
-               if (ret < 0) {
-                       dm_helpers_dp_mst_stop_top_mgr(aconnector->dc_link->ctx,
-                                       aconnector->dc_link);
-                       need_hotplug = true;
-               }
+               drm_dp_mst_topology_queue_probe(&aconnector->mst_mgr);
        }
        drm_connector_list_iter_end(&iter);
 
-       if (need_hotplug)
-               drm_kms_helper_hotplug_event(ddev);
-
        amdgpu_dm_irq_resume_late(adev);
 
        amdgpu_dm_smu_write_watermarks_table(adev);
 
+       drm_kms_helper_hotplug_event(ddev);
+
        return 0;
 }