Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
	intel-xe@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Badal Nilawar <badal.nilawar@intel.com>
Subject: Re: [PATCH v2 1/2] drm/xe: Ensure caller uses sole domain for xe_force_wake_assert_held
Date: Fri, 7 Jun 2024 13:23:02 +0200	[thread overview]
Message-ID: <39637904-5d38-4f91-b528-9c235c2b8782@intel.com> (raw)
In-Reply-To: <20240607052213.1391082-2-himal.prasad.ghimiray@intel.com>



On 07.06.2024 07:22, Himal Prasad Ghimiray wrote:
> xe_force_wake_assert_held() is designed to confirm a particular
> forcewake domain's wakefulness; it doesn't verify the wakefulness of
> multiple domains. Make sure the caller doesn't input multiple
> domains(XE_FORCEWAKE_ALL) as a parameter.

maybe we should also copy above commit message as description of the
below helper ? but still, assert provides some level of guideline, so

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

> 
> v2
> - use domain != XE_FORCEWAKE_ALL (Michal)
> 
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@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 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_force_wake.h b/drivers/gpu/drm/xe/xe_force_wake.h
> index 83cb157da7cc..651ea1e62c63 100644
> --- a/drivers/gpu/drm/xe/xe_force_wake.h
> +++ b/drivers/gpu/drm/xe/xe_force_wake.h
> @@ -32,6 +32,7 @@ static inline void
>  xe_force_wake_assert_held(struct xe_force_wake *fw,
>  			  enum xe_force_wake_domains domain)
>  {
> +	xe_gt_assert(fw->gt, domain != XE_FORCEWAKE_ALL);
>  	xe_gt_assert(fw->gt, fw->awake_domains & domain);
>  }
>  

  reply	other threads:[~2024-06-07 11:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07  5:22 [PATCH v2 0/2] Assert for multiple or undefined forcewake domains Himal Prasad Ghimiray
2024-06-07  5:11 ` ✓ CI.Patch_applied: success for " Patchwork
2024-06-07  5:11 ` ✓ CI.checkpatch: " Patchwork
2024-06-07  5:12 ` ✓ CI.KUnit: " Patchwork
2024-06-07  5:22 ` [PATCH v2 1/2] drm/xe: Ensure caller uses sole domain for xe_force_wake_assert_held Himal Prasad Ghimiray
2024-06-07 11:23   ` Michal Wajdeczko [this message]
2024-06-07 12:11     ` Ghimiray, Himal Prasad
2024-06-07  5:22 ` [PATCH v2 2/2] drm/xe: Check valid domain is passed in xe_force_wake_ref Himal Prasad Ghimiray
2024-06-07 11:50   ` Michal Wajdeczko
2024-06-07 12:09     ` Ghimiray, Himal Prasad
2024-06-07  5:24 ` ✓ CI.Build: success for Assert for multiple or undefined forcewake domains Patchwork
2024-06-07  5:26 ` ✓ CI.Hooks: " Patchwork
2024-06-07  5:27 ` ✓ CI.checksparse: " Patchwork
2024-06-07  6:09 ` ✓ CI.BAT: " Patchwork
2024-06-07 14:01 ` ✓ CI.FULL: " 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=39637904-5d38-4f91-b528-9c235c2b8782@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@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