RE: [PATCH 20/31] drm/xe/display: Align suspend sequence with i915

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message-----
From: Intel-xe <intel-xe-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Rodrigo Vivi
Sent: Tuesday, September 24, 2024 1:36 PM
To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; intel-xe@xxxxxxxxxxxxxxxxxxxxx
Cc: Deak, Imre <imre.deak@xxxxxxxxx>; Vivi, Rodrigo <rodrigo.vivi@xxxxxxxxx>
Subject: [PATCH 20/31] drm/xe/display: Align suspend sequence with i915
> 
> Move a few things to after GT has stopped and also
> IRQ has been disabled:
>  - intel_hpd_cancel_work
>  - intel_display_driver_suspend_access
>  - intel_encoder_suspend_all
> 
> With that, also remove the xe_display_flush_cleanup_work,
> which is no longer necessary.
> 
> Then, use directly all the intel_display_driver functions for
> a full alignment.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

LGTM.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@xxxxxxxxx>
-Jonathan Cavitt

> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 25 ++++++++++++++-----------
>  drivers/gpu/drm/xe/display/xe_display.h |  2 ++
>  drivers/gpu/drm/xe/xe_pm.c              |  2 ++
>  3 files changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 959635653cfb..44850b6cd382 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -342,26 +342,29 @@ static void xe_display_from_d3cold(struct xe_device *xe)
>  
>  void xe_display_pm_suspend(struct xe_device *xe)
>  {
> -	struct intel_display *display = &xe->display;
> -	bool s2idle = suspend_to_idle();
> -
>  	if (!xe->info.probe_display)
>  		return;
>  
>  	intel_display_driver_suspend(xe);
> +}
>  
> -	xe_display_flush_cleanup_work(xe);
> +void xe_display_pm_suspend_noirq(struct xe_device *xe)
> +{
> +	if (!xe->info.probe_display)
> +		return;
>  
> -	intel_hpd_cancel_work(xe);
> +	intel_display_driver_suspend_noirq(xe);
> +}
>  
> -	if (has_display(xe)) {
> -		intel_display_driver_suspend_access(xe);
> -		intel_encoder_suspend_all(&xe->display);
> -	}
> +void xe_display_pm_suspend_noggtt(struct xe_device *xe)
> +{
> +	struct intel_display *display = &xe->display;
> +	bool s2idle = suspend_to_idle();
>  
> -	intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold);
> +	if (!xe->info.probe_display)
> +		return;
>  
> -	intel_dmc_suspend(display);
> +	intel_display_driver_suspend_noggtt(display, s2idle);
>  }
>  
>  void xe_display_pm_shutdown(struct xe_device *xe)
> diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
> index b4ed5b598c2d..256bd2d23964 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.h
> +++ b/drivers/gpu/drm/xe/display/xe_display.h
> @@ -35,6 +35,8 @@ 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_suspend_noirq(struct xe_device *xe);
> +void xe_display_pm_suspend_noggtt(struct xe_device *xe);
>  void xe_display_pm_suspend_late(struct xe_device *xe);
>  void xe_display_pm_shutdown(struct xe_device *xe);
>  void xe_display_pm_shutdown_noirq(struct xe_device *xe);
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index f5d89c326d46..77eb45a641e8 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -140,6 +140,8 @@ int xe_pm_suspend(struct xe_device *xe)
>  
>  	xe_irq_suspend(xe);
>  
> +	xe_display_pm_suspend_noirq(xe);
> +	xe_display_pm_suspend_noggtt(xe);
>  	xe_display_pm_suspend_late(xe);
>  
>  	drm_dbg(&xe->drm, "Device suspended\n");
> -- 
> 2.46.0
> 
> 




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux