Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2873270rwb; Mon, 15 Aug 2022 13:03:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR72XpIIWrsBAmHW2gZ8G4iFeXd3LeYcYGVNHlmR/uAFG9cK1pGt2cZoNn923OPgHwF4YBQl X-Received: by 2002:a17:907:7396:b0:738:7bcd:d7b5 with SMTP id er22-20020a170907739600b007387bcdd7b5mr506636ejc.691.1660593835154; Mon, 15 Aug 2022 13:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593835; cv=none; d=google.com; s=arc-20160816; b=0ZmsvpQykW23JlXBLz8s84LriveeX4EZeE79ngbp452nxSHTimFs5BWUAqsSYU6U22 G14esAQB3qgb3Fe8Ze4+9suhhNp7XwOsk5WsrHt4lzGBwJARIhouKCy6XtB7nVfimXgp HMcqMI/zW8BQjLpkxCxldEzbxsJC8u1APvOZ09OoJhH8Y4V/b5bppnYihoDrhU57KtBa RSINe4ma4gZILJVdoP5XceKoP0405AjCbxZyt+gPH8oscNp+/hvqJuEKgLbjs1fpw0mM L1QHEcfhJ35IqJfodFfTSK6/QovL0wEZQnaiiaYAUm1+OW9rovLTUbo95k2yOuQyZAlc E6IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q1t+JEdOmpX5fHCKncSKNtsBlp8zTtnI+CpfUpsBR4w=; b=rSCZrxZE/6n4jghLcEEm0iHv8DqMqJ0BM4/CgjG19QwmZ0AYmo/EcOy9JAsAcjSyGt Bql3lX79JkpBmnEmvhI1+9SQMZPsFJs+7iAW34q8FianEluqg5zEKS5jMXblU8Yvifru 4m2l2XjG+KqLwqlDAQ/GW/i4i2vTZsfDSLKbeNL0aetqcoHL4ODEw6NTeZsK4LVcfXdB 1i290uaaoQDsDz4F36qq84qTC76iP/UpIXJWC29nucNb71TOEwuPVa5gAum6xPj3Z0Ri quAspTcvpCk24URqgYTS4+LSS5sxGmm6O+h2NfrZkr3zySRwX5ZWYHG6L+lYyoHWkMoL 85sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hUpAc7FI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t16-20020a056402241000b004436bac7e37si5061451eda.596.2022.08.15.13.03.28; Mon, 15 Aug 2022 13:03:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hUpAc7FI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345214AbiHOTs4 (ORCPT + 99 others); Mon, 15 Aug 2022 15:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345517AbiHOTrB (ORCPT ); Mon, 15 Aug 2022 15:47:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D773C6FA34; Mon, 15 Aug 2022 11:49:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0D80EB81057; Mon, 15 Aug 2022 18:49:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54B58C433C1; Mon, 15 Aug 2022 18:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589361; bh=TRLbzgGhbaLzAl3vigtoJ/UZSgPoInJV6+BZ2ZoZeNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hUpAc7FIxdjLrSVNa1NUjviZQYDrZNF8ELzcoScnWgYZHTsAhjyjd3RtuvFLHJ8ps a/a7/mzSyoeiZsw7+9kdNcEKe8r8JlL+irI5CXrfv+DTiPiNZ8/xBpzPz0EG4/t9Y2 6+stHKr8Ga5eCm/e12/Va2utjIXr/KqDSEgST2v8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Imre Deak , Jani Nikula , Sasha Levin Subject: [PATCH 5.15 693/779] drm/dp/mst: Read the extended DPCD capabilities during system resume Date: Mon, 15 Aug 2022 20:05:37 +0200 Message-Id: <20220815180406.963345371@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Imre Deak [ Upstream commit 7a710a8bc909313951eb9252d8419924c771d7c2 ] 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 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5292 Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Cc: # v5.14+ Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220614094537.885472-1-imre.deak@intel.com Signed-off-by: Sasha Levin --- 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 b3e3babe18c0..2a586e6489da 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; } @@ -4894,8 +4892,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; } -- 2.35.1