summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-12-17 19:54:17 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2014-02-26 18:42:33 -0300
commit2fbe3807885d34a0eefa540b354f24dec6d4d023 (patch)
tree83f1af61ebc118a89c1b578c3704358407cfe713
parentd58bbe40a73f3259eeb1397eea14f66e1be33690 (diff)
drm/i915: get/put runtime PM when we get/put a power domain
Any power domain will require the HW to be in PCI D0 state, so just do the simple thing. Dear maintainer: since intel_display_power_put() and intel_display_power_get() are almost identical, git-am has failed apply the patch on my local machine once: it added both chunks to put(), instead of one chunk to get() and another to put(). When you apply this patch to your tree, please check if it is correct. v2: - Add the warning above. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 62ffa7d692e3..a466991f3c2e 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5384,6 +5384,8 @@ void intel_display_power_get(struct drm_device *dev,
struct i915_power_well *power_well;
int i;
+ intel_runtime_pm_get(dev_priv);
+
power_domains = &dev_priv->power_domains;
mutex_lock(&power_domains->lock);
@@ -5415,6 +5417,8 @@ void intel_display_power_put(struct drm_device *dev,
__intel_power_well_put(dev, power_well);
mutex_unlock(&power_domains->lock);
+
+ intel_runtime_pm_put(dev_priv);
}
static struct i915_power_domains *hsw_pwr;