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 5038C25525A; Thu, 17 Apr 2025 18:01:15 +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=1744912875; cv=none; b=kF+RkTWVNgkGz8FyiAfS2n0F/sUCAe/EHrTAxDyYALK8lo2rwxQvIPGGhfoUpNK3DB1R0csc38XXa31l/Nqc6lmx3nHBX601bgYR8YQ3OSZ8d9lozQTgfops4L+1zPsI0FUfTDLQcDIDf0VGdtkaLIYeQJDG7HZYv1rFnZcRDdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744912875; c=relaxed/simple; bh=dzNgHZCSDFf0u+QMvGbtNtvmap0ngD/iWEcmXCr29n4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fTx4ZpzXjPV5IFz6BYmpc46Xi0n/9yIo/aC4DbrGi2Hv5Vk0X+Nummt6vg09Rokfh0rhUKG8DU4Ng7zsltfqztI5ijE76SeMuk91B20g5bgON/F05i0kTsOyMk/8uTJ63VsQ8TBxeAg5OOOo4Hlm1FirjfO549BFzZ3/OxQ2n6Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h8sIILyc; 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="h8sIILyc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D729FC4CEE4; Thu, 17 Apr 2025 18:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744912875; bh=dzNgHZCSDFf0u+QMvGbtNtvmap0ngD/iWEcmXCr29n4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h8sIILycp+bF/N26qo8Af7IHmtedXWb/G4OFkPMNQ6Fbe1ctxr0aFcVMemgCxdaXh MU6ylcnEW81W5YlWWTaeo+OFWvriIKECuZsIlyI/7CQNYlsQBdk4sR7xyyXgWs4loV N+gYsk/P5tfTVvCBn0DVs2ICn4WIvJ+xYb8dZNZI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wenjing Liu , Brendan Tam , Aurabindo Pillai , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 6.14 153/449] drm/amd/display: add workaround flag to link to force FFE preset Date: Thu, 17 Apr 2025 19:47:21 +0200 Message-ID: <20250417175124.134090945@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250417175117.964400335@linuxfoundation.org> References: <20250417175117.964400335@linuxfoundation.org> User-Agent: quilt/0.68 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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Brendan Tam [ Upstream commit 51d1b338541dea83fec8e6f95d3e46fa469a73a8 ] [Why] There have been instances of some monitors being unable to link train on their reported link speed using their selected FFE preset. If a different FFE preset is found that has a higher rate of success during link training this workaround can be used to force its FFE preset. [How] A new link workaround flag is made called force_dp_ffe_preset. The flag is checked in override_training_settings and will set lt_settings->ffe_preset which is null if the flag is not set. The flag is then set in override_lane_settings. Reviewed-by: Wenjing Liu Signed-off-by: Brendan Tam Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 053481ab69efb..ab77dcbc10584 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -1788,7 +1788,9 @@ struct dc_link { bool dongle_mode_timing_override; bool blank_stream_on_ocs_change; bool read_dpcd204h_on_irq_hpd; + bool force_dp_ffe_preset; } wa_flags; + union dc_dp_ffe_preset forced_dp_ffe_preset; struct link_mst_stream_allocation_table mst_stream_alloc_table; struct dc_link_status link_status; diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c index 88d4288cde0f5..751c18e592ea5 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c @@ -736,6 +736,8 @@ void override_training_settings( lt_settings->pre_emphasis = overrides->pre_emphasis; if (overrides->post_cursor2 != NULL) lt_settings->post_cursor2 = overrides->post_cursor2; + if (link->wa_flags.force_dp_ffe_preset && !dp_is_lttpr_present(link)) + lt_settings->ffe_preset = &link->forced_dp_ffe_preset; if (overrides->ffe_preset != NULL) lt_settings->ffe_preset = overrides->ffe_preset; /* Override HW lane settings with BIOS forced values if present */ -- 2.39.5