Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	imre.deak@intel.com
Subject: Re: [PATCH 06/24] drm/i915/display: add "pm" to intel_display_driver_{suspend,resume}() names
Date: Fri, 29 May 2026 16:30:12 +0300	[thread overview]
Message-ID: <ahmU5HQN_G_vkZkj@intel.com> (raw)
In-Reply-To: <1659ad8bfa0bf6c4e420221d80275ba5ffccc1f3.1780051905.git.jani.nikula@intel.com>

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ä <ville.syrjala@linux.intel.com>

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  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	other threads:[~2026-05-29 13:30 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 11:03 [PATCH 00/24] drm/{i915, xe}: display (runtime) suspend/resume/shutdown unification Jani Nikula
2026-05-29 11:03 ` [PATCH 01/24] drm/i915: Keep display IRQs enabled for encoder suspend/shutdown Jani Nikula
2026-05-29 11:03 ` [PATCH 02/24] drm/i915/xe: Enable HPD polling later during system resume Jani Nikula
2026-05-29 11:03 ` [PATCH 03/24] drm/i915: add flush_workqueue(display->wq.cleanup) on shutdown Jani Nikula
2026-05-29 13:07   ` Ville Syrjälä
2026-05-29 11:03 ` [PATCH 04/24] drm/xe/display: remove intel_display_flush_cleanup_work() calls on suspend/shutdown Jani Nikula
2026-05-29 13:18   ` Ville Syrjälä
2026-05-29 11:03 ` [PATCH 05/24] drm/xe/display: drop duplicate intel_dp_mst_suspend() call Jani Nikula
2026-05-29 13:18   ` Ville Syrjälä
2026-05-29 11:03 ` [PATCH 06/24] drm/i915/display: add "pm" to intel_display_driver_{suspend, resume}() names Jani Nikula
2026-05-29 13:30   ` Ville Syrjälä [this message]
2026-05-29 11:03 ` [PATCH 07/24] drm/xe/display: rename xe_display_pm_shutdown*() to xe_display_shutdown*() Jani Nikula
2026-05-29 13:30   ` Ville Syrjälä
2026-05-29 11:03 ` [PATCH 08/24] drm/xe/display: relocate the xe_display_shutdown*() functions Jani Nikula
2026-06-02  7:22   ` Michał Grzelak
2026-05-29 11:03 ` [PATCH 09/24] drm/xe/display: relocate the xe_display_pm_runtime_*() functions Jani Nikula
2026-06-02  7:23   ` Michał Grzelak
2026-05-29 11:03 ` [PATCH 10/24] drm/{i915, xe}: move more calls inside intel_display_driver_pm_suspend() Jani Nikula
2026-05-29 13:36   ` [PATCH 10/24] drm/{i915,xe}: " Ville Syrjälä
2026-05-29 11:03 ` [PATCH 11/24] drm/{i915, xe}: move more calls inside intel_display_driver_pm_resume() Jani Nikula
2026-05-29 13:38   ` [PATCH 11/24] drm/{i915,xe}: " Ville Syrjälä
2026-05-29 11:03 ` [PATCH 12/24] drm/{i915, xe}: add intel_display_driver_pm_{suspend_late, resume_early}() Jani Nikula
2026-05-29 13:39   ` [PATCH 12/24] drm/{i915,xe}: add intel_display_driver_pm_{suspend_late,resume_early}() Ville Syrjälä
2026-05-29 11:03 ` [PATCH 13/24] drm/{i915, xe}: move more calls inside intel_display_driver_{register, unregister}() Jani Nikula
2026-05-29 14:04   ` [PATCH 13/24] drm/{i915,xe}: move more calls inside intel_display_driver_{register,unregister}() Ville Syrjälä
2026-05-29 11:03 ` [PATCH 14/24] drm/{i915, xe}: add intel_display_driver_shutdown_late() Jani Nikula
2026-05-29 14:05   ` [PATCH 14/24] drm/{i915,xe}: " Ville Syrjälä
2026-05-29 11:03 ` [PATCH 15/24] drm/i915: add intel_display_driver_shutdown() Jani Nikula
2026-05-29 17:57   ` Ville Syrjälä
2026-05-29 11:04 ` [PATCH 16/24] drm/i915/display: deduplicate suspend and shutdown a bit Jani Nikula
2026-05-29 17:59   ` Ville Syrjälä
2026-05-29 11:04 ` [PATCH 17/24] drm/xe/display: use intel_display_driver_pm_shutdown() Jani Nikula
2026-05-29 18:02   ` Ville Syrjälä
2026-05-29 11:04 ` [PATCH 18/24] drm/{i915, xe}: move more stuff to __intel_display_driver_pm_suspend() Jani Nikula
2026-05-29 18:03   ` [PATCH 18/24] drm/{i915,xe}: " Ville Syrjälä
2026-05-29 11:04 ` [PATCH 19/24] drm/{i915, xe}: make intel_dmc_suspend() part of display suspend/shutdown calls Jani Nikula
2026-05-29 14:16   ` [PATCH 19/24] drm/{i915,xe}: " Ville Syrjälä
2026-06-01  8:14     ` Imre Deak
2026-05-29 11:04 ` [PATCH 20/24] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() Jani Nikula
2026-05-29 14:42   ` [PATCH 20/24] drm/{i915,xe}: " Ville Syrjälä
2026-05-29 11:04 ` [PATCH 21/24] drm/{i915, xe}: keep moving stuff to intel_display_driver_pm_resume() Jani Nikula
2026-05-29 18:45   ` [PATCH 21/24] drm/{i915,xe}: " Ville Syrjälä
2026-05-29 11:04 ` [PATCH 22/24] drm/i915: add intel_display_driver_pm_runtime*() functions Jani Nikula
2026-05-29 19:05   ` Ville Syrjälä
2026-05-29 11:04 ` [PATCH 23/24] drm/xe/display: separate d3cold handling from xe_display_pm_runtime_suspend_late() Jani Nikula
2026-05-29 19:05   ` Ville Syrjälä
2026-05-29 11:04 ` [PATCH 24/24] drm/xe/display: unify runtime suspend/resume with i915 for non-d3cold Jani Nikula
2026-05-29 19:12   ` Ville Syrjälä
2026-06-05 16:04     ` Jani Nikula
2026-05-29 11:13 ` ✓ CI.KUnit: success for drm/{i915, xe}: display (runtime) suspend/resume/shutdown unification Patchwork
2026-05-29 11:59 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-05-29 14:07 ` ✗ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ahmU5HQN_G_vkZkj@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox