-----Original Message----- From: Imre Deak imre.deak@intel.com Sent: Wednesday, July 30, 2025 11:02 PM To: Huhulea, Nicusor Liviu (FT FDS CES LX PBU 1) 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; 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; tvrtko.ursulin@linux.intel.com; laurentiu.palcu@oss.nxp.com; Hombourger, Cedric (FT FDS CES LX) cedric.hombourger@siemens.com; Bobade, Shrikant Krishnarao (FT FDS CES LX PBU 1) shrikant.bobade@siemens.com Subject: Re: [PATCH 0/5] drm/i915: fixes for i915 Hot Plug Detection and build/runtime issues
Hi Nicusor,
thanks for the report and the root causing effort. The patchset itself has a few issues:
- commit cfd48ad8c4a9 ("drm/i915: Fix HPD polling, reenabling the output
poll work as needed") you backport fixes d33a54e3991d ("drm/probe_helper: sort out poll_running vs poll_enabled"), but this fixed commit is not part of the 6.1.y stable tree which you are targeting.
Similarly commit d33a54e3991d fixes c8268795c9a9 ("drm/probe-helper: enable and disable HPD on connectors"), which is not part of 6.1.y either.
This means the issue commit cfd48ad8c4a9 is fixing is not present in the 6.1.y tree, as the changes introducing that issue are not present in that tree either.
- The compile errors the patches in your patchset introduce would
prevent bisection, so fixing up these compile errors only at the end of the patchset is not ok; the tree should compile without errors at each patch/commit.
Looking at v6.1.y and the patchset I suspect the actual issue is the
commit 4ad8d57d902f ("drm: Check output polling initialized before disabling") backport in v6.1.y, which had the
if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll)
if (drm_WARN_ON_ONCE(dev, !dev->mode_config.poll_enabled) ||
!drm_kms_helper_poll || dev->mode_config.poll_running)
change, not part of the original
commit 5abffb66d12b ("drm: Check output polling initialized before disabling"). i.e. the original patch didn't add the check for dev->mode_config.poll_running. So could you try on top of v6.1.147 (w/o the changes in the patchset you posted):
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);
Thank you for your thorough explanation, especially regarding the bisecting issue. I hadn't anticipated that by fixing compile errors only at the end of the series, I would make bisection unreliable.
I have tested your idea/fix and it works. HPD polling works reliably on both devices. I can see the polling in logs when display cable is not connected.
Since this fix is mostly your solution, would you prefer to submit yourself, or would you like me to resubmit it as a v2 and credit you appropriately ?
If this doesn't resolve the issue, I think we need to figure out the actual root cause, for that could you please open at a ticket at
https://gitlab.freed/ esktop.org%2Fdrm%2Fi915%2Fkernel%2F- %2Fissues%2Fnew&data=05%7C02%7Cnicusor.huhulea%40siemens.com%7Cd78 e534c4c604c981c9108ddcfa41f44%7C38ae3bcd95794fd4addab42e1495d55a%7C1 %7C0%7C638895025993788215%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1h cGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyf Q%3D%3D%7C0%7C%7C%7C&sdata=nss8VV88cJo9qDB5YSlr1OKAYXMo6epa HcR1p355Lns%3D&reserved=0
attaching a dmesg log booting v6.1.147 and if possible also the latest drm-tip kernel with the drm.debug=0xe kernel parameter?
Thanks, Imre
On Wed, Jul 30, 2025 at 07:11:01PM +0300, Nicusor Huhulea wrote:
Hello maintainers,
This series addresses a defect observed on certain hardware platforms using Linux kernel 6.1.147 with the i915 driver. The issue concerns hot plug
detection (HPD) logic, leading to unreliable or missed detection events on affected hardware. This is happening on some specific devices.
### Background
Issue: On Simatic IPC227E, we observed unreliable or missing hot plug detection
events, while on Simatic IPC227G (otherwise similar platform), expected hot plug behavior was maintained.
Affected kernel: This patch series is intended for the Linux 6.1.y stable tree only (tested on
6.1.147)
Most of the tests were conducted on 6.1.147 (manual/standalone kernel build,
CIP/Isar context).
Root cause analysis: I do not have access to hardware signal traces or scope data to conclusively
prove the root cause at electrical level. My understanding is based on observed driver behavior and logs.
Therefore my assumption as to the real cause is that on IPC227G, HPD IRQ
storms are apparently not occurring, so the standard HPD IRQ-based detection works as expected. On IPC227E,
frequent HPD interrupts trigger the i915 driver's storm detection logic, causing
it to switch to polling mode. Therefore polling does not resume correctly, leading to the hotplug
issue this series addresses. Device IPC227E's behavior triggers this kernel
edge case, likely due to slight variations in signal integrity, electrical margins, or internal component timing.
Device IPC227G, functions as expected, possibly due to cleaner electrical
signaling or more optimal timing characteristics, thus avoiding the triggering condition.
Conclusion: This points to a hardware-software interaction where kernel code assumes
nicer signaling or margins than IPC227E is able to provide, exposing logic gaps not visible on more robust hardware.
### Patches
Patches 1-4: - Partial backports of upstream commits; only the relevant logic or fixes are
applied, with other code omitted due to downstream divergence.
- Applied minimal merging without exhaustive backport of all intermediate
upstream changes.
Patch 5: - Contains cherry-picked logic plus context/compatibility amendments as
needed. Ensures that the driver builds.
- Together these fixes greatly improve reliability of hotplug detection on both
devices, with no regression detected in our setups.
Thank you for your review, Nicusor Huhulea
This patch series contains the following changes:
Dmitry Baryshkov (2): drm/probe_helper: extract two helper functions drm/probe-helper: enable and disable HPD on connectors
Imre Deak (2): drm/i915: Fix HPD polling, reenabling the output poll work as needed drm: Add an HPD poll helper to reschedule the poll work
Nicusor Huhulea (1): drm/i915: fixes for i915 Hot Plug Detection and build/runtime issues
drivers/gpu/drm/drm_probe_helper.c | 127 ++++++++++++++----- drivers/gpu/drm/i915/display/intel_hotplug.c | 4 +- include/drm/drm_modeset_helper_vtables.h | 22 ++++ include/drm/drm_probe_helper.h | 1 + 4 files changed, 122 insertions(+), 32 deletions(-)
-- 2.39.2