linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: andrew-sh.cheng@mediatek.com, hsinyi@chromium.org
Cc: sibis@codeaurora.org, saravanak@google.com,
	myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
	cw00.choi@samsung.com, chanwoo@kernel.org, cwchoi00@gmail.com,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: [PATCH 1/4] PM / devfreq: passive: Fix get_target_freq when not using required-opp
Date: Thu, 17 Jun 2021 15:05:43 +0900	[thread overview]
Message-ID: <20210617060546.26933-2-cw00.choi@samsung.com> (raw)
In-Reply-To: <20210617060546.26933-1-cw00.choi@samsung.com>

The 86ad9a24f21e ("PM / devfreq: Add required OPPs support to passive governor")
supported the required-opp property for using devfreq passive governor.
But, 86ad9a24f21e has caused the problem on use-case when required-opp
is not used such as exynos-bus.c devfreq driver. So that fix the
get_target_freq of passive governor for supporting the case of when
required-opp is not used.

Cc: stable@vger.kernel.org
Fixes: 86ad9a24f21e ("PM / devfreq: Add required OPPs support to passive governor")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/governor_passive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c
index b094132bd20b..fc09324a03e0 100644
--- a/drivers/devfreq/governor_passive.c
+++ b/drivers/devfreq/governor_passive.c
@@ -65,7 +65,7 @@ static int devfreq_passive_get_target_freq(struct devfreq *devfreq,
 		dev_pm_opp_put(p_opp);
 
 		if (IS_ERR(opp))
-			return PTR_ERR(opp);
+			goto no_required_opp;
 
 		*freq = dev_pm_opp_get_freq(opp);
 		dev_pm_opp_put(opp);
@@ -73,6 +73,7 @@ static int devfreq_passive_get_target_freq(struct devfreq *devfreq,
 		return 0;
 	}
 
+no_required_opp:
 	/*
 	 * Get the OPP table's index of decided frequency by governor
 	 * of parent device.
-- 
2.17.1


  parent reply	other threads:[~2021-06-17  5:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210617054647epcas1p3f1ef3ddef736496151ff77df4f50749a@epcas1p3.samsung.com>
2021-06-17  6:05 ` [PATCH 0/4] PM / devfreq: Add cpu based scaling support to passive governor Chanwoo Choi
     [not found]   ` <CGME20210617054647epcas1p4d2e5b1fa1ec35487701189808178da18@epcas1p4.samsung.com>
2021-06-17  6:05     ` Chanwoo Choi [this message]
2021-06-24  1:38       ` [PATCH 1/4] PM / devfreq: passive: Fix get_target_freq when not using required-opp Chanwoo Choi
     [not found]   ` <CGME20210617054647epcas1p265359058d489661e09d8d48d4937ca7b@epcas1p2.samsung.com>
2021-06-17  6:05     ` [PATCH 2/4] PM / devfreq: Export devfreq_get_freq_ragne symbol within devfreq Chanwoo Choi
2021-06-22 18:23       ` Matthias Kaehlcke
2021-07-13 19:36         ` Chanwoo Choi
     [not found]   ` <CGME20210617054647epcas1p431edaffea5bf7f3792b55dc3d91289ae@epcas1p4.samsung.com>
2021-06-17  6:05     ` [PATCH 3/4] PM / devfreq: Add cpu based scaling support to passive governor Chanwoo Choi
2021-06-17  5:51       ` Hsin-Yi Wang
2021-06-17  6:13         ` Chanwoo Choi
2021-06-22 17:42       ` Matthias Kaehlcke
2021-06-22 18:36       ` Matthias Kaehlcke
     [not found]   ` <CGME20210617054647epcas1p41cd87f03bc6f5b44b6f2d7a3e5924860@epcas1p4.samsung.com>
2021-06-17  6:05     ` [PATCH 4/4] PM / devfreq: passive: Reduce duplicate code when passive_devfreq case Chanwoo Choi
2021-06-22 18:35       ` Matthias Kaehlcke
2021-07-13 19:31         ` Chanwoo Choi

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=20210617060546.26933-2-cw00.choi@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=andrew-sh.cheng@mediatek.com \
    --cc=chanwoo@kernel.org \
    --cc=cwchoi00@gmail.com \
    --cc=hsinyi@chromium.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=saravanak@google.com \
    --cc=sibis@codeaurora.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).