drm/i915/pm: drop intel_pm_setup()
authorJani Nikula <jani.nikula@intel.com>
Wed, 1 Mar 2023 13:54:16 +0000 (15:54 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 6 Mar 2023 16:25:58 +0000 (18:25 +0200)
All the init in intel_pm_setup() is related to runtime pm. Move them to
intel_runtime_pm_init_early(), and remove intel_pm_setup().

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b01f9bf0afa9abaece5d0f76aecde69e2679f662.1677678803.git.jani.nikula@intel.com
drivers/gpu/drm/i915/i915_driver.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/i915/intel_pm.h
drivers/gpu/drm/i915/intel_runtime_pm.c

index 4b40522..3539eb2 100644 (file)
@@ -250,7 +250,6 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
        /* This must be called before any calls to HAS_PCH_* */
        intel_detect_pch(dev_priv);
 
-       intel_pm_setup(dev_priv);
        intel_irq_init(dev_priv);
        intel_init_display_hooks(dev_priv);
        intel_init_clock_gating_hooks(dev_priv);
index 0cb2f8d..605c72e 100644 (file)
@@ -899,9 +899,3 @@ void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv)
                dev_priv->clock_gating_funcs = &nop_clock_gating_funcs;
        }
 }
-
-void intel_pm_setup(struct drm_i915_private *dev_priv)
-{
-       dev_priv->runtime_pm.suspended = false;
-       atomic_set(&dev_priv->runtime_pm.wakeref_count, 0);
-}
index eab60df..1dd464d 100644 (file)
@@ -15,6 +15,5 @@ struct intel_plane_state;
 void intel_init_clock_gating(struct drm_i915_private *dev_priv);
 void intel_suspend_hw(struct drm_i915_private *dev_priv);
 void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv);
-void intel_pm_setup(struct drm_i915_private *dev_priv);
 
 #endif /* __INTEL_PM_H__ */
index 1297467..cf51222 100644 (file)
@@ -652,6 +652,8 @@ void intel_runtime_pm_init_early(struct intel_runtime_pm *rpm)
 
        rpm->kdev = kdev;
        rpm->available = HAS_RUNTIME_PM(i915);
+       rpm->suspended = false;
+       atomic_set(&rpm->wakeref_count, 0);
 
        init_intel_runtime_pm_wakeref(rpm);
        INIT_LIST_HEAD(&rpm->lmem_userfault_list);