APPLIED[J]/Cmnt: [PATCH 1/2][SRU][J/OEM-5.14/OEM-5.17] drm/dp/mst: Read the extended DPCD capabilities during system resume
Stefan Bader
stefan.bader at canonical.com
Thu Aug 4 09:19:05 UTC 2022
On 21.06.22 07:34, Koba Ko wrote:
> From: Imre Deak <imre.deak at intel.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1979267
>
> 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 at redhat.com>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5292
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> Reviewed-by: Lyude Paul <lyude at redhat.com>
> Ref: https://patchwork.freedesktop.org/patch/489424/?series=105101&rev=1
> Signed-off-by: Koba Ko <koba.ko at canonical.com>
> ---
Applied to jammy:linux/master-next. I basically took the upstream change and
made it a backport which changes the file path. Thanks.
-Stefan
> drivers/gpu/drm/drm_dp_mst_topology.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 86d13d6bc4631..e327c14d66cd3 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -3860,9 +3860,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;
> }
> @@ -4893,8 +4891,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;
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20220804/78eda4d9/attachment.sig>
More information about the kernel-team
mailing list