cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/probe-helper: fix output polling not resuming after HPD IRQ storm
@ 2025-08-04 20:13 Nicusor Huhulea
  2025-08-05  6:08 ` Imre Deak
  2025-08-05 10:46 ` Dmitry Baryshkov
  0 siblings, 2 replies; 7+ messages in thread
From: Nicusor Huhulea @ 2025-08-04 20:13 UTC (permalink / raw)
  To: stable
  Cc: dri-devel, intel-gfx, cip-dev, shradhagupta, imre.deak,
	jouni.hogander, neil.armstrong, jani.nikula, maarten.lankhorst,
	mripard, tzimmermann, airlied, daniel, joonas.lahtinen,
	rodrigo.vivi, laurentiu.palcu, cedric.hombourger, shrikant.bobade,
	Nicusor Huhulea

A regression in output polling was introduced by commit 4ad8d57d902fbc7c82507cfc1b031f3a07c3de6e
("drm: Check output polling initialized before disabling") in the 6.1.y stable tree.
As a result, when the i915 driver detects an HPD IRQ storm and attempts to switch
from IRQ-based hotplug detection to polling, output polling fails to resume.

The root cause is the use of dev->mode_config.poll_running. Once poll_running is set
(during the first connector detection) the calls to drm_kms_helper_poll_enable(), such as
intel_hpd_irq_storm_switch_to_polling() fails to schedule output_poll_work as expected.
Therefore, after an IRQ storm disables HPD IRQs, polling does not start, breaking hotplug detection.

The fix is to remove the dev->mode_config.poll_running in the check condition, ensuring polling
is always scheduled as requested.

Notes:
 Initial analysis, assumptions, device testing details, the correct fix and detailed rationale
 were discussed here https://lore.kernel.org/stable/aI32HUzrT95nS_H9@ideak-desk/

Cc: stable@vger.kernel.org # 6.1.y
Cc: Imre Deak <imre.deak@intel.com>
Cc: Shradha Gupta <shradhagupta@linux.microsoft.com>
Suggested-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
---
 drivers/gpu/drm/drm_probe_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 0e5eadc6d44d..a515b78f839e 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -250,7 +250,7 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
 	unsigned long delay = DRM_OUTPUT_POLL_PERIOD;
 
 	if (drm_WARN_ON_ONCE(dev, !dev->mode_config.poll_enabled) ||
-	    !drm_kms_helper_poll || dev->mode_config.poll_running)
+	    !drm_kms_helper_poll)
 		return;
 
 	drm_connector_list_iter_begin(dev, &conn_iter);
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-07  6:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 20:13 [PATCH] drm/probe-helper: fix output polling not resuming after HPD IRQ storm Nicusor Huhulea
2025-08-05  6:08 ` Imre Deak
2025-08-05 10:46 ` Dmitry Baryshkov
2025-08-05 15:19   ` Imre Deak
2025-08-06 12:02     ` nicusor.huhulea
2025-08-06 12:33       ` Dmitry Baryshkov
2025-08-06 14:27         ` nicusor.huhulea

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).