Skip to content

Commit 50452f2

Browse files
committed
drm/i915: Fix HPD polling, reenabling the output poll work as needed
After the commit in the Fixes: line below, HPD polling stopped working on i915, since after that change calling drm_kms_helper_poll_enable() doesn't restart drm_mode_config::output_poll_work if the work was stopped (no connectors needing polling) and enabling polling for a connector (during runtime suspend or detecting an HPD IRQ storm). After the above change calling drm_kms_helper_poll_enable() is a nop after it's been called already and polling for some connectors was disabled/re-enabled. Fix this by calling drm_kms_helper_poll_reschedule() added in the previous patch instead, which reschedules the work whenever expected. Fixes: d33a54e ("drm/probe_helper: sort out poll_running vs poll_enabled") CC: [email protected] # 6.4+ Cc: Dmitry Baryshkov <[email protected]> Cc: [email protected] Reviewed-by: Jouni Högander <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent fe2352f commit 50452f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
212212

213213
/* Enable polling and queue hotplug re-enabling. */
214214
if (hpd_disabled) {
215-
drm_kms_helper_poll_enable(&dev_priv->drm);
215+
drm_kms_helper_poll_reschedule(&dev_priv->drm);
216216
mod_delayed_work(dev_priv->unordered_wq,
217217
&dev_priv->display.hotplug.reenable_work,
218218
msecs_to_jiffies(HPD_STORM_REENABLE_DELAY));
@@ -727,7 +727,7 @@ static void i915_hpd_poll_init_work(struct work_struct *work)
727727
drm_connector_list_iter_end(&conn_iter);
728728

729729
if (enabled)
730-
drm_kms_helper_poll_enable(&dev_priv->drm);
730+
drm_kms_helper_poll_reschedule(&dev_priv->drm);
731731

732732
mutex_unlock(&dev_priv->drm.mode_config.mutex);
733733

0 commit comments

Comments
 (0)