From: Jani Nikula <jani.nikula@intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: "Jouni Högander" <jouni.hogander@intel.com>
Subject: Re: [PATCH v2 5/6] drm/i915/display: Use display parent interface for i915 runtime pm
Date: Fri, 24 Oct 2025 15:28:17 +0300 [thread overview]
Message-ID: <73d071ce0766a83fc168e480fd2157284b98314c@intel.com> (raw)
In-Reply-To: <20251024093113.1119070-6-jouni.hogander@intel.com>
On Fri, 24 Oct 2025, Jouni Högander <jouni.hogander@intel.com> wrote:
> Start using display parent interface for i915 runtime pm. Doing the same
> for xe is done in coming changes.
>
> v2:
> - use <> when including drm/intel/display_parent_interface.h
> - drop checks for validity of rpm function pointers
>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> .../gpu/drm/i915/display/intel_display_rpm.c | 32 ++++++++-----------
> 1 file changed, 13 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_rpm.c b/drivers/gpu/drm/i915/display/intel_display_rpm.c
> index 56c4024201c16..3a6b86842b496 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_rpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_rpm.c
> @@ -1,69 +1,63 @@
> // SPDX-License-Identifier: MIT
> /* Copyright © 2025 Intel Corporation */
>
> +#include <drm/intel/display_parent_interface.h>
> +
> #include "i915_drv.h"
I'm guessing you could remove this too.
Anyway,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> #include "intel_display_core.h"
> #include "intel_display_rpm.h"
> -#include "intel_runtime_pm.h"
> -
> -static struct intel_runtime_pm *display_to_rpm(struct intel_display *display)
> -{
> - struct drm_i915_private *i915 = to_i915(display->drm);
> -
> - return &i915->runtime_pm;
> -}
>
> struct ref_tracker *intel_display_rpm_get_raw(struct intel_display *display)
> {
> - return intel_runtime_pm_get_raw(display_to_rpm(display));
> + return display->parent->rpm->get_raw(display->drm);
> }
>
> void intel_display_rpm_put_raw(struct intel_display *display, struct ref_tracker *wakeref)
> {
> - intel_runtime_pm_put_raw(display_to_rpm(display), wakeref);
> + display->parent->rpm->put_raw(display->drm, wakeref);
> }
>
> struct ref_tracker *intel_display_rpm_get(struct intel_display *display)
> {
> - return intel_runtime_pm_get(display_to_rpm(display));
> + return display->parent->rpm->get(display->drm);
> }
>
> struct ref_tracker *intel_display_rpm_get_if_in_use(struct intel_display *display)
> {
> - return intel_runtime_pm_get_if_in_use(display_to_rpm(display));
> + return display->parent->rpm->get_if_in_use(display->drm);
> }
>
> struct ref_tracker *intel_display_rpm_get_noresume(struct intel_display *display)
> {
> - return intel_runtime_pm_get_noresume(display_to_rpm(display));
> + return display->parent->rpm->get_noresume(display->drm);
> }
>
> void intel_display_rpm_put(struct intel_display *display, struct ref_tracker *wakeref)
> {
> - intel_runtime_pm_put(display_to_rpm(display), wakeref);
> + display->parent->rpm->put(display->drm, wakeref);
> }
>
> void intel_display_rpm_put_unchecked(struct intel_display *display)
> {
> - intel_runtime_pm_put_unchecked(display_to_rpm(display));
> + display->parent->rpm->put_unchecked(display->drm);
> }
>
> bool intel_display_rpm_suspended(struct intel_display *display)
> {
> - return intel_runtime_pm_suspended(display_to_rpm(display));
> + return display->parent->rpm->suspended(display->drm);
> }
>
> void assert_display_rpm_held(struct intel_display *display)
> {
> - assert_rpm_wakelock_held(display_to_rpm(display));
> + display->parent->rpm->assert_held(display->drm);
> }
>
> void intel_display_rpm_assert_block(struct intel_display *display)
> {
> - disable_rpm_wakeref_asserts(display_to_rpm(display));
> + display->parent->rpm->assert_block(display->drm);
> }
>
> void intel_display_rpm_assert_unblock(struct intel_display *display)
> {
> - enable_rpm_wakeref_asserts(display_to_rpm(display));
> + display->parent->rpm->assert_unblock(display->drm);
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-10-24 12:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 9:31 [PATCH v2 0/6] Use display parent interface for runtime pm Jouni Högander
2025-10-24 9:31 ` [PATCH v2 1/6] drm/{i915, xe}/display: pass parent interface to display probe Jouni Högander
2025-10-24 12:25 ` [PATCH v2 1/6] drm/{i915,xe}/display: " Jani Nikula
2025-10-24 9:31 ` [PATCH v2 2/6] drm/{i915, xe}/display: Add display runtime pm parent interface Jouni Högander
2025-10-24 12:25 ` [PATCH v2 2/6] drm/{i915,xe}/display: " Jani Nikula
2025-10-24 9:31 ` [PATCH v2 3/6] drm/i915/display: Runtime pm wrappers for display " Jouni Högander
2025-10-24 12:26 ` Jani Nikula
2025-10-24 9:31 ` [PATCH v2 4/6] drm/xe/display: " Jouni Högander
2025-10-24 12:27 ` Jani Nikula
2025-10-24 12:31 ` Jani Nikula
2025-10-24 9:31 ` [PATCH v2 5/6] drm/i915/display: Use display parent interface for i915 runtime pm Jouni Högander
2025-10-24 12:28 ` Jani Nikula [this message]
2025-10-24 9:31 ` [PATCH v2 6/6] drm/xe/display: Use display parent interface for xe " Jouni Högander
2025-10-24 12:28 ` Jani Nikula
2025-10-24 9:38 ` ✗ CI.checkpatch: warning for Use display parent interface for runtime pm (rev2) Patchwork
2025-10-24 9:39 ` ✓ CI.KUnit: success " Patchwork
2025-10-24 9:55 ` ✗ CI.checksparse: warning " Patchwork
2025-10-24 10:18 ` ✓ Xe.CI.BAT: success " Patchwork
2025-10-24 18:59 ` ✗ Xe.CI.Full: failure " 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=73d071ce0766a83fc168e480fd2157284b98314c@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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