cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Nicusor Huhulea <nicusor.huhulea@siemens.com>
Cc: <stable@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	<cip-dev@lists.cip-project.org>,
	<shradhagupta@linux.microsoft.com>, <jouni.hogander@intel.com>,
	<neil.armstrong@linaro.org>, <jani.nikula@linux.intel.com>,
	<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
	<tzimmermann@suse.de>, <airlied@gmail.com>, <daniel@ffwll.ch>,
	<joonas.lahtinen@linux.intel.com>, <rodrigo.vivi@intel.com>,
	<laurentiu.palcu@oss.nxp.com>, <cedric.hombourger@siemens.com>,
	<shrikant.bobade@siemens.com>
Subject: Re: [PATCH] drm/probe-helper: fix output polling not resuming after HPD IRQ storm
Date: Tue, 5 Aug 2025 09:08:51 +0300	[thread overview]
Message-ID: <aJGf87brlJfxA80e@ideak-desk> (raw)
In-Reply-To: <20250804201359.112764-1-nicusor.huhulea@siemens.com>

On Mon, Aug 04, 2025 at 11:13:59PM +0300, Nicusor Huhulea wrote:
> 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>

Acked-by: Imre Deak <imre.deak@intel.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
> 


  reply	other threads:[~2025-08-05  7:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aJGf87brlJfxA80e@ideak-desk \
    --to=imre.deak@intel.com \
    --cc=airlied@gmail.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=jouni.hogander@intel.com \
    --cc=laurentiu.palcu@oss.nxp.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nicusor.huhulea@siemens.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=shradhagupta@linux.microsoft.com \
    --cc=shrikant.bobade@siemens.com \
    --cc=stable@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).