From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B637524B34; Mon, 16 Sep 2024 12:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726488401; cv=none; b=W6ew54GOYzUji6z8Xg/BOwo/7fLYg2KXmuYedsbqftOJRS+XcsCKhfLpVGZNYS5tN9wTsP+qF20rWLWkbv1xPPcLuQy+mliUn4mnLg3rs9qFa+nAtUKDTrCd1qcDx0Uyu68sx/9NhlPIAdcIJJo2oEl+KEeVzxJa76whkSRgJ/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726488401; c=relaxed/simple; bh=B1AUYOzDGakSBFziZzZZYTqZ3MjiwNdyDLL0XQQL5mI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZeSCknM0s670YqFHbcpS6q2c1pSv4C9jihpQaIhR3fzYJX4GSgppYCBgjtqYjoEBV1feG5AeJ3uzM7nUt089HiRo4v+TOh9U17htNsvzbrLbEVpvLouddNm1cFNt8k/O9QayLsmGIOEIVCWMSEszO40SL3KS+xHYWoXW4OR8OhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e7ewphPL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="e7ewphPL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F251C4CEC4; Mon, 16 Sep 2024 12:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726488401; bh=B1AUYOzDGakSBFziZzZZYTqZ3MjiwNdyDLL0XQQL5mI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e7ewphPL8Rqqysd4gSjH7JU2vHNVYgNUuT5WpgpOyOFqR1sQEXAlvvkh8G/qqbJIB RS/wmQU4wt7U7ngOavhuLY1z6fIqg6ftgePW8c0Cj5femsPZaTcDWOjMylO32Jnej6 LDxwY7DPAyakosR77Ltiylo2c4rVrjsMkD3c7cMk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mario Limonciello , Alex Deucher , Wenjing Liu , Wayne Lin , Ilya Bakoulin , Daniel Wheeler , Sasha Levin Subject: [PATCH 6.10 063/121] drm/amd/display: Fix FEC_READY write on DP LT Date: Mon, 16 Sep 2024 13:43:57 +0200 Message-ID: <20240916114231.252377973@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240916114228.914815055@linuxfoundation.org> References: <20240916114228.914815055@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilya Bakoulin [ 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 Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Wenjing Liu Acked-by: Wayne Lin Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- .../amd/display/dc/link/protocols/link_dp_phy.c | 14 ++++++-------- 1 file 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 5cbf5f93e584..bafa52a0165a 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 @@ -151,16 +151,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) { -- 2.43.0