From: jsg Date: Tue, 13 Jun 2023 02:36:09 +0000 (+0000) Subject: drm/amd/display: Ext displays with dock can't recognized after resume X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a4f28607ce31fb5db4ddf5d73c4218a037e30a05;p=openbsd drm/amd/display: Ext displays with dock can't recognized after resume From Ryan Lin 28d0f85aff342921d75597bc4997f9d6e83be2ef in linux-6.1.y/6.1.29 1e5d4d8eb8c0f15d90c50e7abd686c980e54e42e in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0345a52e5b5..33f941e839f 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -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,