From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] drm/i915: Fix bogus hotplug warnings at resume
Patch-mainline: Never
References: bnc#828087

HP desktop with IVY eDP triggers tons of kernel warnings at S3/S4.
This is because the disablement of the hotplug is done after the
intel_modeset_disable() call.  Move it at the right place, and also
make sure to cancel any pending work.

This patch won't be needed for the upstream because the upstream
changed the hotplug handling code largely and this problem has been
already resolved differently.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/gpu/drm/i915/i915_drv.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -483,11 +483,12 @@ static int i915_drm_freeze(struct drm_de
 		}
 
 		cancel_delayed_work_sync(&dev_priv->rps.delayed_resume_work);
+		dev_priv->enable_hotplug_processing = false;
+		cancel_work_sync(&dev_priv->hotplug_work);
 
 		intel_modeset_disable(dev);
 
 		drm_irq_uninstall(dev);
-		dev_priv->enable_hotplug_processing = false;
 	}
 
 	i915_save_state(dev);
