intel/dev: Fix max_cs_threads value on simulator

intel_device_info_update_after_hwconfig() updates max_cs_threads
based on max_eus_per_subslice and num_thread_per_eu but in some
platforms simulator the hwconfig don't have the
INTEL_HWCONFIG_MAX_NUM_EU_PER_DSS value, causing max_cs_threads to
be set to a wrong value and then causing issues when programing
CFE_STATE with a invalid value.

Fortunately we can also get max_eus_per_subslice from topology query,
so here moving the hwconfig query and
intel_device_info_update_after_hwconfig() call to after topology.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31850>
This commit is contained in:
José Roberto de Souza 2024-10-25 08:49:49 -07:00 committed by Marge Bot
parent 6c84cbd8c9
commit 6a0f2dd44b
2 changed files with 11 additions and 11 deletions

View file

@ -554,14 +554,6 @@ bool intel_device_info_i915_get_info_from_fd(int fd, struct intel_device_info *d
void *hwconfig_blob;
int32_t len;
hwconfig_blob = intel_device_info_i915_query_hwconfig(fd, &len);
if (hwconfig_blob) {
if (intel_hwconfig_process_table(devinfo, hwconfig_blob, len))
intel_device_info_update_after_hwconfig(devinfo);
free(hwconfig_blob);
}
int val;
if (getparam(fd, I915_PARAM_CS_TIMESTAMP_FREQUENCY, &val))
devinfo->timestamp_frequency = val;
@ -585,6 +577,14 @@ bool intel_device_info_i915_get_info_from_fd(int fd, struct intel_device_info *d
getparam_topology(devinfo, fd);
}
hwconfig_blob = intel_device_info_i915_query_hwconfig(fd, &len);
if (hwconfig_blob) {
if (intel_hwconfig_process_table(devinfo, hwconfig_blob, len))
intel_device_info_update_after_hwconfig(devinfo);
free(hwconfig_blob);
}
intel_device_info_i915_query_regions(devinfo, fd, false);
if (devinfo->platform == INTEL_PLATFORM_CHV)

View file

@ -330,12 +330,12 @@ intel_device_info_xe_get_info_from_fd(int fd, struct intel_device_info *devinfo)
if (!xe_query_gts(fd, devinfo))
return false;
if (xe_query_process_hwconfig(fd, devinfo))
intel_device_info_update_after_hwconfig(devinfo);
if (!xe_query_topology(fd, devinfo))
return false;
if (xe_query_process_hwconfig(fd, devinfo))
intel_device_info_update_after_hwconfig(devinfo);
devinfo->has_context_isolation = true;
devinfo->has_mmap_offset = true;
devinfo->has_caching_uapi = false;