From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>, <imre.deak@intel.com>,
<ville.syrjala@linux.intel.com>
Subject: Re: [PATCH 3/6] drm/i915/display: use display runtime PM interfaces for for atomic state
Date: Tue, 11 Mar 2025 16:39:20 -0400 [thread overview]
Message-ID: <Z9CfeCYz3cgxC56u@intel.com> (raw)
In-Reply-To: <1e3cf97853b3214fe56eea345c3e6226adde9e83.1741694400.git.jani.nikula@intel.com>
On Tue, Mar 11, 2025 at 02:05:37PM +0200, Jani Nikula wrote:
> Convert intel_atomic_commit() and intel_atomic_commit_tail() to use
> display runtime PM interfaces. Also convert the wakeref member type to
> struct ref_tracker *, which is the same as intel_wakeref_t, but without
> the typedef.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 12 ++++++------
> drivers/gpu/drm/i915/display/intel_display_types.h | 2 +-
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 3afb85fe8536..b852ffe94a10 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -73,6 +73,7 @@
> #include "intel_de.h"
> #include "intel_display_driver.h"
> #include "intel_display_power.h"
> +#include "intel_display_rpm.h"
> #include "intel_display_types.h"
> #include "intel_dmc.h"
> #include "intel_dp.h"
> @@ -7229,7 +7230,7 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state,
> static void intel_atomic_commit_tail(struct intel_atomic_state *state)
> {
> struct intel_display *display = to_intel_display(state);
> - struct drm_i915_private *dev_priv = to_i915(display->drm);
> + struct drm_i915_private __maybe_unused *dev_priv = to_i915(display->drm);
hmm... we will need to take care of the unclaimed mmio infra at
some point... that is entirely display anyway... it should probably
move to under display...
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> struct intel_crtc_state *new_crtc_state, *old_crtc_state;
> struct intel_crtc *crtc;
> struct intel_power_domain_mask put_domains[I915_MAX_PIPES] = {};
> @@ -7443,7 +7444,7 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
> * toggling overhead at and above 60 FPS.
> */
> intel_display_power_put_async_delay(display, POWER_DOMAIN_DC_OFF, wakeref, 17);
> - intel_runtime_pm_put(&dev_priv->runtime_pm, state->wakeref);
> + intel_display_rpm_put(display, state->wakeref);
>
> /*
> * Defer the cleanup of the old state to a separate worker to not
> @@ -7515,10 +7516,9 @@ int intel_atomic_commit(struct drm_device *dev, struct drm_atomic_state *_state,
> {
> struct intel_display *display = to_intel_display(dev);
> struct intel_atomic_state *state = to_intel_atomic_state(_state);
> - struct drm_i915_private *dev_priv = to_i915(dev);
> int ret = 0;
>
> - state->wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
> + state->wakeref = intel_display_rpm_get(display);
>
> /*
> * The intel_legacy_cursor_update() fast path takes care
> @@ -7552,7 +7552,7 @@ int intel_atomic_commit(struct drm_device *dev, struct drm_atomic_state *_state,
> if (ret) {
> drm_dbg_atomic(display->drm,
> "Preparing state failed with %i\n", ret);
> - intel_runtime_pm_put(&dev_priv->runtime_pm, state->wakeref);
> + intel_display_rpm_put(display, state->wakeref);
> return ret;
> }
>
> @@ -7562,7 +7562,7 @@ int intel_atomic_commit(struct drm_device *dev, struct drm_atomic_state *_state,
>
> if (ret) {
> drm_atomic_helper_unprepare_planes(dev, &state->base);
> - intel_runtime_pm_put(&dev_priv->runtime_pm, state->wakeref);
> + intel_display_rpm_put(display, state->wakeref);
> return ret;
> }
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 99a6fd2900b9..7d9cc430a6b8 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -581,7 +581,7 @@ struct dpll {
> struct intel_atomic_state {
> struct drm_atomic_state base;
>
> - intel_wakeref_t wakeref;
> + struct ref_tracker *wakeref;
>
> struct __intel_global_objs_state *global_objs;
> int num_global_objs;
> --
> 2.39.5
>
next prev parent reply other threads:[~2025-03-11 20:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 12:05 [PATCH 0/6] drm/i915/display: add display specific runtime PM interface Jani Nikula
2025-03-11 12:05 ` [PATCH 1/6] drm/i915/display: add display specific runtime PM wrappers Jani Nikula
2025-03-11 20:36 ` Rodrigo Vivi
2025-03-11 12:05 ` [PATCH 2/6] drm/i915/display: conversions to with_intel_display_rpm() Jani Nikula
2025-03-11 20:36 ` Rodrigo Vivi
2025-03-11 12:05 ` [PATCH 3/6] drm/i915/display: use display runtime PM interfaces for for atomic state Jani Nikula
2025-03-11 20:39 ` Rodrigo Vivi [this message]
2025-03-11 12:05 ` [PATCH 4/6] drm/i915/display: convert to display runtime PM interfaces Jani Nikula
2025-03-11 20:43 ` Rodrigo Vivi
2025-03-12 10:43 ` Jani Nikula
2025-03-12 19:57 ` Rodrigo Vivi
2025-03-11 12:05 ` [PATCH 5/6] drm/i915/power: " Jani Nikula
2025-03-11 20:45 ` Rodrigo Vivi
2025-03-11 12:05 ` [PATCH 6/6] drm/xe/compat: remove intel_runtime_pm.h Jani Nikula
2025-03-11 20:46 ` Rodrigo Vivi
2025-03-11 14:31 ` ✓ CI.Patch_applied: success for drm/i915/display: add display specific runtime PM interface Patchwork
2025-03-11 14:32 ` ✗ CI.checkpatch: warning " Patchwork
2025-03-11 14:33 ` ✓ CI.KUnit: success " Patchwork
2025-03-11 14:49 ` ✓ CI.Build: " Patchwork
2025-03-11 14:52 ` ✓ CI.Hooks: " Patchwork
2025-03-11 14:53 ` ✗ CI.checksparse: warning " Patchwork
2025-03-11 15:15 ` ✓ Xe.CI.BAT: success " Patchwork
2025-03-11 16:32 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2025-03-11 16:32 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-03-11 16:58 ` ✗ i915.CI.BAT: failure " Patchwork
2025-03-12 7:16 ` ✓ Xe.CI.Full: success " Patchwork
2025-03-13 11:04 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: add display specific runtime PM interface (rev2) Patchwork
2025-03-13 11:04 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-03-13 11:27 ` ✓ i915.CI.BAT: success " 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=Z9CfeCYz3cgxC56u@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=ville.syrjala@linux.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.