[Intel-gfx] [PATCH] drm/i915: Defer disabling output polling until after we cancel hpd work

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 7 14:40:44 UTC 2016


intel_hpd_cancel_work() cancels a task that wants to enable output
polling. If we lose a race here, that task can run after we have already
tried to disable output polling for suspend - leaving output polling
enabled as we go to sleep, and running immediately upon resume.

Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd")
References: https://bugs.freedesktop.org/show_bug.cgi?id=98040
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Lyude <cpaul at redhat.com>
Cc: stable at vger.kernel.org
---
 drivers/gpu/drm/i915/i915_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 89d322215c84..7bb08c503f75 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1416,8 +1416,6 @@ static int i915_drm_suspend(struct drm_device *dev)
 	 * properly. */
 	intel_display_set_init_power(dev_priv, true);
 
-	drm_kms_helper_poll_disable(dev);
-
 	pci_save_state(pdev);
 
 	error = i915_gem_suspend(dev);
@@ -1430,11 +1428,12 @@ static int i915_drm_suspend(struct drm_device *dev)
 	intel_guc_suspend(dev);
 
 	intel_display_suspend(dev);
-
 	intel_dp_mst_suspend(dev);
 
 	intel_runtime_pm_disable_interrupts(dev_priv);
+
 	intel_hpd_cancel_work(dev_priv);
+	drm_kms_helper_poll_disable(dev);
 
 	intel_suspend_encoders(dev_priv);
 
-- 
2.9.3



More information about the Intel-gfx mailing list