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 13/24] drm/{i915,xe}: move more calls inside intel_display_driver_{register,unregister}()
Date: Fri, 29 May 2026 17:04:20 +0300 [thread overview]
Message-ID: <ahmc5G5cNrlQpsl3@intel.com> (raw)
In-Reply-To: <6c62aaa40707fbc68b73a16929df2bb0566424ee.1780051905.git.jani.nikula@intel.com>
On Fri, May 29, 2026 at 02:03:57PM +0300, Jani Nikula wrote:
> The intel_display_driver_register() and
> intel_display_driver_unregister() calls are followed and preceded by
> intel_display_power_enable() and intel_display_power_disable() calls,
> respectively. Move them inside the register/unregister calls.
>
> Semantically, this is a weird location, as there's nothing really
> "register" or "unregister" about them, but they retain the existing
> sequence. Add comments to note that.
>
> There's a slight functional change for !HAS_DISPLAY() in that
> register/unregister return early. Assume this is what we want, and there
> are no cases where display engine is present but all pipes have been
> fused off.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++++++
> drivers/gpu/drm/i915/i915_driver.c | 2 --
> drivers/gpu/drm/xe/display/xe_display.c | 2 --
> 3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 77fa4497b442..7fee9ef88224 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -578,6 +578,9 @@ void intel_display_driver_register(struct intel_display *display)
> DISPLAY_RUNTIME_INFO(display), &p);
>
> intel_register_dsm_handler();
> +
> + /* Semantically out of place, just for the sequence */
> + intel_display_power_enable(display);
> }
>
> /* part #1: call before irq uninstall */
> @@ -652,6 +655,9 @@ void intel_display_driver_unregister(struct intel_display *display)
> if (!HAS_DISPLAY(display))
> return;
>
> + /* Semantically out of place, just for the sequence */
> + intel_display_power_disable(display);
> +
> intel_unregister_dsm_handler();
>
> drm_client_dev_unregister(display->drm);
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 6fd3e8b155b1..b637c4dedf1b 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -661,7 +661,6 @@ static int i915_driver_register(struct drm_i915_private *dev_priv)
>
> intel_display_driver_register(display);
>
> - intel_display_power_enable(display);
Maybe these deserve their own display_driver_runtime_pm_{en,dis}able()
things.
Although I'm not sure why we even do this so late. We could probably
do this as soon as the readout is done. And I think ideally we wouldn't
even use the INIT domain for this and would just do something to keep
the already enabled power wells enabled until the readout is done.
But that's a whole different can of worms.
> intel_runtime_pm_enable(&dev_priv->runtime_pm);
>
> if (i915_switcheroo_register(dev_priv))
> @@ -683,7 +682,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
> i915_switcheroo_unregister(dev_priv);
>
> intel_runtime_pm_disable(&dev_priv->runtime_pm);
> - intel_display_power_disable(display);
>
> intel_display_driver_unregister(display);
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index bbd4f527d5e3..e17e05a8854c 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -177,7 +177,6 @@ void xe_display_register(struct xe_device *xe)
> return;
>
> intel_display_driver_register(display);
> - intel_display_power_enable(display);
> }
>
> void xe_display_unregister(struct xe_device *xe)
> @@ -187,7 +186,6 @@ void xe_display_unregister(struct xe_device *xe)
> if (!xe->info.probe_display)
> return;
>
> - intel_display_power_disable(display);
> intel_display_driver_unregister(display);
> }
>
> --
> 2.47.3
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-05-29 14:04 UTC|newest]
Thread overview: 53+ 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 ` [PATCH 06/24] drm/i915/display: add "pm" to intel_display_driver_{suspend,resume}() names Ville Syrjälä
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 ` Ville Syrjälä [this message]
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 12:23 ` ✗ i915.CI.BAT: " 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=ahmc5G5cNrlQpsl3@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.