From: Arun R Murthy <arun.r.murthy@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com, imre.deak@intel.com,
ville.syrjala@intel.com, uma.shankar@intel.com,
Arun R Murthy <arun.r.murthy@intel.com>
Subject: [RFC 4/4] drm/i915/display/dp: On LT failure retry LT
Date: Tue, 6 Feb 2024 16:17:59 +0530 [thread overview]
Message-ID: <20240206104759.2079133-5-arun.r.murthy@intel.com> (raw)
In-Reply-To: <20240206104759.2079133-1-arun.r.murthy@intel.com>
On link training failure retry link training with a lesser link
rate/lane count as specified in the DP spec.
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/i915/display/intel_ddi.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index ed7620e7f763..29d785a4b904 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -2502,6 +2502,7 @@ static void mtl_ddi_pre_enable_dp(struct intel_atomic_state *state,
crtc_state->port_clock,
crtc_state->lane_count);
+retry:
/*
* We only configure what the register value will be here. Actual
* enabling happens during link training farther down.
@@ -2586,7 +2587,14 @@ static void mtl_ddi_pre_enable_dp(struct intel_atomic_state *state,
* Pattern, wait for 5 idle patterns (DP_TP_STATUS Min_Idles_Sent)
* (timeout after 800 us)
*/
- intel_dp_start_link_train(intel_dp, crtc_state);
+ if (!intel_dp_start_link_train(intel_dp, crtc_state)) {
+ /* Link Training failed, retain */
+ intel_dp->link_trained = false;
+ intel_dp_stop_link_train(intel_dp, crtc_state);
+ encoder->post_disable(state, encoder,
+ crtc_state, conn_state);
+ goto retry;
+ }
/* 6.n Set DP_TP_CTL link training to Normal */
if (!is_trans_port_sync_mode(crtc_state))
--
2.25.1
next prev parent reply other threads:[~2024-02-06 10:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 10:47 [RFC 0/4] DP link training failure fallback Arun R Murthy
2024-02-06 10:47 ` [RFC 1/4] drm/i915/display/dp: Add DP fallback on LT Arun R Murthy
2024-02-06 22:41 ` Almahallawy, Khaled
2024-02-07 4:53 ` Murthy, Arun R
2024-02-13 18:11 ` Jani Nikula
2024-02-14 5:04 ` Murthy, Arun R
2024-02-14 11:23 ` Jani Nikula
2024-02-14 14:06 ` Murthy, Arun R
2024-02-14 15:02 ` Jani Nikula
2024-02-14 16:52 ` Ville Syrjälä
2024-02-06 10:47 ` [RFC 2/4] drm/i915/display/dp: Dont send hotplug event on LT failure Arun R Murthy
2024-02-06 11:39 ` Jani Nikula
2024-02-06 15:06 ` Murthy, Arun R
2024-02-07 6:28 ` Almahallawy, Khaled
2024-02-07 6:33 ` Murthy, Arun R
2024-02-06 10:47 ` [RFC 3/4] drm/i915/dp: use link rate and lane count in intel_dp struct Arun R Murthy
2024-02-13 18:13 ` Jani Nikula
2024-02-14 5:14 ` Murthy, Arun R
2024-02-14 11:36 ` Jani Nikula
2024-02-14 14:30 ` Murthy, Arun R
2024-02-14 16:32 ` Ville Syrjälä
2024-02-06 10:47 ` Arun R Murthy [this message]
2024-02-13 18:15 ` [RFC 4/4] drm/i915/display/dp: On LT failure retry LT Jani Nikula
2024-02-14 5:33 ` Murthy, Arun R
2024-02-14 11:30 ` Jani Nikula
2024-02-14 14:17 ` Murthy, Arun R
2024-02-06 12:19 ` ✗ Fi.CI.CHECKPATCH: warning for DP link training failure fallback Patchwork
2024-02-06 12:19 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-02-06 12:43 ` ✗ Fi.CI.BAT: failure " Patchwork
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=20240206104759.2079133-5-arun.r.murthy@intel.com \
--to=arun.r.murthy@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=uma.shankar@intel.com \
--cc=ville.syrjala@intel.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).