diff options
author | Dave Airlie <airlied@redhat.com> | 2015-05-15 07:21:18 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-05-15 07:21:18 +0200 |
commit | 472313245645661c3bc710f874e660c493d313e1 (patch) | |
tree | 0e6ac1f69b83c32cd8505d9863801dba7c4cea3f /drivers | |
parent | Merge branch 'drm-fixes-4.1' of git://people.freedesktop.org/~agd5f/linux int... (diff) | |
parent | drm/i915: Avoid GPU hang when coming out of s3 or s4 (diff) | |
download | linux-472313245645661c3bc710f874e660c493d313e1.tar.xz linux-472313245645661c3bc710f874e660c493d313e1.zip |
Merge tag 'drm-intel-fixes-2015-05-13' of git://anongit.freedesktop.org/drm-intel into drm-fixes
fix one gpu hang on resume.
* tag 'drm-intel-fixes-2015-05-13' of git://anongit.freedesktop.org/drm-intel:
drm/i915: Avoid GPU hang when coming out of s3 or s4
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index c302ffb5a168..a19d2c71e205 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -699,6 +699,16 @@ static int i915_drm_resume(struct drm_device *dev) intel_init_pch_refclk(dev); drm_mode_config_reset(dev); + /* + * Interrupts have to be enabled before any batches are run. If not the + * GPU will hang. i915_gem_init_hw() will initiate batches to + * update/restore the context. + * + * Modeset enabling in intel_modeset_init_hw() also needs working + * interrupts. + */ + intel_runtime_pm_enable_interrupts(dev_priv); + mutex_lock(&dev->struct_mutex); if (i915_gem_init_hw(dev)) { DRM_ERROR("failed to re-initialize GPU, declaring wedged!\n"); @@ -706,9 +716,6 @@ static int i915_drm_resume(struct drm_device *dev) } mutex_unlock(&dev->struct_mutex); - /* We need working interrupts for modeset enabling ... */ - intel_runtime_pm_enable_interrupts(dev_priv); - intel_modeset_init_hw(dev); spin_lock_irq(&dev_priv->irq_lock); |