mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 08:15:07 -04:00
drm/xe/display: relocate the xe_display_shutdown*() functions
Group the xe_display_shutdown() and xe_display_shutdown_late() functions together, away from the pm hooks. Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/ca79ec22c7d8961bc82debf2ccc9ece4d1c7c906.1780389001.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -212,6 +212,51 @@ void xe_display_unregister(struct xe_device *xe)
|
||||
intel_display_driver_unregister(display);
|
||||
}
|
||||
|
||||
void xe_display_shutdown(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
return;
|
||||
|
||||
intel_display_power_disable(display);
|
||||
drm_client_dev_suspend(&xe->drm);
|
||||
|
||||
if (intel_display_device_present(display)) {
|
||||
drm_kms_helper_poll_disable(&xe->drm);
|
||||
intel_display_driver_disable_user_access(display);
|
||||
intel_display_driver_pm_suspend(display);
|
||||
}
|
||||
|
||||
intel_encoder_block_all_hpds(display);
|
||||
intel_hpd_cancel_work(display);
|
||||
|
||||
if (intel_display_device_present(display))
|
||||
intel_display_driver_suspend_access(display);
|
||||
|
||||
intel_encoder_suspend_all(display);
|
||||
intel_encoder_shutdown_all(display);
|
||||
|
||||
intel_opregion_suspend(display, PCI_D3cold);
|
||||
|
||||
intel_dmc_suspend(display);
|
||||
}
|
||||
|
||||
void xe_display_shutdown_late(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/* IRQ-related functions */
|
||||
|
||||
void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl)
|
||||
@@ -347,36 +392,6 @@ void xe_display_pm_suspend(struct xe_device *xe)
|
||||
intel_dmc_suspend(display);
|
||||
}
|
||||
|
||||
void xe_display_shutdown(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
return;
|
||||
|
||||
intel_display_power_disable(display);
|
||||
drm_client_dev_suspend(&xe->drm);
|
||||
|
||||
if (intel_display_device_present(display)) {
|
||||
drm_kms_helper_poll_disable(&xe->drm);
|
||||
intel_display_driver_disable_user_access(display);
|
||||
intel_display_driver_pm_suspend(display);
|
||||
}
|
||||
|
||||
intel_encoder_block_all_hpds(display);
|
||||
intel_hpd_cancel_work(display);
|
||||
|
||||
if (intel_display_device_present(display))
|
||||
intel_display_driver_suspend_access(display);
|
||||
|
||||
intel_encoder_suspend_all(display);
|
||||
intel_encoder_shutdown_all(display);
|
||||
|
||||
intel_opregion_suspend(display, PCI_D3cold);
|
||||
|
||||
intel_dmc_suspend(display);
|
||||
}
|
||||
|
||||
void xe_display_pm_runtime_suspend(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
@@ -421,21 +436,6 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
|
||||
intel_dmc_wl_flush_release_work(display);
|
||||
}
|
||||
|
||||
void xe_display_shutdown_late(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void xe_display_pm_resume_early(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
Reference in New Issue
Block a user