diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2025-04-10 13:49:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2025-04-21 10:49:20 -0400 |
commit | edc762a51c7181d6fe1e0837e2eb69afb406f98e (patch) | |
tree | 8c93ab772bdd52ad4f6d3035039c95ae86e33b12 /drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | |
parent | b0db33c8c50f5e89557d4b11da94820677f0c9a2 (diff) |
drm/amdgpu/userq: move some code around
Move some userq fence handling code into amdgpu_userq_fence.c.
This matches the other code in that file.
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c index c3873041ec94..79f4df4255c5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c @@ -28,32 +28,6 @@ #include "amdgpu_userqueue.h" #include "amdgpu_userq_fence.h" -static void amdgpu_userq_walk_and_drop_fence_drv(struct xarray *xa) -{ - struct amdgpu_userq_fence_driver *fence_drv; - unsigned long index; - - if (xa_empty(xa)) - return; - - xa_lock(xa); - xa_for_each(xa, index, fence_drv) { - __xa_erase(xa, index); - amdgpu_userq_fence_driver_put(fence_drv); - } - - xa_unlock(xa); -} - -static void -amdgpu_userq_fence_driver_free(struct amdgpu_usermode_queue *userq) -{ - amdgpu_userq_walk_and_drop_fence_drv(&userq->fence_drv_xa); - xa_destroy(&userq->fence_drv_xa); - /* Drop the fence_drv reference held by user queue */ - amdgpu_userq_fence_driver_put(userq->fence_drv); -} - static void amdgpu_userqueue_cleanup(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_usermode_queue *queue, |