diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index e3576253c53..b01d0fa0134 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -2409,9 +2409,7 @@ iris_bufmgr_create(struct intel_device_info *devinfo, int fd, bool bo_reuse) bufmgr->has_tiling_uapi = devinfo->has_tiling_uapi; bufmgr->bo_reuse = bo_reuse; bufmgr->has_mmap_offset = devinfo->has_mmap_offset; - int val; - if (intel_gem_get_param(fd, I915_PARAM_HAS_USERPTR_PROBE, &val) && val >= 1) - bufmgr->has_userptr_probe = true; + bufmgr->has_userptr_probe = devinfo->has_userptr_probe; iris_bufmgr_get_meminfo(bufmgr, devinfo); bufmgr->all_vram_mappable = intel_vram_all_mappable(devinfo); diff --git a/src/intel/dev/intel_device_info.c b/src/intel/dev/intel_device_info.c index 26500d33018..d21de297108 100644 --- a/src/intel/dev/intel_device_info.c +++ b/src/intel/dev/intel_device_info.c @@ -2006,6 +2006,8 @@ intel_i915_get_device_info_from_fd(int fd, struct intel_device_info *devinfo) if (getparam(fd, I915_PARAM_MMAP_GTT_VERSION, &val)) devinfo->has_mmap_offset = val >= 4; + if (getparam(fd, I915_PARAM_HAS_USERPTR_PROBE, &val)) + devinfo->has_userptr_probe = val; return true; } diff --git a/src/intel/dev/intel_device_info.h b/src/intel/dev/intel_device_info.h index 3b0f5a11fc7..73e827f2fd5 100644 --- a/src/intel/dev/intel_device_info.h +++ b/src/intel/dev/intel_device_info.h @@ -147,6 +147,7 @@ struct intel_device_info bool has_lsc; bool has_mesh_shading; bool has_mmap_offset; + bool has_userptr_probe; /** * \name Intel hardware quirks diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 023ac5a7b4f..04de126dcc0 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -799,9 +799,6 @@ anv_i915_physical_device_get_parameters(struct anv_physical_device *device) if (intel_gem_get_param(fd, I915_PARAM_HAS_EXEC_TIMELINE_FENCES, &val)) device->has_exec_timeline = val; - if (intel_gem_get_param(fd, I915_PARAM_HAS_USERPTR_PROBE, &val)) - device->has_userptr_probe = val; - return result; } diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index c1dba6a912e..c1d471cb122 100644 --- a/src/intel/vulkan/anv_gem.c +++ b/src/intel/vulkan/anv_gem.c @@ -176,7 +176,7 @@ anv_gem_userptr(struct anv_device *device, void *mem, size_t size) .flags = 0, }; - if (device->physical->has_userptr_probe) + if (device->physical->info.has_userptr_probe) userptr.flags |= I915_USERPTR_PROBE; int ret = intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 713182a3bc5..e0777bf68c0 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -964,7 +964,6 @@ struct anv_physical_device { bool has_exec_capture; VkQueueGlobalPriorityKHR max_context_priority; bool has_context_isolation; - bool has_userptr_probe; uint64_t gtt_size; bool always_use_bindless; diff --git a/src/intel/vulkan_hasvk/anv_device.c b/src/intel/vulkan_hasvk/anv_device.c index 890781b6e8f..768e57d27d6 100644 --- a/src/intel/vulkan_hasvk/anv_device.c +++ b/src/intel/vulkan_hasvk/anv_device.c @@ -882,9 +882,6 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, device->always_flush_cache = INTEL_DEBUG(DEBUG_STALL) || driQueryOptionb(&instance->dri_options, "always_flush_cache"); - if (intel_gem_get_param(fd, I915_PARAM_HAS_USERPTR_PROBE, &val)) - device->has_userptr_probe = val; - device->compiler = brw_compiler_create(NULL, &device->info); if (device->compiler == NULL) { result = vk_error(instance, VK_ERROR_OUT_OF_HOST_MEMORY); diff --git a/src/intel/vulkan_hasvk/anv_gem.c b/src/intel/vulkan_hasvk/anv_gem.c index 2d8e26c2e5b..5844016952a 100644 --- a/src/intel/vulkan_hasvk/anv_gem.c +++ b/src/intel/vulkan_hasvk/anv_gem.c @@ -147,7 +147,7 @@ anv_gem_userptr(struct anv_device *device, void *mem, size_t size) .flags = 0, }; - if (device->physical->has_userptr_probe) + if (device->physical->info.has_userptr_probe) userptr.flags |= I915_USERPTR_PROBE; int ret = intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr); diff --git a/src/intel/vulkan_hasvk/anv_private.h b/src/intel/vulkan_hasvk/anv_private.h index 3f00604b293..951fd7cba58 100644 --- a/src/intel/vulkan_hasvk/anv_private.h +++ b/src/intel/vulkan_hasvk/anv_private.h @@ -963,7 +963,6 @@ struct anv_physical_device { bool has_exec_capture; int max_context_priority; bool has_context_isolation; - bool has_userptr_probe; uint64_t gtt_size; bool use_relocations;