aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-05 03:50:58 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-05 04:21:36 -0500
commit15239099d7a7a9ecdc1ccb5b187ae4cda5488ff9 (patch)
treec509c1cf3b205796816c69d53bd1feb4c3e7d822 /drivers/gpu
parent0920a48719f1ceefc909387a64f97563848c7854 (diff)
drm/i915: enable irqs earlier when resuming
We need it to restore the ilk rc6 context, since the gpu wait no requires interrupts. But in general having interrupts around should help in code sanity, since more and more stuff is interrupt driven. This regression has been introduced in commit 3e9605018ab3e333d51cc90fccfde2031886763b Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Nov 27 16:22:54 2012 +0000 drm/i915: Rearrange code to only have a single method for waiting upon the ring Like in the driver load code we need to make sure that hotplug interrupts don't cause havoc with our modeset state, hence block them with the existing infrastructure. Again we ignore races where we might loose hotplug interrupts ... Note that the driver load part of the regression has already been fixed in commit 52d7ecedac3f96fb562cb482c139015372728638 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sat Dec 1 21:03:22 2012 +0100 drm/i915: reorder setup sequence to have irqs for output setup v2: Add a note to the commit message about which patch fixed the driver load part of the regression. Stable kernels need to backport both patches. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=54691 Cc: stable@vger.kernel.org (for 3.8 only, plese backport 52d7ecedac3f96fb5 first) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Reported-and-Tested-by: Ilya Tumaykin <itumaykin@gmail.com> Reviewed-by: Chris wilson <chris@chris-wilson.co.uk> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 2c5ee965e473..0a8eceb75902 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -495,6 +495,7 @@ static int i915_drm_freeze(struct drm_device *dev)
495 intel_modeset_disable(dev); 495 intel_modeset_disable(dev);
496 496
497 drm_irq_uninstall(dev); 497 drm_irq_uninstall(dev);
498 dev_priv->enable_hotplug_processing = false;
498 } 499 }
499 500
500 i915_save_state(dev); 501 i915_save_state(dev);
@@ -568,10 +569,20 @@ static int __i915_drm_thaw(struct drm_device *dev)
568 error = i915_gem_init_hw(dev); 569 error = i915_gem_init_hw(dev);
569 mutex_unlock(&dev->struct_mutex); 570 mutex_unlock(&dev->struct_mutex);
570 571
572 /* We need working interrupts for modeset enabling ... */
573 drm_irq_install(dev);
574
571 intel_modeset_init_hw(dev); 575 intel_modeset_init_hw(dev);
572 intel_modeset_setup_hw_state(dev, false); 576 intel_modeset_setup_hw_state(dev, false);
573 drm_irq_install(dev); 577
578 /*
579 * ... but also need to make sure that hotplug processing
580 * doesn't cause havoc. Like in the driver load code we don't
581 * bother with the tiny race here where we might loose hotplug
582 * notifications.
583 * */
574 intel_hpd_init(dev); 584 intel_hpd_init(dev);
585 dev_priv->enable_hotplug_processing = true;
575 } 586 }
576 587
577 intel_opregion_init(dev); 588 intel_opregion_init(dev);