drm/i915: initialize power wells in modeset_init_hw
authorEugeni Dodonov <eugeni.dodonov@intel.com>
Fri, 6 Jul 2012 18:42:36 +0000 (15:42 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Jul 2012 10:21:36 +0000 (12:21 +0200)
This initializes power wells within the modeset_init_hw routine.
Testing has shown that this works for both driver load time and for
suspend-resume code paths.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c

index 0972f49e15d820e9d366935dcf2855bad15721cd..80fe02d2d733c7326fbded035765e4422a4b5160 100644 (file)
@@ -7187,6 +7187,11 @@ static void ivb_pch_pwm_override(struct drm_device *dev)
 
 void intel_modeset_init_hw(struct drm_device *dev)
 {
+       /* We attempt to init the necessary power wells early in the initialization
+        * time, so the subsystems that expect power to be enabled can work.
+        */
+       intel_init_power_wells(dev);
+
        intel_prepare_ddi(dev);
 
        intel_init_clock_gating(dev);
index b7859e7110a7526a1ed897958be8f99a91798677..6f3bf22d32f5cd80432f61d99f54aa101b5f443a 100644 (file)
@@ -496,6 +496,7 @@ extern void intel_update_fbc(struct drm_device *dev);
 extern void intel_gpu_ips_init(struct drm_i915_private *dev_priv);
 extern void intel_gpu_ips_teardown(void);
 
+extern void intel_init_power_wells(struct drm_device *dev);
 extern void intel_enable_gt_powersave(struct drm_device *dev);
 extern void intel_disable_gt_powersave(struct drm_device *dev);
 extern void gen6_gt_check_fifodbg(struct drm_i915_private *dev_priv);
index a1495cd2a8e7015ee94f10432284304183bc1c5d..94aabcaa3a673a46aa0e9361133aa3331ed8e453 100644 (file)
@@ -3932,11 +3932,6 @@ void intel_init_pm(struct drm_device *dev)
                else
                        dev_priv->display.get_fifo_size = i830_get_fifo_size;
        }
-
-       /* We attempt to init the necessary power wells early in the initialization
-        * time, so the subsystems that expect power to be enabled can work.
-        */
-       intel_init_power_wells(dev);
 }
 
 static void __gen6_gt_wait_for_thread_c0(struct drm_i915_private *dev_priv)