From: jsg Date: Thu, 18 Aug 2022 01:02:22 +0000 (+0000) Subject: drm/dp/mst: Read the extended DPCD capabilities during system resume X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d1f83aa5b92744c2579083654527246a8489fb0f;p=openbsd drm/dp/mst: Read the extended DPCD capabilities during system resume From Imre Deak 4a54c13786c5a596b4e072b36e245029e11a565c in linux 5.15.y/5.15.61 7a710a8bc909313951eb9252d8419924c771d7c2 in mainline linux --- diff --git a/sys/dev/pci/drm/drm_dp_mst_topology.c b/sys/dev/pci/drm/drm_dp_mst_topology.c index 3d7002f372d..ddae7f34c6b 100644 --- a/sys/dev/pci/drm/drm_dp_mst_topology.c +++ b/sys/dev/pci/drm/drm_dp_mst_topology.c @@ -3870,9 +3870,7 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr, if (!mgr->mst_primary) goto out_fail; - ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd, - DP_RECEIVER_CAP_SIZE); - if (ret != DP_RECEIVER_CAP_SIZE) { + if (drm_dp_read_dpcd_caps(mgr->aux, mgr->dpcd) < 0) { drm_dbg_kms(mgr->dev, "dpcd read failed - undocked during suspend?\n"); goto out_fail; } @@ -4904,8 +4902,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m, u8 buf[DP_PAYLOAD_TABLE_SIZE]; int ret; - ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, buf, DP_RECEIVER_CAP_SIZE); - if (ret) { + if (drm_dp_read_dpcd_caps(mgr->aux, buf) < 0) { seq_printf(m, "dpcd read failed\n"); goto out; }