diff options
author | Matthew Brost <matthew.brost@intel.com> | 2023-07-26 19:33:48 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:37:55 +0300 |
commit | 342206b7cc064b8b004474c0baab2c67ced646d0 (patch) | |
tree | 51bcfccf8d5338f1d4178eda46d13d24b7483563 /drivers/gpu/drm/xe | |
parent | c8dc15464880d725a18593bdfe6651bd235574c3 (diff) | |
download | linux-342206b7cc064b8b004474c0baab2c67ced646d0.tar.xz |
drm/xe: Always use xe_vm_queue_rebind_worker helper
Do not queue the rebind worker directly, rather use the helper
xe_vm_queue_rebind_worker. This ensures we use the correct work queue.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe')
-rw-r--r-- | drivers/gpu/drm/xe/xe_pt.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.h | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index 48a87b50a040..8b75a6145f9b 100644 --- a/drivers/gpu/drm/xe/xe_pt.c +++ b/drivers/gpu/drm/xe/xe_pt.c @@ -1472,8 +1472,7 @@ __xe_pt_bind_vma(struct xe_tile *tile, struct xe_vma *vma, struct xe_engine *e, } if (!rebind && last_munmap_rebind && xe_vm_in_compute_mode(vm)) - queue_work(vm->xe->ordered_wq, - &vm->preempt.rebind_work); + xe_vm_queue_rebind_worker(vm); } else { kfree(rfence); kfree(ifence); diff --git a/drivers/gpu/drm/xe/xe_vm.h b/drivers/gpu/drm/xe/xe_vm.h index d386e72cb974..a1d30de37d20 100644 --- a/drivers/gpu/drm/xe/xe_vm.h +++ b/drivers/gpu/drm/xe/xe_vm.h @@ -182,6 +182,12 @@ extern struct ttm_device_funcs xe_ttm_funcs; struct ttm_buffer_object *xe_vm_ttm_bo(struct xe_vm *vm); +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_vm_reactivate_rebind() - Reactivate the rebind functionality on compute * vms. @@ -195,7 +201,7 @@ static inline void xe_vm_reactivate_rebind(struct xe_vm *vm) { if (xe_vm_in_compute_mode(vm) && vm->preempt.rebind_deactivated) { vm->preempt.rebind_deactivated = false; - queue_work(system_unbound_wq, &vm->preempt.rebind_work); + xe_vm_queue_rebind_worker(vm); } } @@ -203,12 +209,6 @@ 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(). |