[PATCH v3 10/22] drm/xe: Move setting last fence to vm_bind_ioctl_ops_install_fences
Matthew Brost
matthew.brost at intel.com
Tue Feb 6 23:37:17 UTC 2024
This moves setting of the last fence to a single location.
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_vm.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 383d05f87a79..72f6faf6f9ef 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -1776,9 +1776,6 @@ xe_vm_bind(struct xe_vm *vm, struct xe_vma *vma, struct xe_exec_queue *q,
fence = xe_exec_queue_last_fence_get(wait_exec_queue, vm);
}
- if (last_op)
- xe_exec_queue_last_fence_set(wait_exec_queue, vm, fence);
-
return fence;
}
@@ -1788,7 +1785,6 @@ xe_vm_unbind(struct xe_vm *vm, struct xe_vma *vma,
u32 num_syncs, bool first_op, bool last_op)
{
struct dma_fence *fence;
- struct xe_exec_queue *wait_exec_queue = to_wait_exec_queue(vm, q);
xe_vm_assert_held(vm);
xe_bo_assert_held(xe_vma_bo(vma));
@@ -1797,9 +1793,6 @@ xe_vm_unbind(struct xe_vm *vm, struct xe_vma *vma,
if (IS_ERR(fence))
return fence;
- if (last_op)
- xe_exec_queue_last_fence_set(wait_exec_queue, vm, fence);
-
return fence;
}
@@ -2740,6 +2733,7 @@ static void vm_bind_ioctl_ops_install_fences(struct xe_vm *vm,
struct xe_vma_ops *vops,
struct dma_fence *fence)
{
+ struct xe_exec_queue *wait_exec_queue = to_wait_exec_queue(vm, vops->q);
struct xe_vma_op *op;
int i;
@@ -2752,6 +2746,7 @@ static void vm_bind_ioctl_ops_install_fences(struct xe_vm *vm,
}
for (i = 0; i < vops->num_syncs; i++)
xe_sync_entry_signal(vops->syncs + i, NULL, fence);
+ xe_exec_queue_last_fence_set(wait_exec_queue, vm, fence);
dma_fence_put(fence);
}
--
2.34.1
More information about the Intel-xe
mailing list