[PATCH 0/5] drm/i915: fixes for i915 Hot Plug Detection and build/runtime issues
Imre Deak
imre.deak at intel.com
Wed Jul 30 20:02:26 UTC 2025
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);
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.freedesktop.org/drm/i915/kernel/-/issues/new
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
>
More information about the dri-devel
mailing list