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@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_dma.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index da1bea8..b50d111 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1213,7 +1213,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); @@ -1269,6 +1269,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); @@ -1277,6 +1279,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); -- 2.5.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx