From 83da7dc487e29a37176957cca9e350b028f14ced Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Thu, 6 Jan 2022 17:30:21 -0800 Subject: [PATCH] intel/dev: Recalculate max_cs_threads after applying hwconfig changes Signed-off-by: Jordan Justen Reviewed-by: Lionel Landwerlin Reviewed-by: Caio Oliveira Part-of: --- src/intel/dev/intel_hwconfig.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/dev/intel_hwconfig.c b/src/intel/dev/intel_hwconfig.c index b0b40abf3bf..0dfbd21cf21 100644 --- a/src/intel/dev/intel_hwconfig.c +++ b/src/intel/dev/intel_hwconfig.c @@ -278,6 +278,12 @@ intel_apply_hwconfig_table(struct intel_device_info *devinfo, { 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; + } } static void