]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe/devcoredump: Update handling of xe_force_wake_get return
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Mon, 14 Oct 2024 07:55:46 +0000 (13:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:04:11 +0000 (20:04 +0100)
commit7bcf6b3cc92a0e691ef56023692e53b93a8a287d
treedd8c04fe9f96722c4529f28d3e71e34f00b1a245
parentdeb05f8431f31e08fd6ab99a56069fc98014dbec
drm/xe/devcoredump: Update handling of xe_force_wake_get return

[ Upstream commit 9ffd6ec2de08ef4ac5f17f6131d1db57613493f9 ]

xe_force_wake_get() now returns the reference count-incremented domain
mask. If it fails for individual domains, the return value will always
be 0. However, for XE_FORCEWAKE_ALL, it may return a non-zero value even
in the event of failure. Use helper xe_force_wake_ref_has_domain to
verify all domains are initialized or not. Update the return handling of
xe_force_wake_get() to reflect this behavior, and ensure that the return
value is passed as input to xe_force_wake_put().

v3
- return xe_wakeref_t instead of int in xe_force_wake_get()

v5
- return unsigned int for xe_force_wake_get()

v6
- use helper xe_force_wake_ref_has_domain()

v7
- Fix commit message

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241014075601.2324382-12-himal.prasad.ghimiray@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Stable-dep-of: 5dce85fecb87 ("drm/xe: Move the coredump registration to the worker thread")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/xe_devcoredump.c