From: Jani Nikula <jani.nikula@linux.intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 3/3] drm/xe: Use intel_wakeref_t in intel_runtime_pm functions
Date: Thu, 04 Jan 2024 18:58:14 +0200 [thread overview]
Message-ID: <877ckpyr15.fsf@intel.com> (raw)
In-Reply-To: <20240104162411.56085-3-jose.souza@intel.com>
On Thu, 04 Jan 2024, José Roberto de Souza <jose.souza@intel.com> wrote:
> Now intel_wakeref_t is a unsigned long and Xe KMD version of those
> functions should use the same type, so changing from bool to
> intel_wakeref_t.
>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
I don't think it was ever a bool in i915.
Wish we'd get the ref tracker in xe too.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 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 5d2a77b52db41..420eba0e4be00 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> @@ -162,18 +162,18 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
>
> #include "intel_wakeref.h"
>
> -static inline bool intel_runtime_pm_get(struct xe_runtime_pm *pm)
> +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);
>
> if (xe_pm_runtime_get(xe) < 0) {
> xe_pm_runtime_put(xe);
> - return false;
> + return 0;
> }
> - return true;
> + return 1;
> }
>
> -static inline bool intel_runtime_pm_get_if_in_use(struct xe_runtime_pm *pm)
> +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);
>
> @@ -187,7 +187,7 @@ static inline void intel_runtime_pm_put_unchecked(struct xe_runtime_pm *pm)
> xe_pm_runtime_put(xe);
> }
>
> -static inline void intel_runtime_pm_put(struct xe_runtime_pm *pm, bool wakeref)
> +static inline void intel_runtime_pm_put(struct xe_runtime_pm *pm, intel_wakeref_t wakeref)
> {
> if (wakeref)
> intel_runtime_pm_put_unchecked(pm);
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-01-04 16:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 16:24 [PATCH v4 1/3] drm/i915: Disable DSB in Xe KMD José Roberto de Souza
2024-01-04 16:24 ` [PATCH v4 2/3] drm/xe: Fix definition of intel_wakeref_t José Roberto de Souza
2024-01-04 16:56 ` Jani Nikula
2024-01-04 16:24 ` [PATCH v4 3/3] drm/xe: Use intel_wakeref_t in intel_runtime_pm functions José Roberto de Souza
2024-01-04 16:58 ` Jani Nikula [this message]
2024-01-04 20:28 ` ✓ CI.Patch_applied: success for series starting with [v4,1/3] drm/i915: Disable DSB in Xe KMD Patchwork
2024-01-04 20:28 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-04 20:29 ` ✓ CI.KUnit: success " Patchwork
2024-01-04 20:32 ` ✗ CI.Build: 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=877ckpyr15.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jose.souza@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