drm/i915/bxt: Enable DC5 during runtime resume
authorImre Deak <imre.deak@intel.com>
Wed, 20 Apr 2016 17:27:57 +0000 (20:27 +0300)
committerImre Deak <imre.deak@intel.com>
Fri, 22 Apr 2016 12:12:05 +0000 (15:12 +0300)
Right after runtime resume we know that we can re-enable DC5, since we
just disabled DC9 and power well 2 is disabled. So enable DC5 explicitly
instead of delaying this until the next time we disable power well 2.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1461173277-16090-5-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_runtime_pm.c

index a0f8913a76f88e50136d8579d56f24e56d0cf767..7a0e4d6c71e2302e0b50ad88a805cda6d549259d 100644 (file)
@@ -1601,6 +1601,9 @@ static int intel_runtime_resume(struct device *device)
        if (IS_BROXTON(dev)) {
                bxt_disable_dc9(dev_priv);
                bxt_display_core_init(dev_priv, true);
+               if (dev_priv->csr.dmc_payload &&
+                   (dev_priv->csr.allowed_dc_mask & DC_STATE_EN_UPTO_DC5))
+                       gen9_enable_dc5(dev_priv);
        } else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
                hsw_disable_pc8(dev_priv);
        } else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
index 5464632d466cdf9f2ba0ee04237002b0440aef17..b9f1304439e200a296a564d850b8d19f283e4b2c 100644 (file)
@@ -1238,6 +1238,7 @@ void broxton_ddi_phy_verify_state(struct drm_i915_private *dev_priv);
 void gen9_sanitize_dc_state(struct drm_i915_private *dev_priv);
 void bxt_enable_dc9(struct drm_i915_private *dev_priv);
 void bxt_disable_dc9(struct drm_i915_private *dev_priv);
+void gen9_enable_dc5(struct drm_i915_private *dev_priv);
 void skl_init_cdclk(struct drm_i915_private *dev_priv);
 int skl_sanitize_cdclk(struct drm_i915_private *dev_priv);
 void skl_uninit_cdclk(struct drm_i915_private *dev_priv);
index 8fff0800b4ed5332f38f71e0263f901e4786cda4..7fb1da4e7fc349dfdfe26bb32dd7e97192b2ec04 100644 (file)
@@ -582,7 +582,7 @@ static void assert_can_enable_dc5(struct drm_i915_private *dev_priv)
        assert_csr_loaded(dev_priv);
 }
 
-static void gen9_enable_dc5(struct drm_i915_private *dev_priv)
+void gen9_enable_dc5(struct drm_i915_private *dev_priv)
 {
        assert_can_enable_dc5(dev_priv);