From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Michael Strauss <michael.strauss@amd.com>,
George Shen <George.Shen@amd.com>, Wayne Lin <wayne.lin@amd.com>,
Daniel Wheeler <daniel.wheeler@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Sasha Levin <sashal@kernel.org>,
harry.wentland@amd.com, sunpeng.li@amd.com,
Rodrigo.Siqueira@amd.com, christian.koenig@amd.com,
Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch,
wenjing.liu@amd.com, george.shen@amd.com, Jun.Lei@amd.com,
Jimmy.Kizito@amd.com, mikita.lipski@amd.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 5.15 18/20] drm/amd/display: Assume an LTTPR is always present on fixed_vs links
Date: Sun, 2 Oct 2022 18:50:57 -0400 [thread overview]
Message-ID: <20221002225100.239217-18-sashal@kernel.org> (raw)
In-Reply-To: <20221002225100.239217-1-sashal@kernel.org>
From: Michael Strauss <michael.strauss@amd.com>
[ Upstream commit 29956d0fded036a570bd8e7d4ea4b1a1730307d2 ]
[WHY]
LTTPRs can in very rare instsances fail to increment DPCD LTTPR count.
This results in aux-i LTTPR requests to be sent to the wrong DPCD
address, which causes link training failure.
[HOW]
Override internal repeater count if fixed_vs flag is set for a given link
Reviewed-by: George Shen <George.Shen@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 6d5dc5ab3d8c..a6ff1b17fd22 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -3703,6 +3703,14 @@ bool dp_retrieve_lttpr_cap(struct dc_link *link)
lttpr_dpcd_data[DP_PHY_REPEATER_EXTENDED_WAIT_TIMEOUT -
DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV];
+ /* If this chip cap is set, at least one retimer must exist in the chain
+ * Override count to 1 if we receive a known bad count (0 or an invalid value) */
+ if (link->chip_caps & EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN &&
+ (dp_convert_to_count(link->dpcd_caps.lttpr_caps.phy_repeater_cnt) == 0)) {
+ ASSERT(0);
+ link->dpcd_caps.lttpr_caps.phy_repeater_cnt = 0x80;
+ }
+
/* Attempt to train in LTTPR transparent mode if repeater count exceeds 8. */
is_lttpr_present = (dp_convert_to_count(link->dpcd_caps.lttpr_caps.phy_repeater_cnt) != 0 &&
link->dpcd_caps.lttpr_caps.max_lane_count > 0 &&
--
2.35.1
next prev parent reply other threads:[~2022-10-02 22:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 22:50 [PATCH AUTOSEL 5.15 01/20] firmware: arm_scmi: Improve checks in the info_get operations Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 02/20] firmware: arm_scmi: Harden accesses to the sensor domains Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 03/20] firmware: arm_scmi: Harden accesses to the reset domains Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 04/20] firmware: arm_scmi: Add SCMI PM driver remove routine Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 05/20] dmaengine: xilinx_dma: Fix devm_platform_ioremap_resource error handling Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 06/20] dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 07/20] dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 08/20] ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 09/20] scsi: qedf: Fix a UAF bug in __qedf_probe() Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 10/20] net/ieee802154: fix uninit value bug in dgram_sendmsg Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 11/20] net: marvell: prestera: add support for for Aldrin2 Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 12/20] ALSA: hda/hdmi: Fix the converter reuse for the silent stream Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 13/20] um: Cleanup syscall_handler_t cast in syscalls_32.h Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 14/20] um: Cleanup compiler warning in arch/x86/um/tls_32.c Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 15/20] arch: um: Mark the stack non-executable to fix a binutils warning Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 16/20] net: atlantic: fix potential memory leak in aq_ndev_close() Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 17/20] drm/amd/display: Fix double cursor on non-video RGB MPO Sasha Levin
2022-10-02 22:50 ` Sasha Levin [this message]
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 19/20] drm/amd/display: update gamut remap if plane has changed Sasha Levin
2022-10-02 22:50 ` [PATCH AUTOSEL 5.15 20/20] drm/amd/display: skip audio setup when audio stream is enabled Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221002225100.239217-18-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=George.Shen@amd.com \
--cc=Jimmy.Kizito@amd.com \
--cc=Jun.Lei@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel.wheeler@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.strauss@amd.com \
--cc=mikita.lipski@amd.com \
--cc=stable@vger.kernel.org \
--cc=sunpeng.li@amd.com \
--cc=wayne.lin@amd.com \
--cc=wenjing.liu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).