cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Nicusor Huhulea <nicusor.huhulea@siemens.com>,
	<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 18:19:39 +0300	[thread overview]
Message-ID: <aJIhCyP2mwaaiS22@ideak-desk> (raw)
In-Reply-To: <z4jxkrseavbeblgji4cnbyeohkjv4ar3mbbdvothao6abfu6nf@nqlhcegwtwzf>

On Tue, Aug 05, 2025 at 01:46:51PM +0300, Dmitry Baryshkov wrote:
> 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.
> 
> Why doesn't disable path use drm_kms_helper_poll_disable() ?

In general i915 doesn't disable polling as a whole after an IRQ storm
and a 2 minute delay (or runtime resuming), since on some other
connectors the polling may be still required.

Also, in the 6.1.y stable tree drm_kms_helper_poll_disable() is:

        if (drm_WARN_ON(dev, !dev->mode_config.poll_enabled))
                return;

        cancel_delayed_work_sync(&dev->mode_config.output_poll_work);

so calling that wouldn't really fix the problem, which is clearly just
an incorrect backport of the upstream commit 5abffb66d12bcac8 ("drm:
Check output polling initialized before disabling") to the v6.1.y stable
tree by commit 4ad8d57d902f ("drm: Check output polling initialized
before disabling") in v6.1.y.

The upstream commit did not add the check for
dev->mode_config.poll_running in drm_kms_helper_poll_enable(), the
condition was only part of the diff context in the commit. Hence adding
the condition in the 4ad8d57d902f backport commit was incorrect.

> > 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/
> > 
> 
> -- 
> With best wishes
> Dmitry


  reply	other threads:[~2025-08-06  1:16 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
2025-08-05 10:46 ` Dmitry Baryshkov
2025-08-05 15:19   ` Imre Deak [this message]
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=aJIhCyP2mwaaiS22@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=dmitry.baryshkov@oss.qualcomm.com \
    --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).