On Fri, May 29, 2026 at 02:03:50PM +0300, Jani Nikula wrote:
> Start naming the functions that are supposed to be called from the
> struct dem_pm_ops hooks with intel_display_driver_pm_*() to distinguish
> them better from the rest.

I guess this slightly conflicts with the i915 approach where the
_pm_ naming was restricted to the functions that directly
implement the pm ops, and the stuff they call didn't have the
_pm_ and instead used _drm_ naming, perhaps because they also
get called from the switcheroo paths. But the switcheroo stuff
should really just use be part of the normal device pm framework
so the _pm_ naming there wouldn't be wrong in my book either.

Reviewed-by: Ville Syrjälä <[email protected]>

> 
> Signed-off-by: Jani Nikula <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_display_driver.c |  4 ++--
>  drivers/gpu/drm/i915/display/intel_display_driver.h |  5 +++--
>  drivers/gpu/drm/i915/i915_driver.c                  | 12 ++++++------
>  drivers/gpu/drm/xe/display/xe_display.c             |  6 +++---
>  4 files changed, 14 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c 
> b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index d0729936f681..9be4c94740dc 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -678,7 +678,7 @@ void intel_display_driver_unregister(struct intel_display 
> *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.
>   */
> -int intel_display_driver_suspend(struct intel_display *display)
> +int intel_display_driver_pm_suspend(struct intel_display *display)
>  {
>       struct drm_atomic_commit *state;
>       int ret;
> @@ -741,7 +741,7 @@ __intel_display_driver_resume(struct intel_display 
> *display,
>       return ret;
>  }
>  
> -void intel_display_driver_resume(struct intel_display *display)
> +void intel_display_driver_pm_resume(struct intel_display *display)
>  {
>       struct drm_atomic_commit *state = display->restore.modeset_state;
>       struct drm_modeset_acquire_ctx ctx;
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h 
> b/drivers/gpu/drm/i915/display/intel_display_driver.h
> index 5270c26a32e0..d8a08ca68d4e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
> @@ -24,8 +24,9 @@ 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);
> -int intel_display_driver_suspend(struct intel_display *display);
> -void intel_display_driver_resume(struct intel_display *display);
> +
> +int intel_display_driver_pm_suspend(struct intel_display *display);
> +void intel_display_driver_pm_resume(struct intel_display *display);
>  
>  /* interface for intel_display_reset.c */
>  int __intel_display_driver_resume(struct intel_display *display,
> diff --git a/drivers/gpu/drm/i915/i915_driver.c 
> b/drivers/gpu/drm/i915/i915_driver.c
> index 60d5e06675ab..bd73d64c1ccb 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1114,10 +1114,10 @@ static int i915_drm_prepare(struct drm_device *dev)
>       intel_pxp_suspend_prepare(i915->pxp);
>  
>       /*
> -      * NB intel_display_driver_suspend() may issue new requests after we've
> -      * ostensibly marked the GPU as ready-to-sleep here. We need to
> -      * split out that work and pull it forward so that after point,
> -      * the GPU is not woken again.
> +      * NB intel_display_driver_pm_suspend() may issue new requests after
> +      * we've ostensibly marked the GPU as ready-to-sleep here. We need to
> +      * split out that work and pull it forward so that after point, the GPU
> +      * is not woken again.
>        */
>       return i915_gem_backup_suspend(i915);
>  }
> @@ -1139,7 +1139,7 @@ static int i915_drm_suspend(struct drm_device *dev)
>               intel_display_driver_disable_user_access(display);
>       }
>  
> -     intel_display_driver_suspend(display);
> +     intel_display_driver_pm_suspend(display);
>  
>       intel_encoder_block_all_hpds(display);
>  
> @@ -1325,7 +1325,7 @@ static int i915_drm_resume(struct drm_device *dev)
>  
>       intel_encoder_unblock_all_hpds(display);
>  
> -     intel_display_driver_resume(display);
> +     intel_display_driver_pm_resume(display);
>  
>       if (intel_display_device_present(display)) {
>               intel_display_driver_enable_user_access(display);
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c 
> b/drivers/gpu/drm/xe/display/xe_display.c
> index 8d55e7a37d6d..d1c450a18713 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -309,7 +309,7 @@ void xe_display_pm_suspend(struct xe_device *xe)
>       if (intel_display_device_present(display)) {
>               drm_kms_helper_poll_disable(&xe->drm);
>               intel_display_driver_disable_user_access(display);
> -             intel_display_driver_suspend(display);
> +             intel_display_driver_pm_suspend(display);
>       }
>  
>       intel_encoder_block_all_hpds(display);
> @@ -339,7 +339,7 @@ void xe_display_pm_shutdown(struct xe_device *xe)
>       if (intel_display_device_present(display)) {
>               drm_kms_helper_poll_disable(&xe->drm);
>               intel_display_driver_disable_user_access(display);
> -             intel_display_driver_suspend(display);
> +             intel_display_driver_pm_suspend(display);
>       }
>  
>       intel_encoder_block_all_hpds(display);
> @@ -447,7 +447,7 @@ void xe_display_pm_resume(struct xe_device *xe)
>       intel_encoder_unblock_all_hpds(display);
>  
>       if (intel_display_device_present(display)) {
> -             intel_display_driver_resume(display);
> +             intel_display_driver_pm_resume(display);
>               intel_display_driver_enable_user_access(display);
>               drm_kms_helper_poll_enable(&xe->drm);
>       }
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

Reply via email to