aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-01-25 13:59:15 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-27 18:26:10 -0500
commitcb10799c194369633b183262edc75ec4b3e4e346 (patch)
treefe842c21269b4d731b8e82c3f3a5720631a84604 /drivers/gpu
parentcc464b2a17c59adedbdc02cc54341d630354edc3 (diff)
drm/i915: turn on the power well before suspending
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c2
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h1
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 521a25376718..9cc8f8780cf8 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -470,6 +470,8 @@ static int i915_drm_freeze(struct drm_device *dev)
470{ 470{
471 struct drm_i915_private *dev_priv = dev->dev_private; 471 struct drm_i915_private *dev_priv = dev->dev_private;
472 472
473 intel_set_power_well(dev, true);
474
473 drm_kms_helper_poll_disable(dev); 475 drm_kms_helper_poll_disable(dev);
474 476
475 pci_save_state(dev->pdev); 477 pci_save_state(dev->pdev);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 32c30423eaca..fcdfe42e434c 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -668,6 +668,7 @@ extern void intel_gpu_ips_init(struct drm_i915_private *dev_priv);
668extern void intel_gpu_ips_teardown(void); 668extern void intel_gpu_ips_teardown(void);
669 669
670extern void intel_init_power_well(struct drm_device *dev); 670extern void intel_init_power_well(struct drm_device *dev);
671extern void intel_set_power_well(struct drm_device *dev, bool enable);
671extern void intel_enable_gt_powersave(struct drm_device *dev); 672extern void intel_enable_gt_powersave(struct drm_device *dev);
672extern void intel_disable_gt_powersave(struct drm_device *dev); 673extern void intel_disable_gt_powersave(struct drm_device *dev);
673extern void gen6_gt_check_fifodbg(struct drm_i915_private *dev_priv); 674extern void gen6_gt_check_fifodbg(struct drm_i915_private *dev_priv);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index b8cf16c06b1b..c97714e6a363 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4043,7 +4043,7 @@ void intel_init_clock_gating(struct drm_device *dev)
4043 dev_priv->display.init_clock_gating(dev); 4043 dev_priv->display.init_clock_gating(dev);
4044} 4044}
4045 4045
4046static void intel_set_power_well(struct drm_device *dev, bool enable) 4046void intel_set_power_well(struct drm_device *dev, bool enable)
4047{ 4047{
4048 struct drm_i915_private *dev_priv = dev->dev_private; 4048 struct drm_i915_private *dev_priv = dev->dev_private;
4049 bool is_enabled, enable_requested; 4049 bool is_enabled, enable_requested;