mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 15:22:21 -04:00
drm/{i915,xe}: add intel_display_driver_shutdown_late()
Add new function intel_display_driver_shutdown_late() to be called "later" in the struct pci_driver .shutdown hook. There's a slight functional change in that intel_display_driver_shutdown_late() returns early for !HAS_DISPLAY(). Assume this is what we want, and there are no cases where display engine is present but all pipes have been fused off. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/d200966191a3845e6b9586d20884e285670734d1.1780389001.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -675,6 +675,19 @@ void intel_display_driver_unregister(struct intel_display *display)
|
||||
intel_vga_unregister(display);
|
||||
}
|
||||
|
||||
void intel_display_driver_shutdown_late(struct intel_display *display)
|
||||
{
|
||||
if (!HAS_DISPLAY(display))
|
||||
return;
|
||||
|
||||
/*
|
||||
* 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_display_power_driver_remove(display);
|
||||
}
|
||||
|
||||
/*
|
||||
* turn all crtc's off, but do not adjust state
|
||||
* This has to be paired with a call to intel_modeset_setup_hw_state.
|
||||
|
||||
@@ -24,6 +24,7 @@ void intel_display_driver_remove(struct intel_display *display);
|
||||
void intel_display_driver_remove_noirq(struct intel_display *display);
|
||||
void intel_display_driver_remove_nogem(struct intel_display *display);
|
||||
void intel_display_driver_unregister(struct intel_display *display);
|
||||
void intel_display_driver_shutdown_late(struct intel_display *display);
|
||||
|
||||
int intel_display_driver_pm_suspend(struct intel_display *display);
|
||||
void intel_display_driver_pm_suspend_late(struct intel_display *display, bool s2idle);
|
||||
|
||||
@@ -1075,17 +1075,14 @@ void i915_driver_shutdown(struct drm_i915_private *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_display_power_driver_remove(display);
|
||||
|
||||
intel_display_driver_shutdown_late(display);
|
||||
enable_rpm_wakeref_asserts(&i915->runtime_pm);
|
||||
|
||||
intel_runtime_pm_driver_last_release(&i915->runtime_pm);
|
||||
|
||||
@@ -242,12 +242,7 @@ void xe_display_shutdown_late(struct xe_device *xe)
|
||||
if (!xe->info.probe_display)
|
||||
return;
|
||||
|
||||
/*
|
||||
* 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_display_power_driver_remove(display);
|
||||
intel_display_driver_shutdown_late(display);
|
||||
}
|
||||
|
||||
/* IRQ-related functions */
|
||||
|
||||
Reference in New Issue
Block a user