drm/amd/display: Ext displays with dock can't recognized after resume
authorjsg <jsg@openbsd.org>
Tue, 13 Jun 2023 02:36:09 +0000 (02:36 +0000)
committerjsg <jsg@openbsd.org>
Tue, 13 Jun 2023 02:36:09 +0000 (02:36 +0000)
From Ryan Lin
28d0f85aff342921d75597bc4997f9d6e83be2ef in linux-6.1.y/6.1.29
1e5d4d8eb8c0f15d90c50e7abd686c980e54e42e in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 0345a52..33f941e 100644 (file)
@@ -39,6 +39,7 @@
 #include "dc/dc_edid_parser.h"
 #include "dc/dc_stat.h"
 #include "amdgpu_dm_trace.h"
+#include "dc/inc/dc_link_ddc.h"
 
 #include "vid.h"
 #include "amdgpu.h"
@@ -2256,6 +2257,14 @@ static void s3_handle_mst(struct drm_device *dev, bool suspend)
                if (suspend) {
                        drm_dp_mst_topology_mgr_suspend(mgr);
                } else {
+                       /* if extended timeout is supported in hardware,
+                        * default to LTTPR timeout (3.2ms) first as a W/A for DP link layer
+                        * CTS 4.2.1.1 regression introduced by CTS specs requirement update.
+                        */
+                       dc_link_aux_try_to_configure_timeout(aconnector->dc_link->ddc, LINK_AUX_DEFAULT_LTTPR_TIMEOUT_PERIOD);
+                       if (!dp_is_lttpr_present(aconnector->dc_link))
+                               dc_link_aux_try_to_configure_timeout(aconnector->dc_link->ddc, LINK_AUX_DEFAULT_TIMEOUT_PERIOD);
+
                        ret = drm_dp_mst_topology_mgr_resume(mgr, true);
                        if (ret < 0) {
                                dm_helpers_dp_mst_stop_top_mgr(aconnector->dc_link->ctx,