aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_runtime_pm.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2016-04-18 07:48:21 -0400
committerImre Deak <imre.deak@intel.com>2016-04-19 05:33:48 -0400
commitf74ed08d55a059a20dc1e513edc51c18dfaf2add (patch)
tree3dc05c647eae7669f66089bb37d996e0a07ae22e /drivers/gpu/drm/i915/intel_runtime_pm.c
parentbf93ba67e9c05882f05b7ca2d773cfc8bf462c2a (diff)
drm/i915/gen9: Fix runtime PM refcounting in case DMC firmware isn't loaded
While we disable runtime PM and with that display power well support if the DMC firmware isn't loaded, we still want to disable power wells during system suspend and driver unload. So drop/reacquire the corresponding power refcount during suspend/resume and driver unloading. This also means we have to check if DMC is not loaded and skip enabling DC states in the power well code. v2: - Reuse intel_csr_ucode_suspend() in intel_csr_ucode_fini() instead of opencoding the former. (Chris) - Add docbook comment to the public resume and suspend functions. CC: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1460980101-14713-1-git-send-email-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_runtime_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_runtime_pm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 1242fb5d3301..0ed3ec862733 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -809,6 +809,9 @@ static void gen9_dc_off_power_well_enable(struct drm_i915_private *dev_priv,
809static void gen9_dc_off_power_well_disable(struct drm_i915_private *dev_priv, 809static void gen9_dc_off_power_well_disable(struct drm_i915_private *dev_priv,
810 struct i915_power_well *power_well) 810 struct i915_power_well *power_well)
811{ 811{
812 if (!dev_priv->csr.dmc_payload)
813 return;
814
812 if (dev_priv->csr.allowed_dc_mask & DC_STATE_EN_UPTO_DC6) 815 if (dev_priv->csr.allowed_dc_mask & DC_STATE_EN_UPTO_DC6)
813 skl_enable_dc6(dev_priv); 816 skl_enable_dc6(dev_priv);
814 else if (dev_priv->csr.allowed_dc_mask & DC_STATE_EN_UPTO_DC5) 817 else if (dev_priv->csr.allowed_dc_mask & DC_STATE_EN_UPTO_DC5)