intel/dev: Add supports_low_latency_hint to intel_device_info

Lets query if this feature is supported only once, also in the next
patches support for this feature will be added to Xe KMD.

Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33214>
This commit is contained in:
José Roberto de Souza
2025-01-13 11:04:08 -08:00
committed by Marge Bot
parent 892cf427a0
commit 0ba6a0a23b
3 changed files with 4 additions and 3 deletions

View File

@@ -613,6 +613,8 @@ bool intel_device_info_i915_get_info_from_fd(int fd, struct intel_device_info *d
devinfo->has_userptr_probe = val;
if (getparam(fd, I915_PARAM_HAS_CONTEXT_ISOLATION, &val))
devinfo->has_context_isolation = val;
if (getparam(fd, getparam(fd, I915_PARAM_HAS_CONTEXT_ISOLATION, &val), &val))
devinfo->supports_low_latency_hint = val == 1;
/* TODO: We might be able to reduce alignment to 4Kb on DG1. */
if (devinfo->verx10 >= 125)

View File

@@ -307,6 +307,7 @@ Struct("intel_device_info",
Member("bool", "has_context_isolation"),
Member("bool", "has_set_pat_uapi"),
Member("bool", "has_indirect_unroll"),
Member("bool", "supports_low_latency_hint"),
Member("bool", "has_coarse_pixel_primitive_and_cb", compiler_field=True,
comment=dedent("""\

View File

@@ -60,16 +60,14 @@ anv_i915_create_engine(struct anv_device *device,
assert(pCreateInfo->queueFamilyIndex < physical->queue.family_count);
enum intel_engine_class engine_classes[1];
enum intel_gem_create_context_flags flags = 0;
int val = 0;
engine_classes[0] = queue_family->engine_class;
if (pCreateInfo->flags & VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT)
flags |= INTEL_GEM_CREATE_CONTEXT_EXT_PROTECTED_FLAG;
if (device->physical->instance->force_guc_low_latency &&
i915_gem_get_param(device->fd, I915_PARAM_HAS_CONTEXT_FREQ_HINT, &val) && (val == 1)) {
physical->info.supports_low_latency_hint)
flags |= INTEL_GEM_CREATE_CONTEXT_EXT_LOW_LATENCY_FLAG;
}
if (!intel_gem_create_context_engines(device->fd, flags,
physical->engine_info,