> Subject: [PATCH 2/2] drm/i915/dp: Simplify forcing a link retraining
> 
> Since both the DP SST and MST HPD IRQ handlers call
> intel_dp_handle_link_service_irq() with LINK_STATUS_CHANGED set in
> irq_mask if intel_dp->link.force_retrain is set, checking for the former flag 
> is
> sufficient to determine if the link status needs to be checked (which includes
> retraining the link if this is forced); remove checking for the latter flag.
> 
> Since LINK_STATUS_CHANGED is currently set unconditionally for DP SST,
> extend the related comment to note that it must be set if intel_dp-
> >link.force_retrain is set (in case setting LINK_STATUS_CHANGED becomes
> conditional on DPCD_REV).
> 
> Signed-off-by: Imre Deak <[email protected]>

LGTM,
Reviewed-by: Suraj Kandpal <[email protected]>

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 2ae030eda73ee..4955bd8b11d7a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5925,7 +5925,7 @@ static bool intel_dp_handle_link_service_irq(struct
> intel_dp *intel_dp, u8 irq_m
>       if (irq_mask & RX_CAP_CHANGED)
>               reprobe_needed = true;
> 
> -     if ((irq_mask & LINK_STATUS_CHANGED) || intel_dp-
> >link.force_retrain)
> +     if (irq_mask & LINK_STATUS_CHANGED)
>               intel_dp_check_link_state(intel_dp);
> 
>       if (irq_mask & HDMI_LINK_STATUS_CHANGED) @@ -5984,7 +5984,7
> @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
>       /*
>        * Force checking the link status for DPCD_REV < 1.2
>        * TODO: let the link status check depend on LINK_STATUS_CHANGED
> -      * for DPCD_REV >= 1.2
> +      * or intel_dp->link.force_retrain for DPCD_REV >= 1.2
>        */
>       esi[3] |= LINK_STATUS_CHANGED;
>       if (intel_dp_handle_link_service_irq(intel_dp, esi[3]))
> --
> 2.49.1

Reply via email to