diff options
Diffstat (limited to 'mali_kbase/ipa/mali_kbase_ipa_simple.c')
-rw-r--r-- | mali_kbase/ipa/mali_kbase_ipa_simple.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mali_kbase/ipa/mali_kbase_ipa_simple.c b/mali_kbase/ipa/mali_kbase_ipa_simple.c index fadae7d..0fd2136 100644 --- a/mali_kbase/ipa/mali_kbase_ipa_simple.c +++ b/mali_kbase/ipa/mali_kbase_ipa_simple.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note /* * - * (C) COPYRIGHT 2016-2018, 2020-2021 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2016-2018, 2020-2022 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -33,6 +33,8 @@ #include "mali_kbase_ipa_simple.h" #include "mali_kbase_ipa_debugfs.h" +#if MALI_USE_CSF + /* This is used if the dynamic power for top-level is estimated separately * through the counter model. To roughly match the contribution of top-level * power in the total dynamic power, when calculated through counter model, @@ -43,6 +45,8 @@ */ #define TOP_LEVEL_DYN_COEFF_SCALER (3) +#endif /* MALI_USE_CSF */ + #if MALI_UNIT_TEST static int dummy_temp; @@ -227,14 +231,12 @@ static int add_params(struct kbase_ipa_model *model) (struct kbase_ipa_model_simple_data *)model->model_data; err = kbase_ipa_model_add_param_s32(model, "static-coefficient", - &model_data->static_coefficient, - 1, true); + (s32 *)&model_data->static_coefficient, 1, true); if (err) goto end; err = kbase_ipa_model_add_param_s32(model, "dynamic-coefficient", - &model_data->dynamic_coefficient, - 1, true); + (s32 *)&model_data->dynamic_coefficient, 1, true); if (err) goto end; @@ -321,8 +323,9 @@ static int kbase_simple_power_model_recalculate(struct kbase_ipa_model *model) mutex_lock(&model->kbdev->ipa.lock); if (IS_ERR_OR_NULL(tz)) { - pr_warn_ratelimited("Error %ld getting thermal zone \'%s\', not yet ready?\n", - PTR_ERR(tz), tz_name); + pr_warn_ratelimited( + "Error %d getting thermal zone \'%s\', not yet ready?\n", + PTR_ERR_OR_ZERO(tz), tz_name); return -EPROBE_DEFER; } |