aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 3657ab43c8fd..26c29c173221 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5688,6 +5688,8 @@ static void __intel_set_power_well(struct drm_device *dev, bool enable)
5688 unsigned long irqflags; 5688 unsigned long irqflags;
5689 uint32_t tmp; 5689 uint32_t tmp;
5690 5690
5691 WARN_ON(dev_priv->pc8.enabled);
5692
5691 tmp = I915_READ(HSW_PWR_WELL_DRIVER); 5693 tmp = I915_READ(HSW_PWR_WELL_DRIVER);
5692 is_enabled = tmp & HSW_PWR_WELL_STATE_ENABLED; 5694 is_enabled = tmp & HSW_PWR_WELL_STATE_ENABLED;
5693 enable_requested = tmp & HSW_PWR_WELL_ENABLE_REQUEST; 5695 enable_requested = tmp & HSW_PWR_WELL_ENABLE_REQUEST;
@@ -5747,16 +5749,24 @@ static void __intel_set_power_well(struct drm_device *dev, bool enable)
5747static void __intel_power_well_get(struct drm_device *dev, 5749static void __intel_power_well_get(struct drm_device *dev,
5748 struct i915_power_well *power_well) 5750 struct i915_power_well *power_well)
5749{ 5751{
5750 if (!power_well->count++) 5752 struct drm_i915_private *dev_priv = dev->dev_private;
5753
5754 if (!power_well->count++) {
5755 hsw_disable_package_c8(dev_priv);
5751 __intel_set_power_well(dev, true); 5756 __intel_set_power_well(dev, true);
5757 }
5752} 5758}
5753 5759
5754static void __intel_power_well_put(struct drm_device *dev, 5760static void __intel_power_well_put(struct drm_device *dev,
5755 struct i915_power_well *power_well) 5761 struct i915_power_well *power_well)
5756{ 5762{
5763 struct drm_i915_private *dev_priv = dev->dev_private;
5764
5757 WARN_ON(!power_well->count); 5765 WARN_ON(!power_well->count);
5758 if (!--power_well->count && i915_disable_power_well) 5766 if (!--power_well->count && i915_disable_power_well) {
5759 __intel_set_power_well(dev, false); 5767 __intel_set_power_well(dev, false);
5768 hsw_enable_package_c8(dev_priv);
5769 }
5760} 5770}
5761 5771
5762void intel_display_power_get(struct drm_device *dev, 5772void intel_display_power_get(struct drm_device *dev,