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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Cc: Lyude <cpaul@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux