diff options
author | Matthew Brost <matthew.brost@intel.com> | 2023-06-09 11:19:30 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:35:21 -0500 |
commit | 5e3220de6c72349f77977c62a991748d4e0fea26 (patch) | |
tree | 7f33b88cc9da9ea0c6e685f2263a87b424eb3127 /drivers/gpu/drm/xe/xe_vm.h | |
parent | 790bdc7cb2e7dafbac0aafc016dcb7493c925bac (diff) |
drm/xe: Use Xe ordered workqueue for rebind worker
A mix of the system unbound wq and Xe ordered wq was used for the
rebind, only use the Xe ordered wq. This will ensure only 1 rebind is
occuring at a time providing a somewhat clunky work around for short
comings in TTM wrt to memory contention. Once the TTM memory contention
is resolved we should be able to use a dedicated non-ordered workqueue.
Also add helper to queue rebind worker to avoid using wrong workqueue
going forward.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_vm.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.h b/drivers/gpu/drm/xe/xe_vm.h index 372f26153209..bb2996856841 100644 --- a/drivers/gpu/drm/xe/xe_vm.h +++ b/drivers/gpu/drm/xe/xe_vm.h @@ -124,6 +124,12 @@ int xe_vma_userptr_pin_pages(struct xe_vma *vma); int xe_vma_userptr_check_repin(struct xe_vma *vma); +static inline void xe_vm_queue_rebind_worker(struct xe_vm *vm) +{ + XE_WARN_ON(!xe_vm_in_compute_mode(vm)); + queue_work(vm->xe->ordered_wq, &vm->preempt.rebind_work); +} + /* * XE_ONSTACK_TV is used to size the tv_onstack array that is input * to xe_vm_lock_dma_resv() and xe_vm_unlock_dma_resv(). |