@@ -39,6 +39,7 @@
#include "intel_dp_tunnel.h"
#include "intel_dpll.h"
#include "intel_dpll_mgr.h"
+#include "intel_encoder.h"
#include "intel_fb.h"
#include "intel_fbc.h"
#include "intel_fbdev.h"
@@ -762,3 +763,42 @@ void intel_display_driver_resume(struct drm_i915_private *i915)
if (state)
drm_atomic_state_put(state);
}
+
+void intel_display_driver_shutdown(struct drm_i915_private *i915)
+{
+ intel_power_domains_disable(i915);
+
+ intel_fbdev_set_suspend(&i915->drm, FBINFO_STATE_SUSPENDED, true);
+ if (HAS_DISPLAY(i915)) {
+ drm_kms_helper_poll_disable(&i915->drm);
+ intel_display_driver_disable_user_access(i915);
+
+ drm_atomic_helper_shutdown(&i915->drm);
+ }
+
+ intel_dp_mst_suspend(i915);
+}
+
+void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915)
+{
+ intel_hpd_cancel_work(i915);
+
+ if (HAS_DISPLAY(i915))
+ intel_display_driver_suspend_access(i915);
+
+ intel_encoder_suspend_all(&i915->display);
+ intel_encoder_shutdown_all(&i915->display);
+
+ intel_dmc_suspend(&i915->display);
+}
+
+void intel_display_driver_shutdown_nogem(struct drm_i915_private *i915)
+{
+ /*
+ * The only requirement is to reboot with display DC states disabled,
+ * for now leaving all display power wells in the INIT power domain
+ * enabled.
+ */
+
+ intel_power_domains_driver_remove(i915);
+}
@@ -26,6 +26,9 @@ void intel_display_driver_remove_nogem(struct drm_i915_private *i915);
void intel_display_driver_unregister(struct drm_i915_private *i915);
int intel_display_driver_suspend(struct drm_i915_private *i915);
void intel_display_driver_resume(struct drm_i915_private *i915);
+void intel_display_driver_shutdown(struct drm_i915_private *i915);
+void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915);
+void intel_display_driver_shutdown_nogem(struct drm_i915_private *i915);
/* interface for intel_display_reset.c */
int __intel_display_driver_resume(struct drm_i915_private *i915,
@@ -945,43 +945,24 @@ void i915_driver_shutdown(struct drm_i915_private *i915)
{
disable_rpm_wakeref_asserts(&i915->runtime_pm);
intel_runtime_pm_disable(&i915->runtime_pm);
- intel_power_domains_disable(i915);
- intel_fbdev_set_suspend(&i915->drm, FBINFO_STATE_SUSPENDED, true);
- if (HAS_DISPLAY(i915)) {
- drm_kms_helper_poll_disable(&i915->drm);
- intel_display_driver_disable_user_access(i915);
-
- drm_atomic_helper_shutdown(&i915->drm);
- }
-
- intel_dp_mst_suspend(i915);
+ intel_display_driver_shutdown(i915);
intel_irq_suspend(i915);
- intel_hpd_cancel_work(i915);
-
- if (HAS_DISPLAY(i915))
- intel_display_driver_suspend_access(i915);
- intel_encoder_suspend_all(&i915->display);
- intel_encoder_shutdown_all(&i915->display);
-
- intel_dmc_suspend(&i915->display);
+ intel_display_driver_shutdown_noirq(i915);
i915_gem_suspend(i915);
/*
- * The only requirement is to reboot with display DC states disabled,
- * for now leaving all display power wells in the INIT power domain
- * enabled.
- *
* TODO:
* - unify the pci_driver::shutdown sequence here with the
* pci_driver.driver.pm.poweroff,poweroff_late sequence.
* - unify the driver remove and system/runtime suspend sequences with
* the above unified shutdown/poweroff sequence.
*/
- intel_power_domains_driver_remove(i915);
+ intel_display_driver_shutdown_nogem(i915);
+
enable_rpm_wakeref_asserts(&i915->runtime_pm);
intel_runtime_pm_driver_last_release(&i915->runtime_pm);