@@ -561,6 +561,13 @@ void intel_display_driver_register(struct drm_i915_private *i915)
intel_display_device_info_print(DISPLAY_INFO(i915),
DISPLAY_RUNTIME_INFO(i915), &p);
+
+ intel_power_domains_enable(i915);
+}
+
+void intel_display_driver_cleanup(struct drm_i915_private *i915)
+{
+ intel_power_domains_cleanup(i915);
}
/* part #1: call before irq uninstall */
@@ -638,6 +645,8 @@ void intel_display_driver_unregister(struct drm_i915_private *i915)
if (!HAS_DISPLAY(i915))
return;
+ intel_power_domains_disable(i915);
+
drm_client_dev_unregister(&i915->drm);
/*
@@ -20,6 +20,7 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915);
int intel_display_driver_probe_nogem(struct drm_i915_private *i915);
int intel_display_driver_probe(struct drm_i915_private *i915);
void intel_display_driver_register(struct drm_i915_private *i915);
+void intel_display_driver_cleanup(struct drm_i915_private *i915);
void intel_display_driver_remove(struct drm_i915_private *i915);
void intel_display_driver_remove_noirq(struct drm_i915_private *i915);
void intel_display_driver_remove_nogem(struct drm_i915_private *i915);
@@ -287,7 +287,7 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
static void i915_driver_late_release(struct drm_i915_private *dev_priv)
{
intel_irq_fini(dev_priv);
- intel_power_domains_cleanup(dev_priv);
+ intel_display_driver_cleanup(dev_priv);
i915_gem_cleanup_early(dev_priv);
intel_gt_driver_late_release_all(dev_priv);
intel_region_ttm_device_fini(dev_priv);
@@ -634,7 +634,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
intel_display_driver_register(dev_priv);
- intel_power_domains_enable(dev_priv);
intel_runtime_pm_enable(&dev_priv->runtime_pm);
intel_register_dsm_handler();
@@ -657,7 +656,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
intel_unregister_dsm_handler();
intel_runtime_pm_disable(&dev_priv->runtime_pm);
- intel_power_domains_disable(dev_priv);
intel_display_driver_unregister(dev_priv);
@@ -107,7 +107,7 @@ static void xe_display_fini_nommio(struct drm_device *dev, void *dummy)
if (!xe->info.probe_display)
return;
- intel_power_domains_cleanup(xe);
+ intel_display_driver_cleanup(xe);
}
int xe_display_init_nommio(struct xe_device *xe)
@@ -219,7 +219,6 @@ void xe_display_register(struct xe_device *xe)
return;
intel_display_driver_register(xe);
- intel_power_domains_enable(xe);
intel_register_dsm_handler();
}
@@ -229,7 +228,6 @@ void xe_display_unregister(struct xe_device *xe)
return;
intel_unregister_dsm_handler();
- intel_power_domains_disable(xe);
intel_display_driver_unregister(xe);
}