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:
@@ -890,6 +890,9 @@ anv_physical_device_try_create(struct anv_instance *instance,
|
||||
device->has_mmap_offset =
|
||||
anv_gem_get_param(fd, I915_PARAM_MMAP_GTT_VERSION) >= 4;
|
||||
|
||||
device->has_userptr_probe =
|
||||
anv_gem_get_param(fd, I915_PARAM_HAS_USERPTR_PROBE);
|
||||
|
||||
/* GENs prior to 8 do not support EU/Subslice info */
|
||||
device->subslice_total = intel_device_info_subslice_total(&device->info);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -928,6 +928,7 @@ struct anv_physical_device {
|
||||
bool has_thread_submit;
|
||||
bool has_mem_available;
|
||||
bool has_mmap_offset;
|
||||
bool has_userptr_probe;
|
||||
uint64_t gtt_size;
|
||||
|
||||
bool use_softpin;
|
||||
|
Reference in New Issue
Block a user