anv: Fix Xe KMD userptr unbind
Userptr don't have a valid gem fd so it can't use DRM_XE_VM_BIND_OP_UNMAP_ALL.
Current code was unbinding workaround_bo or returning error when
workaround_bo size was smaller than userptr address.
So here doing a regular DRM_XE_VM_BIND_OP_UNMAP, without setting
xe_bind->obj and setting xe_bind->range and xe_bind->addr.
Fixes: 19439624 ("anv: Use DRM_XE_VM_BIND_OP_UNMAP_ALL to unbind whole bos")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28114>
This commit is contained in:
committed by
Marge Bot
parent
a56d2b8dad
commit
9227d63c19
@@ -309,6 +309,11 @@ xe_vm_unbind_bo(struct anv_device *device, struct anv_bo *bo)
|
||||
.wait_count = 0,
|
||||
.signal_count = 0,
|
||||
};
|
||||
if (bo->from_host_ptr) {
|
||||
bind.address = bo->offset;
|
||||
bind.size = bo->actual_size;
|
||||
bind.op = ANV_VM_UNBIND;
|
||||
}
|
||||
return xe_vm_bind_op(device, &submit, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user