[PATCH v2 5/6] drm/i915/gen9: Get a reference for PW1 and MISC_IO power wells

Imre Deak imre.deak at intel.com
Thu Feb 16 15:34:18 UTC 2017


So far we only enabled/disabled the PW1 and MISC_IO power wells without
taking a refcount for them. This wasn't a problem since they were not
shared, but the missing refcount would cause a mismatch during state
verification added in the next patch. Avoid this by taking a reference.

Cc: Ander Conselvan de Oliveira <conselvan2 at gmail.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 44d4da3..812bcf4 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -2465,10 +2465,10 @@ static void skl_display_core_init(struct drm_i915_private *dev_priv,
 	mutex_lock(&power_domains->lock);
 
 	well = lookup_power_well(dev_priv, SKL_DISP_PW_1);
-	intel_power_well_enable(dev_priv, well);
+	intel_power_well_get(dev_priv, well);
 
 	well = lookup_power_well(dev_priv, SKL_DISP_PW_MISC_IO);
-	intel_power_well_enable(dev_priv, well);
+	intel_power_well_get(dev_priv, well);
 
 	mutex_unlock(&power_domains->lock);
 
@@ -2497,10 +2497,10 @@ static void skl_display_core_uninit(struct drm_i915_private *dev_priv)
 	mutex_lock(&power_domains->lock);
 
 	well = lookup_power_well(dev_priv, SKL_DISP_PW_MISC_IO);
-	intel_power_well_disable(dev_priv, well);
+	intel_power_well_put(dev_priv, well);
 
 	well = lookup_power_well(dev_priv, SKL_DISP_PW_1);
-	intel_power_well_disable(dev_priv, well);
+	intel_power_well_put(dev_priv, well);
 
 	mutex_unlock(&power_domains->lock);
 }
@@ -2528,7 +2528,7 @@ void bxt_display_core_init(struct drm_i915_private *dev_priv,
 	mutex_lock(&power_domains->lock);
 
 	well = lookup_power_well(dev_priv, SKL_DISP_PW_1);
-	intel_power_well_enable(dev_priv, well);
+	intel_power_well_get(dev_priv, well);
 
 	mutex_unlock(&power_domains->lock);
 
@@ -2557,7 +2557,7 @@ void bxt_display_core_uninit(struct drm_i915_private *dev_priv)
 	mutex_lock(&power_domains->lock);
 
 	well = lookup_power_well(dev_priv, SKL_DISP_PW_1);
-	intel_power_well_disable(dev_priv, well);
+	intel_power_well_put(dev_priv, well);
 
 	mutex_unlock(&power_domains->lock);
 }
-- 
2.5.0



More information about the Intel-gfx-trybot mailing list