Skip to content

Commit 88ec816

Browse files
digetxchanwoochoi
authored andcommitted
PM / devfreq: tegra30: Disable consecutive interrupts when appropriate
Consecutive interrupts should be disabled when boosting is completed. Currently the disabling of "lower" interrupt happens only for MCCPU monitor that uses dependency threshold, but even in a case of MCCPU the interrupt isn't getting disabled if CPU's activity is above the threshold. This results in a lot of dummy interrupt requests. The boosting feature is used by both MCCPU and MCALL, boosting should be stopped once it reaches 0 for both of the monitors and regardless of the activity level. The boosting stops to grow once the maximum limit is hit and thus the "upper" interrupt needs to be disabled when the limit is reached. Reviewed-by: Chanwoo Choi <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent 333abef commit 88ec816

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

drivers/devfreq/tegra30-devfreq.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,10 @@ static void actmon_isr_device(struct tegra_devfreq *tegra,
259259

260260
dev_ctrl |= ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN;
261261

262-
if (dev->boost_freq >= tegra->max_freq)
262+
if (dev->boost_freq >= tegra->max_freq) {
263+
dev_ctrl &= ~ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN;
263264
dev->boost_freq = tegra->max_freq;
265+
}
264266
} else if (intr_status & ACTMON_DEV_INTR_CONSECUTIVE_LOWER) {
265267
/*
266268
* new_boost = old_boost * down_coef
@@ -271,15 +273,10 @@ static void actmon_isr_device(struct tegra_devfreq *tegra,
271273

272274
dev_ctrl |= ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN;
273275

274-
if (dev->boost_freq < (ACTMON_BOOST_FREQ_STEP >> 1))
275-
dev->boost_freq = 0;
276-
}
277-
278-
if (dev->config->avg_dependency_threshold) {
279-
if (dev->avg_count >= dev->config->avg_dependency_threshold)
280-
dev_ctrl |= ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN;
281-
else if (dev->boost_freq == 0)
276+
if (dev->boost_freq < (ACTMON_BOOST_FREQ_STEP >> 1)) {
282277
dev_ctrl &= ~ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN;
278+
dev->boost_freq = 0;
279+
}
283280
}
284281

285282
device_writel(dev, dev_ctrl, ACTMON_DEV_CTRL);

0 commit comments

Comments
 (0)