mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
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>
This commit is contained in:
@@ -120,6 +120,32 @@ free_fence_drv:
|
||||
return r;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void amdgpu_userq_fence_driver_process(struct amdgpu_userq_fence_driver *fence_drv)
|
||||
{
|
||||
struct amdgpu_userq_fence *userq_fence, *tmp;
|
||||
|
||||
Reference in New Issue
Block a user