diff mbox series

[v2,1/6] drm/i915/dp: Reset intel_dp->link_trained before retraining the link

Message ID 20240708190029.271247-2-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dp: Fix LTTPR detection | expand

Commit Message

Imre Deak July 8, 2024, 7 p.m. UTC
Regularly retraining a link during an atomic commit happens with the
given pipe/link already disabled and hence intel_dp->link_trained being
false. Ensure this also for retraining a DP SST link via direct calls to
the link training functions (vs. an actual commit as for DP MST). So far
nothing depended on this, however the next patch will depend on
link_trained==false for changing the LTTPR mode to non-transparent.

Cc: <stable@vger.kernel.org> # v5.15+
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Nautiyal, Ankit K July 11, 2024, 9:38 a.m. UTC | #1
On 7/9/2024 12:30 AM, Imre Deak wrote:
> Regularly retraining a link during an atomic commit happens with the
> given pipe/link already disabled and hence intel_dp->link_trained being
> false. Ensure this also for retraining a DP SST link via direct calls to
> the link training functions (vs. an actual commit as for DP MST). So far
> nothing depended on this, however the next patch will depend on
> link_trained==false for changing the LTTPR mode to non-transparent.
>
> Cc: <stable@vger.kernel.org> # v5.15+
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

> ---
>   drivers/gpu/drm/i915/display/intel_dp.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 3903f6ead6e66..59f11af3b0a1d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5314,6 +5314,8 @@ static int intel_dp_retrain_link(struct intel_encoder *encoder,
>   		const struct intel_crtc_state *crtc_state =
>   			to_intel_crtc_state(crtc->base.state);
>   
> +		intel_dp->link_trained = false;
> +
>   		intel_dp_check_frl_training(intel_dp);
>   		intel_dp_pcon_dsc_configure(intel_dp, crtc_state);
>   		intel_dp_start_link_train(NULL, intel_dp, crtc_state);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 3903f6ead6e66..59f11af3b0a1d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5314,6 +5314,8 @@  static int intel_dp_retrain_link(struct intel_encoder *encoder,
 		const struct intel_crtc_state *crtc_state =
 			to_intel_crtc_state(crtc->base.state);
 
+		intel_dp->link_trained = false;
+
 		intel_dp_check_frl_training(intel_dp);
 		intel_dp_pcon_dsc_configure(intel_dp, crtc_state);
 		intel_dp_start_link_train(NULL, intel_dp, crtc_state);