For consistency move the INIT power domain disabling to the same call-stack level with the corresponding enabling. This change will remove the disable call via intel_finish_reset() and intel_lid_notify(), but this is fine: we didn't enable the INIT power domain on these paths to begin with, so the disable call was just a NOP. (Enabling the INIT power domain on these paths is not needed either since we access the HW directly only for old HW without RPM support, or do a full modeset restore, which knows how to enable any required power domain.) Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/intel_display.c | 3 --- drivers/gpu/drm/i915/intel_runtime_pm.c | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 6b10e37..13fa585 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -609,6 +609,8 @@ static int i915_load_modeset_init(struct drm_device *dev) if (ret) goto cleanup_irq; + intel_display_set_init_power(dev_priv, false); + intel_uc_init_fw(dev_priv); ret = i915_gem_init(dev_priv); @@ -1670,6 +1672,8 @@ static int i915_drm_resume(struct drm_device *dev) intel_display_resume(dev); + intel_display_set_init_power(dev_priv, false); + drm_kms_helper_poll_enable(dev); /* diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9a28a89..0920291 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -15610,9 +15610,6 @@ intel_modeset_setup_hw_state(struct drm_device *dev) if (WARN_ON(put_domains)) modeset_put_power_domains(dev_priv, put_domains); } - intel_display_set_init_power(dev_priv, false); - - intel_power_domains_verify_state(dev_priv); intel_fbc_init_pipe_state(dev_priv); } diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index ecc43c6..0fb5bfb 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -270,6 +270,13 @@ void intel_display_set_init_power(struct drm_i915_private *dev_priv, intel_display_power_put(dev_priv, POWER_DOMAIN_INIT); dev_priv->power_domains.init_power_on = enable; + + if (!enable) + /* + * By this point all enabled power wells must have a reference + * and all unneeded power wells must be disabled; verify this. + */ + intel_power_domains_verify_state(dev_priv); } /* -- 2.5.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx