On Thu, 2025-06-26 at 11:20 +0300, Imre Deak wrote: > From: Imre Deak <imre.d...@gmail.com> > > Move checking the link status for SST to > intel_dp_handle_link_service_irq(). This is the logical place for the > check which should only happen in response to a LINK_STATUS_CHANGE sink > IRQ. This IRQ is only supported by DPCD revision >= 1.2, so for sinks > with an older DPCD revision the link status is checked in response to > any HPD IRQ. For newer DPCD revisions however the link status check can > be made conditional on LINK_STATUS_CHANGE. > > For now keep the current behavior of always forcing a link status check > regardless of LINK_STATUS_CHANGE being set or not. > > This also prepares for a follow-up change sharing the link service IRQ > handler for SST and MST (on MST the link status check only happening in > response to a LINK_STATUS_CHANGE IRQ). > > Signed-off-by: Imre Deak <imre.d...@gmail.com> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > b/drivers/gpu/drm/i915/display/intel_dp.c > index 90f6fe20e4c0d..000c57da92d60 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -5481,6 +5481,9 @@ 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_check_link_state(intel_dp); > + > if (irq_mask & HDMI_LINK_STATUS_CHANGED) > intel_dp_handle_hdmi_link_status_change(intel_dp); > > @@ -5534,14 +5537,18 @@ intel_dp_short_pulse(struct intel_dp *intel_dp) > > intel_dp_handle_device_service_irq(intel_dp, esi[1]); > > + /* > + * 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 > + */ > + esi[3] |= LINK_STATUS_CHANGED; > if (intel_dp_handle_link_service_irq(intel_dp, esi[3])) > reprobe_needed = true; > > /* Handle CEC interrupts, if any */ > drm_dp_cec_irq(&intel_dp->aux); > > - intel_dp_check_link_state(intel_dp); > - > if (READ_ONCE(intel_dp->downstream_port_changed)) { > WRITE_ONCE(intel_dp->downstream_port_changed, false); > reprobe_needed = true;
Reviewed-by: Luca Coelho <luciano.coe...@intel.com> -- Cheers, Luca.