From: Jesse Barnes Subject: [PATCH 4/4] Revert "drm/i915: disable interrupts earlier in the driver unload code" Date: Wed, 8 May 2013 10:45:16 -0700 Message-ID: <1368035116-3345-4-git-send-email-jbarnes@virtuousgeek.org> References: <1368035116-3345-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy12-pub.bluehost.com (oproxy12-pub.bluehost.com [50.87.16.10]) by gabe.freedesktop.org (Postfix) with SMTP id 43D2AE5C40 for ; Wed, 8 May 2013 10:45:20 -0700 (PDT) Received: from [67.161.37.189] (port=36351 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1Ua8QZ-0006oY-2P for intel-gfx@lists.freedesktop.org; Wed, 08 May 2013 11:45:19 -0600 In-Reply-To: <1368035116-3345-1-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This reverts commit fd0c06420d39958032655a04cfd194d5a7b38f83. --- drivers/gpu/drm/i915/intel_display.c | 19 +++++++------------ drivers/gpu/drm/i915/intel_pm.c | 3 --- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d0c5ecf..e22e752 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9674,23 +9674,12 @@ void intel_modeset_cleanup(struct drm_device *dev) struct drm_crtc *crtc; struct intel_crtc *intel_crtc; - /* - * Interrupts and polling as the first thing to avoid creating havoc. - * Too much stuff here (turning of rps, connectors, ...) would - * experience fancy races otherwise. - */ - drm_irq_uninstall(dev); - cancel_work_sync(&dev_priv->hotplug_work); - /* - * Due to the hpd irq storm handling the hotplug work can re-arm the - * poll handlers. Hence disable polling after hpd handling is shut down. - */ drm_kms_helper_poll_fini(dev); - mutex_lock(&dev->struct_mutex); intel_unregister_dsm_handler(); + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { /* Skip inactive CRTCs */ if (!crtc->fb) @@ -9708,6 +9697,12 @@ void intel_modeset_cleanup(struct drm_device *dev) mutex_unlock(&dev->struct_mutex); + /* Disable the irq before mode object teardown, for the irq might + * enqueue unpin/hotplug work. */ + drm_irq_uninstall(dev); + cancel_work_sync(&dev_priv->hotplug_work); + cancel_work_sync(&dev_priv->rps.work); + /* flush any delayed tasks or pending work */ flush_scheduled_work(); diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 081194d..992ff0d 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3729,9 +3729,6 @@ void intel_disable_gt_powersave(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; - /* Interrupts should be disabled already to avoid re-arming. */ - WARN_ON(dev->irq_enabled); - if (IS_IRONLAKE_M(dev)) { ironlake_disable_drps(dev); ironlake_disable_rc6(dev); -- 1.7.10.4