drm/i915: turn on the power well before suspending
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 25 Jan 2013 18:59:15 +0000 (16:59 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 27 Jan 2013 23:26:10 +0000 (00:26 +0100)
Our suspend code touches a lot of registers all over the place, so we
need to enable the power well before suspending.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
[danvet: Fixup compilation by stealing the header decl from the
dynamic power wells patch.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c

index 521a253767180484dbc6c5e72c643216ec33e8a8..9cc8f8780cf8d845934a9c622396d443fba96b1f 100644 (file)
@@ -470,6 +470,8 @@ static int i915_drm_freeze(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
 
+       intel_set_power_well(dev, true);
+
        drm_kms_helper_poll_disable(dev);
 
        pci_save_state(dev->pdev);
index 32c30423eaca56ee297ab9f4851ab912a593fcbf..fcdfe42e434c3c29755d7ec0f753f90382cef120 100644 (file)
@@ -668,6 +668,7 @@ extern void intel_gpu_ips_init(struct drm_i915_private *dev_priv);
 extern void intel_gpu_ips_teardown(void);
 
 extern void intel_init_power_well(struct drm_device *dev);
+extern void intel_set_power_well(struct drm_device *dev, bool enable);
 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 b8cf16c06b1bdd3df62faf9b22dcfb44e994b906..c97714e6a36369e3700eee2adfacc12306170f32 100644 (file)
@@ -4043,7 +4043,7 @@ void intel_init_clock_gating(struct drm_device *dev)
        dev_priv->display.init_clock_gating(dev);
 }
 
-static void intel_set_power_well(struct drm_device *dev, bool enable)
+void intel_set_power_well(struct drm_device *dev, bool enable)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        bool is_enabled, enable_requested;