aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_exec_queue.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2023-09-20 15:29:29 -0400
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:43:13 -0500
commitabce4e4b0742f0a0773213144601ea7e18389228 (patch)
tree2e47daa99ceb91b665be80a5a92240913c533c45 /drivers/gpu/drm/xe/xe_exec_queue.c
parente05c6c9774630702143bf4d35f2a753e61a57622 (diff)
drm/xe: Rename exec_queue_kill_compute to xe_vm_remove_compute_exec_queue
Much better name and aligns with xe_vm_add_compute_exec_queue. As part of the rename, move the implementation from xe_exec_queue.c to xe_vm.c. Suggested-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_exec_queue.c')
-rw-r--r--drivers/gpu/drm/xe/xe_exec_queue.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index b9e645e86b4f..d400e2bb3785 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -775,22 +775,6 @@ int xe_exec_queue_get_property_ioctl(struct drm_device *dev, void *data,
return ret;
}
-static void exec_queue_kill_compute(struct xe_exec_queue *q)
-{
- if (!xe_vm_in_compute_mode(q->vm))
- return;
-
- down_write(&q->vm->lock);
- list_del(&q->compute.link);
- --q->vm->preempt.num_exec_queues;
- if (q->compute.pfence) {
- dma_fence_enable_sw_signaling(q->compute.pfence);
- dma_fence_put(q->compute.pfence);
- q->compute.pfence = NULL;
- }
- up_write(&q->vm->lock);
-}
-
/**
* xe_exec_queue_is_lr() - Whether an exec_queue is long-running
* @q: The exec_queue
@@ -861,11 +845,11 @@ void xe_exec_queue_kill(struct xe_exec_queue *q)
list_for_each_entry_safe(eq, next, &eq->multi_gt_list,
multi_gt_link) {
q->ops->kill(eq);
- exec_queue_kill_compute(eq);
+ xe_vm_remove_compute_exec_queue(q->vm, eq);
}
q->ops->kill(q);
- exec_queue_kill_compute(q);
+ xe_vm_remove_compute_exec_queue(q->vm, q);
}
int xe_exec_queue_destroy_ioctl(struct drm_device *dev, void *data,