Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Badal Nilawar <badal.nilawar@intel.com>
Subject: Re: [PATCH 2/2] drm/xe: Fix xe_force_wake_assert_held for enum XE_FORCEWAKE_ALL
Date: Fri, 31 May 2024 09:19:18 -0400	[thread overview]
Message-ID: <ZlnOVvmtsrWS80Ff@intel.com> (raw)
In-Reply-To: <20240531064845.930740-2-himal.prasad.ghimiray@intel.com>

On Fri, May 31, 2024 at 12:18:45PM +0530, Himal Prasad Ghimiray wrote:
> Make sure that the assertion condition covers the wakefulness of all
> supported domains for XE_FORCEWAKE_ALL.

The most important part is missing here: why? what issue are we trying to solve?

> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Badal Nilawar <badal.nilawar@intel.com>
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_force_wake.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_force_wake.h b/drivers/gpu/drm/xe/xe_force_wake.h
> index 83cb157da7cc..4c986d72cba7 100644
> --- a/drivers/gpu/drm/xe/xe_force_wake.h
> +++ b/drivers/gpu/drm/xe/xe_force_wake.h
> @@ -32,7 +32,12 @@ static inline void
>  xe_force_wake_assert_held(struct xe_force_wake *fw,
>  			  enum xe_force_wake_domains domain)
>  {
> -	xe_gt_assert(fw->gt, fw->awake_domains & domain);
> +	enum xe_force_wake_domains is_awake;
> +
> +	is_awake = (domain == XE_FORCEWAKE_ALL) ?
> +		    fw->supported_domains : domain;
> +
> +	xe_gt_assert(fw->gt, (fw->awake_domains & is_awake) == is_awake);
>  }
>  
>  #endif
> -- 
> 2.25.1
> 

  reply	other threads:[~2024-05-31 13:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  6:48 [PATCH 1/2] drm/xe: Add member supported_domains to xe_force_wake Himal Prasad Ghimiray
2024-05-31  6:39 ` ✓ CI.Patch_applied: success for series starting with [1/2] " Patchwork
2024-05-31  6:40 ` ✓ CI.checkpatch: " Patchwork
2024-05-31  6:41 ` ✓ CI.KUnit: " Patchwork
2024-05-31  6:48 ` [PATCH 2/2] drm/xe: Fix xe_force_wake_assert_held for enum XE_FORCEWAKE_ALL Himal Prasad Ghimiray
2024-05-31 13:19   ` Rodrigo Vivi [this message]
2024-05-31 13:56     ` Ghimiray, Himal Prasad
2024-05-31 15:26       ` Rodrigo Vivi
2024-06-03  3:53         ` Ghimiray, Himal Prasad
2024-05-31  6:52 ` ✓ CI.Build: success for series starting with [1/2] drm/xe: Add member supported_domains to xe_force_wake Patchwork
2024-05-31  6:53 ` ✗ CI.Hooks: failure " Patchwork
2024-05-31  6:54 ` ✓ CI.checksparse: success " Patchwork
2024-05-31  7:22 ` ✓ CI.BAT: " Patchwork
2024-05-31  8:31 ` ✗ CI.FULL: failure " Patchwork
2024-05-31 15:27 ` [PATCH 1/2] " Rodrigo Vivi
2024-06-03  3:56   ` Ghimiray, Himal Prasad

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=ZlnOVvmtsrWS80Ff@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /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