Skip to content

Commit 24b412b

Browse files
committed
drm/i915: Disable intel HPD poll after DRM poll init/enable
The only purpose of intel_hpd_poll_disable() during driver loading and system resume - at which point polling should be disabled anyway, except for connectors in an IRQ storm, for which the polling will stay enabled - is to force-detect all the connectors. However this detection in i915_hpd_poll_init_work() depends on drm.mode_config.poll_enabled, which will get set in drm_kms_helper_poll_init(), possibly after i915_hpd_poll_init_work() is scheduled. Hence the initial detection of connectors during driver loading may not happen. Fix the above by moving intel_hpd_poll_disable() after i915_hpd_poll_init_work(), the proper place anyway for doing the above detection after all the HW initialization steps are complete. Change the order the same way during system resume as well. The above race condition shouldn't matter here - as drm.mode_config.poll_enabled will be set - but the detection should happen here as well after the HW init steps are done. Link: https://patchwork.freedesktop.org/patch/msgid/20240104083008.2715733-5-imre.deak@intel.com Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com>
1 parent a1a0e86 commit 24b412b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/i915/display/intel_display_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ int intel_display_driver_probe(struct drm_i915_private *i915)
374374

375375
/* Only enable hotplug handling once the fbdev is fully set up. */
376376
intel_hpd_init(i915);
377-
intel_hpd_poll_disable(i915);
378377

379378
skl_watermark_ipc_init(i915);
380379

@@ -412,6 +411,7 @@ void intel_display_driver_register(struct drm_i915_private *i915)
412411
* fbdev->async_cookie.
413412
*/
414413
drm_kms_helper_poll_init(&i915->drm);
414+
intel_hpd_poll_disable(i915);
415415

416416
intel_display_device_info_print(DISPLAY_INFO(i915),
417417
DISPLAY_RUNTIME_INFO(i915), &p);

drivers/gpu/drm/i915/i915_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,9 @@ static int i915_drm_resume(struct drm_device *dev)
12481248
intel_dp_mst_resume(dev_priv);
12491249
intel_display_driver_resume(dev_priv);
12501250

1251-
intel_hpd_poll_disable(dev_priv);
12521251
if (HAS_DISPLAY(dev_priv))
12531252
drm_kms_helper_poll_enable(dev);
1253+
intel_hpd_poll_disable(dev_priv);
12541254

12551255
intel_opregion_resume(dev_priv);
12561256

0 commit comments

Comments
 (0)