platform/x86: ISST: Use fuse enabled mask instead of allowed levels
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 3 Oct 2023 16:32:31 +0000 (09:32 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 4 Oct 2023 08:10:24 +0000 (11:10 +0300)
Allowed level mask is a mask of levels, which are currently allowed to
dynamically switch by the OS. Fused mask is a mask of all levels even if
OS is not allowed to switch.

Even if OS is not allowed to dynamically switch, it is still possible for
user to boot to a level by using BIOS option. To decide which level to
boot next time, user wants to check parameters (power, performance or
thermal) of that level to decide.

So, when passing the level mask for display to user space, use fuse
enabled mask, which has all levels.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20231003163234.1856669-2-srinivas.pandruvada@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c

index 63faa2ea8327b2c7d64857ad47ddd31c43d022cd..a672a1c814afd3c1a5482fd9ea3436036db5eb13 100644 (file)
@@ -704,7 +704,7 @@ static int isst_if_get_perf_level(void __user *argp)
                return -EINVAL;
 
        perf_level.max_level = power_domain_info->max_level;
-       perf_level.level_mask = power_domain_info->pp_header.allowed_level_mask;
+       perf_level.level_mask = power_domain_info->pp_header.level_en_mask;
        perf_level.feature_rev = power_domain_info->pp_header.feature_rev;
        _read_pp_info("current_level", perf_level.current_level, SST_PP_STATUS_OFFSET,
                      SST_PP_LEVEL_START, SST_PP_LEVEL_WIDTH, SST_MUL_FACTOR_NONE)