[PATCH 06/31] drm/xe: Use i915-display shutdown sequence directly
Cavitt, Jonathan
jonathan.cavitt at intel.com
Mon Oct 7 19:44:07 UTC 2024
-----Original Message-----
From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Rodrigo Vivi
Sent: Tuesday, September 24, 2024 1:35 PM
To: intel-gfx at lists.freedesktop.org; intel-xe at lists.freedesktop.org
Cc: Deak, Imre <imre.deak at intel.com>; Vivi, Rodrigo <rodrigo.vivi at intel.com>
Subject: [PATCH 06/31] drm/xe: Use i915-display shutdown sequence directly
>
> Start the xe-i915-display reconciliation by using the same
> shutdown sequences.
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
LGTM.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt
> ---
> drivers/gpu/drm/xe/display/xe_display.c | 46 +++++++------------------
> drivers/gpu/drm/xe/display/xe_display.h | 5 +--
> drivers/gpu/drm/xe/xe_device.c | 4 ++-
> 3 files changed, 19 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 0237d458078b..b5a2a09e7a71 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -10,7 +10,6 @@
>
> #include <drm/drm_drv.h>
> #include <drm/drm_managed.h>
> -#include <drm/drm_atomic_helper.h>
> #include <drm/drm_probe_helper.h>
> #include <uapi/drm/xe_drm.h>
>
> @@ -355,32 +354,26 @@ void xe_display_pm_suspend(struct xe_device *xe)
>
> void xe_display_pm_shutdown(struct xe_device *xe)
> {
> - struct intel_display *display = &xe->display;
> -
> if (!xe->info.probe_display)
> return;
>
> - intel_power_domains_disable(xe);
> - intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true);
> - if (has_display(xe)) {
> - drm_kms_helper_poll_disable(&xe->drm);
> - intel_display_driver_disable_user_access(xe);
> -
> - drm_atomic_helper_shutdown(&xe->drm);
> - }
> -
> - intel_dp_mst_suspend(xe);
> - intel_hpd_cancel_work(xe);
> + intel_display_driver_shutdown(xe);
> +}
>
> - if (has_display(xe))
> - intel_display_driver_suspend_access(xe);
> +void xe_display_pm_shutdown_noirq(struct xe_device *xe)
> +{
> + if (!xe->info.probe_display)
> + return;
>
> - intel_encoder_suspend_all(display);
> - intel_encoder_shutdown_all(display);
> + intel_display_driver_shutdown_noirq(xe);
> +}
>
> - intel_opregion_suspend(display, PCI_D3cold);
> +void xe_display_pm_shutdown_noaccel(struct xe_device *xe)
> +{
> + if (!xe->info.probe_display)
> + return;
>
> - intel_dmc_suspend(display);
> + intel_display_driver_shutdown_nogem(xe);
> }
>
> void xe_display_pm_runtime_suspend(struct xe_device *xe)
> @@ -405,19 +398,6 @@ void xe_display_pm_suspend_late(struct xe_device *xe)
> intel_display_power_suspend_late(xe);
> }
>
> -void xe_display_pm_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_power_domains_driver_remove(xe);
> -}
> -
> void xe_display_pm_resume_early(struct xe_device *xe)
> {
> if (!xe->info.probe_display)
> diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
> index 17afa537aee5..a801db19b64f 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.h
> +++ b/drivers/gpu/drm/xe/display/xe_display.h
> @@ -35,9 +35,10 @@ void xe_display_irq_reset(struct xe_device *xe);
> void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt);
>
> void xe_display_pm_suspend(struct xe_device *xe);
> -void xe_display_pm_shutdown(struct xe_device *xe);
> void xe_display_pm_suspend_late(struct xe_device *xe);
> -void xe_display_pm_shutdown_late(struct xe_device *xe);
> +void xe_display_pm_shutdown(struct xe_device *xe);
> +void xe_display_pm_shutdown_noirq(struct xe_device *xe);
> +void xe_display_pm_shutdown_noaccel(struct xe_device *xe);
> void xe_display_pm_resume_early(struct xe_device *xe);
> void xe_display_pm_resume(struct xe_device *xe);
> void xe_display_pm_runtime_suspend(struct xe_device *xe);
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index cb5a9fd820cf..7c698b4b265b 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -822,10 +822,12 @@ void xe_device_shutdown(struct xe_device *xe)
>
> xe_irq_suspend(xe);
>
> + xe_display_pm_shutdown_noirq(xe);
> +
> for_each_gt(gt, xe, id)
> xe_gt_shutdown(gt);
>
> - xe_display_pm_shutdown_late(xe);
> + xe_display_pm_shutdown_noaccel(xe);
> } else {
> /* BOOM! */
> __xe_driver_flr(xe);
> --
> 2.46.0
>
>
More information about the Intel-xe
mailing list