diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2024-04-17 16:39:50 -0400 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2024-04-18 08:31:40 -0400 |
commit | 16b57c90bb81d7a6a83bfb0152a6425570644e07 (patch) | |
tree | 6671f9ea9d47e621fd2f6bb5bbeebcec1cd795ed /drivers/gpu/drm/xe/xe_device.c | |
parent | a382291017f94b2dde4dcbc69675043761943d0a (diff) |
drm/xe: Convert mem_access_if_ongoing to direct xe_pm_runtime_get_if_active
Now that assert_mem_access is relying directly on the pm_runtime state
instead of the counters, there's no reason why we cannot use
the pm_runtime functions directly.
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240417203952.25503-8-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_device.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_device.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 1f8f9018b27c..47a4bb0b0a7b 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -733,23 +733,6 @@ void xe_device_assert_mem_access(struct xe_device *xe) xe_assert(xe, !xe_pm_runtime_suspended(xe)); } -bool xe_device_mem_access_get_if_ongoing(struct xe_device *xe) -{ - bool active; - - if (xe_pm_read_callback_task(xe) == current) - return true; - - active = xe_pm_runtime_get_if_active(xe); - if (active) { - int ref = atomic_inc_return(&xe->mem_access.ref); - - xe_assert(xe, ref != S32_MAX); - } - - return active; -} - void xe_device_mem_access_get(struct xe_device *xe) { int ref; |