Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/dp_mst: Fix forced link retrain handling in MST HPD IRQ handler

Handling of a forced link retraining debugfs request via the DP MST HPD
IRQ handler is incorrectly skipped, if the IRQ handler doesn't see any
HPD IRQs raised by the sink. Fix this by ensuring that the request is
always handled (in the Fixes: commit below by directly calling
intel_dp_check_link_state(), later by the same call moved to
intel_dp_handle_link_service_irq()).

Cc: Luca Coelho <luciano.coelho@intel.com>
Fixes: db4855d90363 ("drm/i915/dp_mst: Reuse intel_dp_check_link_state() in the HPD IRQ handler")
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260311153152.133744-1-imre.deak@intel.com

Imre Deak e41e992c 5f6da193

+13 -3
+13 -3
drivers/gpu/drm/i915/display/intel_dp.c
··· 5575 5575 intel_dp_check_mst_status(struct intel_dp *intel_dp) 5576 5576 { 5577 5577 struct intel_display *display = to_intel_display(intel_dp); 5578 + bool force_retrain = intel_dp->link.force_retrain; 5578 5579 bool reprobe_needed = false; 5579 5580 5580 5581 for (;;) { 5581 5582 u8 esi[4] = {}; 5582 5583 u8 ack[4] = {}; 5584 + bool new_irqs; 5583 5585 5584 5586 if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) { 5585 5587 drm_dbg_kms(display->drm, ··· 5597 5595 5598 5596 intel_dp_mst_hpd_irq(intel_dp, esi, ack); 5599 5597 5600 - if (mem_is_zero(ack, sizeof(ack))) 5601 - break; 5598 + new_irqs = !mem_is_zero(ack, sizeof(ack)); 5602 5599 5603 5600 drm_WARN_ON(display->drm, ack[1] & ~INTEL_DP_DEVICE_SERVICE_IRQ_MASK_MST); 5604 5601 drm_WARN_ON(display->drm, ack[3] & ~INTEL_DP_LINK_SERVICE_IRQ_MASK_MST); 5605 5602 5606 - if (!intel_dp_ack_sink_irq_esi(intel_dp, ack)) 5603 + if (new_irqs && !intel_dp_ack_sink_irq_esi(intel_dp, ack)) 5607 5604 drm_dbg_kms(display->drm, "Failed to ack ESI\n"); 5608 5605 5609 5606 if (ack[1] & (DP_DOWN_REP_MSG_RDY | DP_UP_REQ_MSG_RDY)) 5610 5607 drm_dp_mst_hpd_irq_send_new_request(&intel_dp->mst.mgr); 5611 5608 5609 + if (force_retrain) { 5610 + /* Defer forced retraining to the regular link status check. */ 5611 + ack[3] |= LINK_STATUS_CHANGED; 5612 + force_retrain = false; 5613 + } 5614 + 5612 5615 if (intel_dp_handle_link_service_irq(intel_dp, ack[3])) 5613 5616 reprobe_needed = true; 5617 + 5618 + if (!new_irqs) 5619 + break; 5614 5620 } 5615 5621 5616 5622 return !reprobe_needed;