anv: Use I915_USERPTR_PROBE when available

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044>
This commit is contained in:
Jason Ekstrand
2021-07-23 12:45:47 -05:00
parent 9feb57a85e
commit b8e2214ee5
3 changed files with 7 additions and 0 deletions

View File

@@ -173,6 +173,9 @@ anv_gem_userptr(struct anv_device *device, void *mem, size_t size)
.flags = 0,
};
if (device->physical->has_userptr_probe)
userptr.flags |= I915_USERPTR_PROBE;
int ret = intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr);
if (ret == -1)
return 0;