]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Simplify condition to keep DMC active during S0ix
authorImre Deak <imre.deak@intel.com>
Wed, 22 Aug 2018 11:26:02 +0000 (14:26 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 23 Aug 2018 13:10:58 +0000 (16:10 +0300)
For S0ix we want to deinit power domains (and so deactivate the DMC
firmware) exactly when the platform supports the DC9 state. To reach
S0ix we need DC9 on these platforms (for which the DMC FW needs to be
deactivated) while to reach S0ix on the rest of the DMC platforms we
need DC6 (which needs the DMC FW to stay active).

Simplify the condition accordingly so it will be automatically
correct for upcoming DC9 platforms like ICL.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180822112602.27543-1-imre.deak@intel.com
drivers/gpu/drm/i915/intel_runtime_pm.c

index ff3fd8dbd2b4d5a057163d7a9655e915f02ee563..1b10b70415132f50f15457734f58e6ded7070852 100644 (file)
@@ -3848,13 +3848,14 @@ void intel_power_domains_suspend(struct drm_i915_private *dev_priv,
        intel_display_power_put(dev_priv, POWER_DOMAIN_INIT);
 
        /*
-        * In case of firmware assisted context save/restore don't manually
-        * deinit the power domains. This also means the CSR/DMC firmware will
-        * stay active, it will power down any HW resources as required and
-        * also enable deeper system power states that would be blocked if the
-        * firmware was inactive.
+        * In case of suspend-to-idle (aka S0ix) on a DMC platform without DC9
+        * support don't manually deinit the power domains. This also means the
+        * CSR/DMC firmware will stay active, it will power down any HW
+        * resources as required and also enable deeper system power states
+        * that would be blocked if the firmware was inactive.
         */
-       if (!IS_GEN9_LP(dev_priv) && suspend_mode == I915_DRM_SUSPEND_IDLE &&
+       if (!(dev_priv->csr.allowed_dc_mask & DC_STATE_EN_DC9) &&
+           suspend_mode == I915_DRM_SUSPEND_IDLE &&
            dev_priv->csr.dmc_payload != NULL) {
                intel_power_domains_verify_state(dev_priv);
                return;