[PATCH 19/31] drm/xe/display: Align display resume sequence with i915

Cavitt, Jonathan jonathan.cavitt at intel.com
Mon Oct 7 21:37:18 UTC 2024


-----Original Message-----
From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Rodrigo Vivi
Sent: Tuesday, September 24, 2024 1:36 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 19/31] drm/xe/display: Align display resume sequence with i915
> 
> Resume DMC before resuming IRQ.
> Reset mode_config before GT resume.
> Use direct intel_display_driver functions for that.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

This looks fine, though it also looks like two different changes:
1. The change to xe_display_pm_resume
2. The addition and use of xe_display_pm_resume_noirq and
xe_display_pm_resume_noaccel

I won't say these changes need to be separated, but it might
be worth considering.

Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt

> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 23 ++++++++++++++++-------
>  drivers/gpu/drm/xe/display/xe_display.h |  2 ++
>  drivers/gpu/drm/xe/xe_pm.c              |  4 ++++
>  3 files changed, 22 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index df66e47daca3..959635653cfb 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -419,21 +419,30 @@ void xe_display_pm_resume_early(struct xe_device *xe)
>  
>  void xe_display_pm_resume(struct xe_device *xe)
>  {
> -	struct intel_display *display = &xe->display;
> -
>  	if (!xe->info.probe_display)
>  		return;
>  
> -	intel_dmc_resume(display);
> -
> -	if (has_display(xe))
> -		drm_mode_config_reset(&xe->drm);
> -
>  	intel_display_driver_init_hw(xe);
>  
>  	intel_display_driver_resume(xe);
>  }
>  
> +void xe_display_pm_resume_noirq(struct xe_device *xe)
> +{
> +	if (!xe->info.probe_display)
> +		return;
> +
> +	intel_display_driver_resume_noirq(xe);
> +}
> +
> +void xe_display_pm_resume_noaccel(struct xe_device *xe)
> +{
> +	if (!xe->info.probe_display)
> +		return;
> +
> +	intel_display_driver_resume_nogem(&xe->display);
> +}
> +
>  void xe_display_pm_runtime_resume(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 a801db19b64f..b4ed5b598c2d 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.h
> +++ b/drivers/gpu/drm/xe/display/xe_display.h
> @@ -41,6 +41,8 @@ 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_resume_noirq(struct xe_device *xe);
> +void xe_display_pm_resume_noaccel(struct xe_device *xe);
>  void xe_display_pm_runtime_suspend(struct xe_device *xe);
>  void xe_display_pm_runtime_resume(struct xe_device *xe);
>  
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index 33eb039053e4..f5d89c326d46 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -182,8 +182,12 @@ int xe_pm_resume(struct xe_device *xe)
>  	if (err)
>  		goto err;
>  
> +	xe_display_pm_resume_noirq(xe);
> +
>  	xe_irq_resume(xe);
>  
> +	xe_display_pm_resume_noaccel(xe);
> +
>  	for_each_gt(gt, xe, id)
>  		xe_gt_resume(gt);
>  
> -- 
> 2.46.0
> 
> 


More information about the Intel-gfx mailing list