summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>2024-06-07 14:57:41 +0200
committerRodrigo Vivi <rodrigo.vivi@intel.com>2024-06-10 20:18:27 +0200
commit35feb8dbbca627d118ccc1f2111841788c142703 (patch)
tree31d204eb3ab0759b926fe3ec03c21287939d7131
parentdrm/xe: Ensure caller uses sole domain for xe_force_wake_assert_held (diff)
downloadlinux-35feb8dbbca627d118ccc1f2111841788c142703.tar.xz
linux-35feb8dbbca627d118ccc1f2111841788c142703.zip
drm/xe: Check valid domain is passed in xe_force_wake_ref
Assert domain is not XE_FORCEWAKE_ALL. v2 - use domain != XE_FORCEWAKE_ALL (Michal) v3 - Fix commit description. 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> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240607125741.1407331-2-himal.prasad.ghimiray@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/xe/xe_force_wake.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_force_wake.h b/drivers/gpu/drm/xe/xe_force_wake.h
index 8cbb04fe0ed9..a2577672f4e3 100644
--- a/drivers/gpu/drm/xe/xe_force_wake.h
+++ b/drivers/gpu/drm/xe/xe_force_wake.h
@@ -24,7 +24,7 @@ static inline int
xe_force_wake_ref(struct xe_force_wake *fw,
enum xe_force_wake_domains domain)
{
- xe_gt_assert(fw->gt, domain);
+ xe_gt_assert(fw->gt, domain != XE_FORCEWAKE_ALL);
return fw->domains[ffs(domain) - 1].ref;
}