summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Bakoulin <ilya.bakoulin@amd.com>2024-04-17 21:21:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-18 20:24:07 +0300
commit7853c146f8b45107bea25dcc1870c4dc3a042540 (patch)
treeea1e06d78f8627cf3d2775a21fd55c08f3e65ea7
parent27bbf0b1cac9866666878421d57c15a78867f7cd (diff)
downloadlinux-7853c146f8b45107bea25dcc1870c4dc3a042540.tar.xz
drm/amd/display: Fix FEC_READY write on DP LT
[ Upstream commit a8baec4623aedf36d50767627f6eae5ebf07c6fb ] [Why/How] We can miss writing FEC_READY in some cases before LT start, which violates DP spec. Remove the condition guarding the DPCD write so that the write happens unconditionally. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Ilya Bakoulin <ilya.bakoulin@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>
-rw-r--r--drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c
index f06f708ba5c8..9bde0c8bf914 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c
@@ -147,16 +147,14 @@ enum dc_status dp_set_fec_ready(struct dc_link *link, const struct link_resource
return DC_NOT_SUPPORTED;
if (ready && dp_should_enable_fec(link)) {
- if (link->fec_state == dc_link_fec_not_ready) {
- fec_config = 1;
+ fec_config = 1;
- status = core_link_write_dpcd(link, DP_FEC_CONFIGURATION,
- &fec_config, sizeof(fec_config));
+ status = core_link_write_dpcd(link, DP_FEC_CONFIGURATION,
+ &fec_config, sizeof(fec_config));
- if (status == DC_OK) {
- link_enc->funcs->fec_set_ready(link_enc, true);
- link->fec_state = dc_link_fec_ready;
- }
+ if (status == DC_OK) {
+ link_enc->funcs->fec_set_ready(link_enc, true);
+ link->fec_state = dc_link_fec_ready;
}
} else {
if (link->fec_state == dc_link_fec_ready) {