@@ -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"
@@ -769,3 +770,42 @@ void intel_display_driver_resume(struct intel_display *display)
if (state)
drm_atomic_state_put(state);
}
+
+void intel_display_driver_shutdown(struct intel_display *display)
+{
+ intel_power_domains_disable(display);
+
+ intel_fbdev_set_suspend(display->drm, FBINFO_STATE_SUSPENDED, true);
+ if (HAS_DISPLAY(display)) {
+ drm_kms_helper_poll_disable(display->drm);
+ intel_display_driver_disable_user_access(display);
+
+ drm_atomic_helper_shutdown(display->drm);
+ }
+
+ intel_dp_mst_suspend(display);
+}
+
+void intel_display_driver_shutdown_noirq(struct intel_display *display)
+{
+ intel_hpd_cancel_work(display);
+
+ if (HAS_DISPLAY(display))
+ intel_display_driver_suspend_access(display);
+
+ intel_encoder_suspend_all(display);
+ intel_encoder_shutdown_all(display);
+
+ intel_dmc_suspend(display);
+}
+
+void intel_display_driver_shutdown_nogem(struct intel_display *display)
+{
+ /*
+ * 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(display);
+}
@@ -26,6 +26,9 @@ void intel_display_driver_remove_nogem(struct intel_display *display);
void intel_display_driver_unregister(struct intel_display *display);
int intel_display_driver_suspend(struct intel_display *display);
void intel_display_driver_resume(struct intel_display *display);
+void intel_display_driver_shutdown(struct intel_display *display);
+void intel_display_driver_shutdown_noirq(struct intel_display *display);
+void intel_display_driver_shutdown_nogem(struct intel_display *display);
/* interface for intel_display_reset.c */
int __intel_display_driver_resume(struct intel_display *display,
@@ -971,43 +971,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(display);
-
- 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(display);
-
- drm_atomic_helper_shutdown(&i915->drm);
- }
- intel_dp_mst_suspend(display);
+ intel_display_driver_shutdown(display);
intel_irq_suspend(i915);
- intel_hpd_cancel_work(i915);
- if (HAS_DISPLAY(i915))
- intel_display_driver_suspend_access(display);
-
- intel_encoder_suspend_all(&i915->display);
- intel_encoder_shutdown_all(&i915->display);
-
- intel_dmc_suspend(&i915->display);
+ intel_display_driver_shutdown_noirq(display);
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(display);
+ intel_display_driver_shutdown_nogem(display);
+
enable_rpm_wakeref_asserts(&i915->runtime_pm);
intel_runtime_pm_driver_last_release(&i915->runtime_pm);