Skip to content

Commit 1a27eaf

Browse files
kfrydryxabonislawski
authored andcommitted
platform: register proper basefw CPS consumption on boot
On init, register consumption of 10MCPS for base fw if CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL enabled Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com> Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com> +Squashed commit: 38b4cb1 platform: mtl: lowest clock as default Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent b120d37 commit 1a27eaf

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/platform/intel/ace/platform.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <sof/lib/cpu-clk-manager.h>
1616
#include <sof/lib/mm_heap.h>
1717
#include <sof/lib/watchdog.h>
18+
#include <sof/lib/cpu-clk-manager.h>
1819
#include <sof/schedule/edf_schedule.h>
1920
#include <sof/schedule/dp_schedule.h>
2021
#include <sof/schedule/ll_schedule.h>
@@ -80,6 +81,13 @@ static struct pm_notifier pm_state_notifier = {
8081
.state_exit = cpu_notify_state_exit,
8182
};
8283

84+
#if CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL
85+
/* Value to be determined experimentaly */
86+
#define BASE_CPS_USAGE 10000
87+
#else
88+
#define BASE_CPS_USAGE (CLK_MAX_CPU_HZ / 1000)
89+
#endif
90+
8391
/* Runs on the primary core only */
8492
int platform_init(struct sof *sof)
8593
{
@@ -89,10 +97,7 @@ int platform_init(struct sof *sof)
8997
platform_clock_init(sof);
9098
kcps_budget_init();
9199

92-
/* Set DSP clock to MAX using KCPS API. Value should be lowered when KCPS API
93-
* for modules is implemented
94-
*/
95-
ret = core_kcps_adjust(cpu_get_id(), CLK_MAX_CPU_HZ / 1000);
100+
ret = core_kcps_adjust(cpu_get_id(), BASE_CPS_USAGE);
96101
if (ret < 0)
97102
return ret;
98103

src/platform/meteorlake/include/platform/lib/clk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define CPU_LOWEST_FREQ_IDX CPU_WOVCRO_FREQ_IDX
2626

27-
#define CPU_DEFAULT_IDX CPU_HPRO_FREQ_IDX
27+
#define CPU_DEFAULT_IDX CPU_LOWEST_FREQ_IDX
2828

2929
#define SSP_DEFAULT_IDX 1
3030

0 commit comments

Comments
 (0)