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>, <lucas.demarchi@intel.com>
Subject: Re: [PATCH 08/10] drm/xe/display: move compat runtime pm stubs to the correct file
Date: Fri, 31 May 2024 08:09:16 -0400 [thread overview]
Message-ID: <Zlm97LLP_H_ATJsy@intel.com> (raw)
In-Reply-To: <edefb6ef02920528eacdf01b828cfc45ce55e061.1717004739.git.jani.nikula@intel.com>
On Wed, May 29, 2024 at 08:48:12PM +0300, Jani Nikula wrote:
> Move things that belong to intel_runtime_pm.h to the correct place. Add
> missing header guards while at it.
>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> .../gpu/drm/xe/compat-i915-headers/i915_drv.h | 48 -----------------
> .../xe/compat-i915-headers/intel_runtime_pm.h | 51 +++++++++++++++++++
> 2 files changed, 51 insertions(+), 48 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> index 60544633ddf7..fb37da4850c5 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> @@ -14,11 +14,9 @@
>
> #include "soc/intel_pch.h"
> #include "xe_device.h"
> -#include "xe_pm.h"
> #include "i915_reg_defs.h"
> #include "i915_utils.h"
> #include "intel_runtime_pm.h"
> -#include <linux/pm_runtime.h>
>
> static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
> {
> @@ -113,58 +111,12 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
>
> #define HAS_128_BYTE_Y_TILING(xe) (xe || 1)
>
> -#include "intel_wakeref.h"
> -
> -static inline intel_wakeref_t intel_runtime_pm_get(struct xe_runtime_pm *pm)
> -{
> - struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> -
> - return xe_pm_runtime_resume_and_get(xe);
> -}
> -
> -static inline intel_wakeref_t intel_runtime_pm_get_if_in_use(struct xe_runtime_pm *pm)
> -{
> - struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> -
> - return xe_pm_runtime_get_if_in_use(xe);
> -}
> -
> -static inline intel_wakeref_t intel_runtime_pm_get_noresume(struct xe_runtime_pm *pm)
> -{
> - struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> -
> - xe_pm_runtime_get_noresume(xe);
> - return true;
> -}
> -
> -static inline void intel_runtime_pm_put_unchecked(struct xe_runtime_pm *pm)
> -{
> - struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> -
> - xe_pm_runtime_put(xe);
> -}
> -
> -static inline void intel_runtime_pm_put(struct xe_runtime_pm *pm, intel_wakeref_t wakeref)
> -{
> - if (wakeref)
> - intel_runtime_pm_put_unchecked(pm);
> -}
> -
> -#define intel_runtime_pm_get_raw intel_runtime_pm_get
> -#define intel_runtime_pm_put_raw intel_runtime_pm_put
> -#define assert_rpm_wakelock_held(x) do { } while (0)
> -#define assert_rpm_raw_wakeref_held(x) do { } while (0)
> -
> #define I915_PRIORITY_DISPLAY 0
> struct i915_sched_attr {
> int priority;
> };
> #define i915_gem_fence_wait_priority(fence, attr) do { (void) attr; } while (0)
>
> -#define with_intel_runtime_pm(rpm, wf) \
> - for ((wf) = intel_runtime_pm_get(rpm); (wf); \
> - intel_runtime_pm_put((rpm), (wf)), (wf) = 0)
> -
> #define pdev_to_i915 pdev_to_xe_device
> #define RUNTIME_INFO(xe) (&(xe)->info.i915_runtime)
>
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h
> index 89da3cc62f39..8c7b315aa8ac 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h
> @@ -3,7 +3,12 @@
> * Copyright © 2023 Intel Corporation
> */
>
> +#ifndef __INTEL_RUNTIME_PM_H__
> +#define __INTEL_RUNTIME_PM_H__
> +
> #include "intel_wakeref.h"
> +#include "xe_device_types.h"
> +#include "xe_pm.h"
>
> #define intel_runtime_pm xe_runtime_pm
>
> @@ -14,3 +19,49 @@ static inline void disable_rpm_wakeref_asserts(void *rpm)
> static inline void enable_rpm_wakeref_asserts(void *rpm)
> {
> }
> +
> +static inline intel_wakeref_t intel_runtime_pm_get(struct xe_runtime_pm *pm)
> +{
> + struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> +
> + return xe_pm_runtime_resume_and_get(xe);
> +}
> +
> +static inline intel_wakeref_t intel_runtime_pm_get_if_in_use(struct xe_runtime_pm *pm)
> +{
> + struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> +
> + return xe_pm_runtime_get_if_in_use(xe);
> +}
> +
> +static inline intel_wakeref_t intel_runtime_pm_get_noresume(struct xe_runtime_pm *pm)
> +{
> + struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> +
> + xe_pm_runtime_get_noresume(xe);
> + return true;
> +}
> +
> +static inline void intel_runtime_pm_put_unchecked(struct xe_runtime_pm *pm)
> +{
> + struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> +
> + xe_pm_runtime_put(xe);
> +}
> +
> +static inline void intel_runtime_pm_put(struct xe_runtime_pm *pm, intel_wakeref_t wakeref)
> +{
> + if (wakeref)
> + intel_runtime_pm_put_unchecked(pm);
> +}
> +
> +#define intel_runtime_pm_get_raw intel_runtime_pm_get
> +#define intel_runtime_pm_put_raw intel_runtime_pm_put
> +#define assert_rpm_wakelock_held(x) do { } while (0)
> +#define assert_rpm_raw_wakeref_held(x) do { } while (0)
> +
> +#define with_intel_runtime_pm(rpm, wf) \
> + for ((wf) = intel_runtime_pm_get(rpm); (wf); \
> + intel_runtime_pm_put((rpm), (wf)), (wf) = 0)
> +
> +#endif
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-05-31 12:09 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 17:48 [PATCH 00/10] drm/i915 and drm/xe display and compat cleanups Jani Nikula
2024-05-29 17:48 ` [PATCH 01/10] drm/i915/display: include gem/i915_gem_stolen.h where needed Jani Nikula
2024-05-31 11:03 ` Rodrigo Vivi
2024-05-31 12:03 ` Jani Nikula
2024-06-04 11:41 ` Jani Nikula
2024-06-04 20:34 ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 02/10] drm/i915/display: include gt/intel_gt_types.h " Jani Nikula
2024-05-31 11:05 ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 03/10] drm/i915/display: include i915_gpu_error.h " Jani Nikula
2024-05-31 11:07 ` Rodrigo Vivi
2024-05-31 11:35 ` Ville Syrjälä
2024-05-31 12:07 ` Jani Nikula
2024-05-31 12:17 ` Jani Nikula
2024-05-29 17:48 ` [PATCH 04/10] drm/i915/display: include intel_uncore.h " Jani Nikula
2024-05-31 11:07 ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 05/10] drm/i915/display: include intel_step.h " Jani Nikula
2024-05-31 12:03 ` Rodrigo Vivi
2024-05-31 12:08 ` Jani Nikula
2024-05-29 17:48 ` [PATCH 06/10] drm/i915/display: include xe_bo.h, gem_object_types etc. " Jani Nikula
2024-05-31 12:07 ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 07/10] drm/xe/display: move compat uncore stubs to the correct file Jani Nikula
2024-05-31 12:08 ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 08/10] drm/xe/display: move compat runtime pm " Jani Nikula
2024-05-31 12:09 ` Rodrigo Vivi [this message]
2024-05-29 17:48 ` [PATCH 09/10] drm/xe/display: reduce includes in compat i915_drv.h Jani Nikula
2024-05-31 12:09 ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 10/10] drm/xe/display: drop i915_drv.h include from xe code Jani Nikula
2024-05-31 12:10 ` Rodrigo Vivi
2024-05-29 18:26 ` ✓ CI.Patch_applied: success for drm/i915 and drm/xe display and compat cleanups Patchwork
2024-05-29 18:26 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-29 18:27 ` ✓ CI.KUnit: success " Patchwork
2024-05-29 18:39 ` ✓ CI.Build: " Patchwork
2024-05-29 18:39 ` ✗ CI.Hooks: failure " Patchwork
2024-05-29 18:41 ` ✗ CI.checksparse: warning " Patchwork
2024-05-29 18:48 ` ✗ Fi.CI.CHECKPATCH: " Patchwork
2024-05-29 18:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-05-29 18:56 ` ✓ Fi.CI.BAT: success " Patchwork
2024-05-29 19:20 ` ✓ CI.BAT: " Patchwork
2024-05-29 21:57 ` ✗ CI.FULL: failure " Patchwork
2024-05-30 19:38 ` ✗ Fi.CI.IGT: " 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=Zlm97LLP_H_ATJsy@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@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.