Both execs and the preempt rebind worker can issue rebinds. Rebinds
require a fence, per tile, inserted into dma-resv slots of the VM and
BO (if external). The fence reservation accouting did not take into
account the number of fences required for rebinds, fix this.
v2: Rebase
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reported-by: Christopher Snowhill <kode54@gmail.com>
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/518
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
if (xe_vm_no_dma_fences(vm))
return 0;
- err = xe_vm_lock_dma_resv(vm, exec, 1, true);
+ /*
+ * 1 fence for job from exec plus a fence for each tile from a possible
+ * rebind
+ */
+ err = xe_vm_lock_dma_resv(vm, exec, 1 + vm->xe->info.tile_count, true);
if (err)
return err;
struct xe_vma *vma;
int err;
+ /*
+ * 1 fence for each preempt fence plus a fence for each tile from a
+ * possible rebind
+ */
err = drm_exec_prepare_obj(exec, xe_vm_obj(vm),
- vm->preempt.num_exec_queues);
+ vm->preempt.num_exec_queues +
+ vm->xe->info.tile_count);
if (err)
return err;