Commit 7a710a8b authored by Imre Deak's avatar Imre Deak

drm/dp/mst: Read the extended DPCD capabilities during system resume

The WD22TB4 Thunderbolt dock at least will revert its DP_MAX_LINK_RATE
from HBR3 to HBR2 after system suspend/resume if the DP_DP13_DPCD_REV
registers are not read subsequently also as required.

Fix this by reading DP_DP13_DPCD_REV registers as well, matching what is
done during connector detection. While at it also fix up the same call
in drm_dp_mst_dump_topology().

Cc: Lyude Paul <lyude@redhat.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5292Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Cc: <stable@vger.kernel.org> # v5.14+
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220614094537.885472-1-imre.deak@intel.com
parent 6da62368
...@@ -3860,9 +3860,7 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr, ...@@ -3860,9 +3860,7 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,
if (!mgr->mst_primary) if (!mgr->mst_primary)
goto out_fail; goto out_fail;
ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd, if (drm_dp_read_dpcd_caps(mgr->aux, mgr->dpcd) < 0) {
DP_RECEIVER_CAP_SIZE);
if (ret != DP_RECEIVER_CAP_SIZE) {
drm_dbg_kms(mgr->dev, "dpcd read failed - undocked during suspend?\n"); drm_dbg_kms(mgr->dev, "dpcd read failed - undocked during suspend?\n");
goto out_fail; goto out_fail;
} }
...@@ -4910,8 +4908,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m, ...@@ -4910,8 +4908,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
u8 buf[DP_PAYLOAD_TABLE_SIZE]; u8 buf[DP_PAYLOAD_TABLE_SIZE];
int ret; int ret;
ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, buf, DP_RECEIVER_CAP_SIZE); if (drm_dp_read_dpcd_caps(mgr->aux, buf) < 0) {
if (ret) {
seq_printf(m, "dpcd read failed\n"); seq_printf(m, "dpcd read failed\n");
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment