From: Jeffy Chen <jeffy.chen@rock-chips.com>
To: linux-kernel@vger.kernel.org
Cc: rui.zhang@intel.com, briannorris@chromium.org,
javi.merino@kernel.org, dianders@chromium.org,
lukasz.luba@arm.com, Jeffy Chen <jeffy.chen@rock-chips.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
linux-pm@vger.kernel.org
Subject: [PATCH] devfreq: simple_ondemand: Update devfreq stats when governor started
Date: Tue, 18 Jul 2017 18:02:51 +0800 [thread overview]
Message-ID: <1500372171-7194-1-git-send-email-jeffy.chen@rock-chips.com> (raw)
If governor suspends soon after started, it may not have the chance to
update devfreq stats, which leaves devfreq stats' current frequence be
zero.
So when the thermal core tries to throttle the power, it would failed
to get the correct static power of current frequence and print these
warnings:
[ 2.024735] core: dev_pm_opp_get_voltage: Invalid parameters
[ 2.024743] mali ff9a0000.gpu: Failed to get voltage for frequency 0:
-34
...
[ 2.026320] core: dev_pm_opp_get_voltage: Invalid parameters
[ 2.026327] mali ff9a0000.gpu: Failed to get voltage for frequency 0:
-34
Update devfreq stats when governor started to avoid that.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
drivers/devfreq/governor_simpleondemand.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c
index ae72ba5..26e0e58 100644
--- a/drivers/devfreq/governor_simpleondemand.c
+++ b/drivers/devfreq/governor_simpleondemand.c
@@ -98,6 +98,7 @@ static int devfreq_simple_ondemand_handler(struct devfreq *devfreq,
{
switch (event) {
case DEVFREQ_GOV_START:
+ devfreq_update_stats(devfreq);
devfreq_monitor_start(devfreq);
break;
--
2.1.4
next reply other threads:[~2017-07-18 10:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 10:02 Jeffy Chen [this message]
[not found] ` <CGME20170718100259epcas3p2886849647d4a6fe257a4e12854a10f7c@epcms1p8>
2017-07-18 10:35 ` MyungJoo Ham
2017-07-18 11:27 ` jeffy
2017-07-19 4:28 ` jeffy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500372171-7194-1-git-send-email-jeffy.chen@rock-chips.com \
--to=jeffy.chen@rock-chips.com \
--cc=briannorris@chromium.org \
--cc=cw00.choi@samsung.com \
--cc=dianders@chromium.org \
--cc=javi.merino@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=myungjoo.ham@samsung.com \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®