From patchwork Thu Jun 17 06:05:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 12326657 X-Patchwork-Delegate: cw00.choi@samsung.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48696C49361 for ; Thu, 17 Jun 2021 05:46:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 354C961209 for ; Thu, 17 Jun 2021 05:46:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229712AbhFQFtC (ORCPT ); Thu, 17 Jun 2021 01:49:02 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:20889 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbhFQFtB (ORCPT ); Thu, 17 Jun 2021 01:49:01 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210617054651epoutp029f6e4722829e61df898ae7694d84fe4c~JSHXcTV_G0798407984epoutp02N for ; Thu, 17 Jun 2021 05:46:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210617054651epoutp029f6e4722829e61df898ae7694d84fe4c~JSHXcTV_G0798407984epoutp02N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1623908811; bh=6yTdXCtcMhIWw57WbRSwU6NBc0qFsTyI3S96cv8gatc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fbV18WkIx18uV0EuYgKKD5cFQPmSLZ9eEbLqnxHy7iEAlUZDkzeW8lkpaEVjPJPOb ifEG5MxdyV4bLllYxRphS13kkvT5c4kzDX4p1+FBdGjCojN0h6wSl9dy/dOj8BOApM D3bmOZFhauexz58CTVIxcyKqS9LC4keyBgmmQI6g= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20210617054651epcas1p2374af237de7a1e641dfa5f31f18c2de1~JSHXAStug2425124251epcas1p2d; Thu, 17 Jun 2021 05:46:51 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.40.152]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4G59zX0y0dz4x9QJ; Thu, 17 Jun 2021 05:46:48 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id AE.3F.09578.8C1EAC06; Thu, 17 Jun 2021 14:46:48 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20210617054647epcas1p4d2e5b1fa1ec35487701189808178da18~JSHThFDxO2867228672epcas1p49; Thu, 17 Jun 2021 05:46:47 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210617054647epsmtrp2ce77117d4c3e7da576649933a306743b~JSHTgMPuf2416724167epsmtrp2_; Thu, 17 Jun 2021 05:46:47 +0000 (GMT) X-AuditID: b6c32a35-58cdfa800000256a-25-60cae1c83607 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id F6.96.08163.7C1EAC06; Thu, 17 Jun 2021 14:46:47 +0900 (KST) Received: from localhost.localdomain (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210617054647epsmtip1e8df5f7be061f5db532fb458eccbd409~JSHTRkLrK1583415834epsmtip1g; Thu, 17 Jun 2021 05:46:47 +0000 (GMT) From: Chanwoo Choi 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 Message-Id: <20210617060546.26933-2-cw00.choi@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210617060546.26933-1-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpik+LIzCtJLcpLzFFi42LZdlhTT/fEw1MJBnvPMFtsX/+C1WLijSss Fte/PGe1eHZU22JC63Zmi7NNb9gtLu+aw2bxufcIo8XtxhVsFl2H/rJZXFv4ntViwcZHjA48 HrMbLrJ4XO7rZfLYOesuu8eCTaUem1Z1snm0nNzP4tG3ZRWjx+dNcgEcUdk2GamJKalFCql5 yfkpmXnptkrewfHO8aZmBoa6hpYW5koKeYm5qbZKLj4Bum6ZOUDHKimUJeaUAoUCEouLlfTt bIryS0tSFTLyi0tslVILUnIKLAv0ihNzi0vz0vWS83OtDA0MjEyBChOyMxb+W8dScIWr4v7n I0wNjO84uhg5OCQETCRmvErqYuTkEBLYwSix8HR9FyMXkP2JUeLb08VMEM5nRonPFw+yg1SB NJya08UGkdjFKLHz50EWCOcLo8SLnU1sIFVsAloS+1/cALNFBEwl9hyeCFbELPCDUWLS0RY2 kN3CArESe+4WgdSwCKhKT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HDxRA1nxgl3qyYAFbDJqAlsf/FDTaQGhEBc4njV6JBapgFWpgkNn7uYAapERaI lthzawoLiM0ioCox/eBfMJtXwEpi4pz1bBC75CVWbzgAVs8pYC1xbskddpCZQkA151+lT2Dk W8DIsIpRMrWgODc9t9iwwCgvtVyvODG3uDQvXS85P3cTIzh8tbR2MO5Z9UHvECMTB+MhRgkO ZiURXt3iEwlCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeS90nYwXEkhPLEnNTk0tSC2CyTJxcEo1 MO0vXJwofojTgH/6RNnvDM8diibOb9i6qPHhPI0Zqtwp5y+JSK4OZNBtO/G6yEDlo+LSjdx9 ihKnOQP2n5t+Ir6b9e8ki7KGi5GVr6ZyVbQdcXeu/al7cI5Yz99jOfM2LujdxL9Ckasqw9H0 sOl9gZKW0yfSvMSEHtr5zv23/Mb8CLXNEmejkx5qtKo/4z6ypvu5ld3hff91ehx8mPc4KYfx zVq/8MJ529Xuzs6mhkkvvryVC/rgsU5i4WG5aZEFXO8Ld5tWPQ6Sr9FcHuOrfffC5pb3uYcd im5tZvds6f1ozK+bxS6wfddOuehnmz/P/JBq66yqfOyLNu+mxoN/PTWmFeyayXmlu49HnWX3 DSWW4oxEQy3mouJEAOQ9JDLOAgAA X-CMS-MailID: 20210617054647epcas1p4d2e5b1fa1ec35487701189808178da18 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210617054647epcas1p4d2e5b1fa1ec35487701189808178da18 References: <20210617060546.26933-1-cw00.choi@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- 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.