anv: Add support for low latency hint on Xe KMD

This hint tells KMD and firmware to turn into low latency but high
power usage mode.
i915 already had it now it was implemented in 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-09 06:46:07 -08:00 committed by Marge Bot
parent 0ba6a0a23b
commit ad86a666ae
3 changed files with 11 additions and 4 deletions

View file

@ -73,6 +73,8 @@ xe_query_config(int fd, struct intel_device_info *devinfo)
if (config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM)
devinfo->has_local_mem = true;
if (config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY)
devinfo->supports_low_latency_hint = true;
if (!has_gmd_ip_version(devinfo))
devinfo->revision = (config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] >> 16) & 0xFFFF;

View file

@ -126,6 +126,7 @@ create_engine(struct anv_device *device,
.vm_id = device->vm_id,
.width = 1,
.num_placements = count,
.flags = 0,
};
intel_xe_gem_add_ext((uint64_t *)&create.extensions,
DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY,
@ -134,6 +135,10 @@ create_engine(struct anv_device *device,
intel_xe_gem_add_ext((uint64_t *)&create.extensions,
DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY,
&pxp_ext.base);
if (device->physical->instance->force_guc_low_latency &&
physical->info.supports_low_latency_hint)
create.flags |= DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT;
int ret;
bool retry;
do {

View file

@ -883,6 +883,10 @@
DRI_CONF_OPT_B(anv_large_workgroup_non_coherent_image_workaround, def, \
"Fixup image coherency qualifier for certain shaders.")
#define DRI_CONF_ANV_FORCE_GUC_LOW_LATENCY(def) \
DRI_CONF_OPT_B(force_guc_low_latency, def, \
"Enable low latency GuC strategy.")
/**
* \brief HASVK specific configuration options
*/
@ -891,10 +895,6 @@
DRI_CONF_OPT_B(hasvk_report_vk_1_3_version, def, \
"Override intel_hasvk API version")
#define DRI_CONF_ANV_FORCE_GUC_LOW_LATENCY(def) \
DRI_CONF_OPT_B(force_guc_low_latency, def, \
"Enable low latency GuC strategy. Only supported on i915.")
/**
* \brief DZN specific configuration options
*/