intel/dev: fixup max_cs_workgroup_threads after hwconfig is read
Without it we get max value from gfx12 on gfx>12.
Fixes: d9ff9ea9c3
("intel/dev: Read hwconfig from i915")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17063>
This commit is contained in:
parent
5485bf7b1b
commit
4e4ef72aac
|
@ -1899,7 +1899,13 @@ intel_get_device_info_from_fd(int fd, struct intel_device_info *devinfo)
|
|||
return true;
|
||||
}
|
||||
|
||||
intel_get_and_process_hwconfig_table(fd, devinfo);
|
||||
if (intel_get_and_process_hwconfig_table(fd, devinfo)) {
|
||||
/* After applying hwconfig values, some items need to be recalculated. */
|
||||
devinfo->max_cs_threads =
|
||||
devinfo->max_eus_per_subslice * devinfo->num_thread_per_eu;
|
||||
|
||||
update_cs_workgroup_threads(devinfo);
|
||||
}
|
||||
|
||||
int timestamp_frequency;
|
||||
if (getparam(fd, I915_PARAM_CS_TIMESTAMP_FREQUENCY,
|
||||
|
|
|
@ -272,22 +272,7 @@ apply_hwconfig_item(struct intel_device_info *devinfo,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
intel_apply_hwconfig_table(struct intel_device_info *devinfo,
|
||||
const struct hwconfig *hwconfig,
|
||||
int32_t hwconfig_len)
|
||||
{
|
||||
intel_process_hwconfig_table(devinfo, hwconfig, hwconfig_len,
|
||||
apply_hwconfig_item);
|
||||
|
||||
/* After applying hwconfig values, some items need to be recalculated. */
|
||||
if (devinfo->apply_hwconfig) {
|
||||
devinfo->max_cs_threads =
|
||||
devinfo->max_eus_per_subslice * devinfo->num_thread_per_eu;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
intel_get_and_process_hwconfig_table(int fd,
|
||||
struct intel_device_info *devinfo)
|
||||
{
|
||||
|
@ -296,9 +281,14 @@ intel_get_and_process_hwconfig_table(int fd,
|
|||
hwconfig = intel_i915_query_alloc(fd, DRM_I915_QUERY_HWCONFIG_BLOB,
|
||||
&hwconfig_len);
|
||||
if (hwconfig) {
|
||||
intel_apply_hwconfig_table(devinfo, hwconfig, hwconfig_len);
|
||||
intel_process_hwconfig_table(devinfo, hwconfig, hwconfig_len,
|
||||
apply_hwconfig_item);
|
||||
free(hwconfig);
|
||||
if (devinfo->apply_hwconfig)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -34,7 +34,7 @@ extern "C" {
|
|||
|
||||
struct intel_device_info;
|
||||
|
||||
void
|
||||
bool
|
||||
intel_get_and_process_hwconfig_table(int fd,
|
||||
struct intel_device_info *devinfo);
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue