summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2016-03-16 13:39:00 +0200
committerImre Deak <imre.deak@intel.com>2016-03-17 15:22:06 +0200
commit250ad48e2e2f2aeebafd52d67768392eca5077ad (patch)
treeb1f93c002db3e204bf65d19f80b27129776c544b /drivers/gpu/drm/i915/i915_dma.c
parent3487b66ba13c1a7ba1185028ad0dae95e97bd4d2 (diff)
drm/i915: Move unload time display power domain uninit later
Move the power domain uninitialization later so that it matches its corresponding init order. Since we access the HW during the later unitialization steps keep a wake reference until after the last such step. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1458128348-15730-12-git-send-email-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 2bdafa998704..40a5af4038ca 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1212,7 +1212,7 @@ int i915_driver_unload(struct drm_device *dev)
return ret;
}
- intel_power_domains_fini(dev_priv);
+ intel_display_power_get(dev_priv, POWER_DOMAIN_INIT);
i915_audio_component_cleanup(dev_priv);
@@ -1268,6 +1268,8 @@ int i915_driver_unload(struct drm_device *dev)
mutex_unlock(&dev->struct_mutex);
intel_fbc_cleanup_cfb(dev_priv);
+ intel_power_domains_fini(dev_priv);
+
pm_qos_remove_request(&dev_priv->pm_qos);
i915_global_gtt_cleanup(dev);
@@ -1276,6 +1278,9 @@ int i915_driver_unload(struct drm_device *dev)
i915_mmio_cleanup(dev);
pci_dev_put(dev_priv->bridge_dev);
+
+ intel_display_power_put(dev_priv, POWER_DOMAIN_INIT);
+
i915_gem_load_cleanup(dev);
i915_workqueues_cleanup(dev_priv);
kfree(dev_priv);