Commit d80b3663 authored by Ilya Bakoulin's avatar Ilya Bakoulin Committed by Wen Zhiwei
Browse files

drm/amd/display: Fix FEC_READY write on DP LT

stable inclusion
from stable-v6.6.52
commit 7853c146f8b45107bea25dcc1870c4dc3a042540
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAYXOD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7853c146f8b45107bea25dcc1870c4dc3a042540



--------------------------------

[ 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: default avatarWenjing Liu <wenjing.liu@amd.com>
Acked-by: default avatarWayne Lin <wayne.lin@amd.com>
Signed-off-by: default avatarIlya Bakoulin <ilya.bakoulin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent a7a1acfa
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -147,7 +147,6 @@ 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;

		status = core_link_write_dpcd(link, DP_FEC_CONFIGURATION,
@@ -157,7 +156,6 @@ enum dc_status dp_set_fec_ready(struct dc_link *link, const struct link_resource
			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) {
			fec_config = 0;