drm/i915: Pull intel_init_power_well() out of intel_modeset_init_hw()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 16 Sep 2013 14:38:31 +0000 (17:38 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Sep 2013 21:48:46 +0000 (23:48 +0200)
The init and resume codepaths want to handel the power well in slightly
different ways, so pull the power well init out from
intel_modeset_init_hw() which gets called in both cases.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_display.c

index f4f98957ce4721e41954b1e7e32513974c677b06..1eaa0be392dcacc337c99c542ed97fe82b84d862 100644 (file)
@@ -1324,6 +1324,8 @@ static int i915_load_modeset_init(struct drm_device *dev)
 
        INIT_WORK(&dev_priv->console_resume_work, intel_console_resume);
 
+       intel_init_power_well(dev);
+
        intel_modeset_gem_init(dev);
 
        /* Always safe in the mode setting case. */
index 75e7550064f42ec0dedf6cd6af27d0f7470f7fcf..6f385e1e9ed6dc5c61751a531836373146bdfaae 100644 (file)
@@ -605,6 +605,8 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
                /* We need working interrupts for modeset enabling ... */
                drm_irq_install(dev);
 
+               intel_init_power_well(dev);
+
                intel_modeset_init_hw(dev);
 
                drm_modeset_lock_all(dev);
index 1a4232e446fe6104932aeff102d5317554d3b9b1..1dd474ecc240da9f28970f5bd418122d8b60dee0 100644 (file)
@@ -10273,8 +10273,6 @@ static void i915_enable_vga(struct drm_device *dev)
 
 void intel_modeset_init_hw(struct drm_device *dev)
 {
-       intel_init_power_well(dev);
-
        intel_prepare_ddi(dev);
 
        intel_init_clock_gating(dev);