Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1970977imm; Sun, 27 May 2018 22:05:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoGd7Hy3EKIMQKN7qUvhnApFDEcSanhdc06tl2LVb37NQtUJZFSM5uWj/djVK0VqJaJRfH3 X-Received: by 2002:a62:f909:: with SMTP id o9-v6mr12070728pfh.256.1527483919528; Sun, 27 May 2018 22:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527483919; cv=none; d=google.com; s=arc-20160816; b=UqV5KGVx4ZRH4VxAHKwKXR+411jbAK8SMItnaqY7KMhscnzqP3ws3NPF98WlCGwO3f 1LwZ4SPrGvreQGp+i6BOGbBVCu+FzoJJ+Zp4pJWfzYq/NBc6GInkYcFKMzmX0crSo5yy FleOP85+Z5uDKZOM+76/OcnscEJNRRWfETjl2KZRov/1EmyT0rxzeA8ZPZeDmnrCD0pk qgf3B+SQDyyq9PTK5Ylgl92ZcpO7b1Gw5AY1+nL/Qsh5B4ViG+/FVHqLkmF0eIt8WwbB QQ4kfEvjqyTXy4GTKwZQTsIkeJE4Df4DFN9Ey1irvI4yvP+5t4mB1qVc3+GC9pQDe04p oFlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:cc:from :reply-to:subject:mime-version:to:dkim-signature:dkim-filter :arc-authentication-results; bh=BXmChnDTI0SM+yExY5BWoBdTk7s8Qvk63AAUcAo8me4=; b=hb8dUs6Y8tJPWGd2ZPffSikm5HPlyrbep6JJILI6v4AXJ2p9/AfHD/2CMVrmUosBnY ijof6dqwuVwqKPDWjXzIBhw+JHaRmjnU5+o4oNdOD2Irh5azZBoHf43pe06PNFi3HI7/ pSyLXhp4MlAuW9NEfy6cNVNOomDrjBSBzzouER45XVV3h8xTYXgJN2Smvm4L19I8sOvz YAQAhy/BMrz0dpqqZw7Q6W1YyLDVBaJzD0c5iupW2F6mVd1vXCBbckYJVslKG6e/Zxpc +/M4+T3KdPRYIMvD1eHWJUm4v6ULwcI0hX8rIvLDYeme7IV9qC0HWv7P7c6p7LzxdoOn ieGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=r2JBNke/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12-v6si30345706plr.42.2018.05.27.22.05.04; Sun, 27 May 2018 22:05:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=r2JBNke/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbeE1FEw (ORCPT + 99 others); Mon, 28 May 2018 01:04:52 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:27918 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753140AbeE1FEt (ORCPT ); Mon, 28 May 2018 01:04:49 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180528050447epoutp02dad93d45f4dec79fdb4dc92e774643d2~ytoDNKam50727407274epoutp028 for ; Mon, 28 May 2018 05:04:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180528050447epoutp02dad93d45f4dec79fdb4dc92e774643d2~ytoDNKam50727407274epoutp028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527483887; bh=BXmChnDTI0SM+yExY5BWoBdTk7s8Qvk63AAUcAo8me4=; h=To:Subject:Reply-To:From:CC:In-Reply-To:Date:References:From; b=r2JBNke/EI1Aex/TPVOh5tbLAU8w91YMhQKJA5OzXtc02zszRju0kLc7Y+b36ri7w fS4cLu26mcmepTXb2mvj5DK6Q1QE8nJLGB2lIpP5uPdL8EepE0LK+3Egwa72vFsd21 yPhAXaHUBAHYP4zisf9lCRvjM6Z6nLNCR80kj6I0= Received: from epsmges1p2.samsung.com (unknown [182.195.40.154]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180528050445epcas1p2d99ebb7de706bcc8c0e73dd331db1976~ytoAueYpS1338713387epcas1p2X; Mon, 28 May 2018 05:04:45 +0000 (GMT) X-AuditID: b6c32a36-bd1ff70000000fe4-fa-5b0b8dec8f46 Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 74.BE.04068.CED8B0B5; Mon, 28 May 2018 14:04:44 +0900 (KST) To: undisclosed-recipients:; Mime-Version: 1.0 Subject: RE: [PATCH 05/11] PM / devfreq: governors: Return device frequency limits instead of user limits Reply-To: myungjoo.ham@samsung.com From: MyungJoo Ham CC: Kyungmin Park , Chanwoo Choi , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Mark Rutland , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Brian Norris , Douglas Anderson , Matthias Kaehlcke X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20180525203043.249193-6-mka@chromium.org> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20180528050444epcms1p8e6552d55231a099ec89304dfb1f819b9@epcms1p8> Date: Mon, 28 May 2018 14:04:44 +0900 X-CMS-MailID: 20180528050444epcms1p8e6552d55231a099ec89304dfb1f819b9 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRjm29nOjtbiuKzelqSdsFLY9GxNT5ERZHUoi0E/DEXsoB+b6C7s bF2JZmGZZTeIQs110YxlWLPMLAuX9acsy8qC7lZGZFLrgpnZbl1+fQ/P+7zf8z4vL0Uo60kV VWRxYLtFKGHIaGnLtSS1+kPlmNzU3oZp3Mj+G3LO+2lQxvV+6Zdx7s7bMq7rRAfJbT3eRHJd Wz7IuZ62GpLzV3Yirr73roTzn+lDXFl7p3zBWL6xthHxwz/2I77adVfKez07SP7q4UY5v/uc B/F+71SDPAfPM2GhENsTsKXAWlhkMWYwy1bmL8zXp6WyanYOl84kWAQzzmAyswzqxUUlgUmZ hDVCiTNAGQRRZFLmz7NbnQ6cYLKKjgwml2W1GjY1XaPVBl5d3lytPiBZjU3Xq3zIdjJqXf3x ExIXei6vQFEU0LPhdO3ZAI6mlHQrgocVbZJgIZaOg8PVfbIKRFEKOgZGWscH6fF0MZR/3oOC WEkz4Hp8hQjzKVD+oiXEk7Qazp95Kg3+SdB1Uqg7O4rCZgo4tP2NNIynwIWG8yE+ik4Hr7s9 MtAEeHxq4C8evOGO9MZC2bMuIoxj4MXQpQivgtcDRyP6zdDrPyYJGgO9F8Hwo9FIIQVe3a8m w2GWw7V3oV4pnQjfPGURSSY87KgNZSfoeLgwUEME5QSdBE1tKWF6HHz8ukv2J0pr7WtJGM8A 36W6yDdxcPPg0VAr0Dy8bJkZXu0pBP3fa8i9KL7q30ar/jOr+md2BBEeNBHbRLMRi6xNqxEF s+i0GDUFVrMXhU40Oa0VHbud5UM0hZixCtdwdK5SJqwR15t9CCiCiVVEqwOUolBYvwHbrfl2 ZwkWfUgfyLyPUE0osAYO3uLIZ/VanU7HzWbT9CzLTFJsS/+Vo6SNggMXY2zD9j99EipK5UKV X4zubXv6FQbPqDvm/WBOdRvf3PRt0dpRZ0Op9fmPbNPSGQsu6oylaRWbbPXNTz7eOTmiWnzP 3wOls7b8FG6x6gerp29MytoxtGpZuzPbkOh1LsnYKY2XdWu2dpfnDGTnFTl1cc0rMl1HFJMT 56+VN/cMNWGNsm847+1lW7b+ACMVTQKbTNhF4TfAdUXKuAMAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180525203125epcas3p46c7cac352ede4b0ba5d2b36bc32ad566 References: <20180525203043.249193-6-mka@chromium.org> <20180525203043.249193-1-mka@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >The performance, powersave and simpleondemand governors can return >df->min/max_freq, which are the user defined frequency limits. >update_devfreq() already takes care of adjusting the target frequency >with the user limits if necessary, therefore we can return >df->scaling_min/max_freq instead, which is the min/max frequency >supported by the device at a given time (depending on the >enabled/disabled OPPs) > >Signed-off-by: Matthias Kaehlcke >--- > drivers/devfreq/governor_performance.c | 2 +- > drivers/devfreq/governor_powersave.c | 2 +- > drivers/devfreq/governor_simpleondemand.c | 6 +++--- > 3 files changed, 5 insertions(+), 5 deletions(-) > Actually, even scaling_max_freq and scaling_min_freq are covered centerally at devfreq.c:update_devfreq(); Wouldn't it be sufficient to return UINT_MAX for performance and return UINT_MIN (0) for powersave, if the purpose is to remove redundancy? In the same sense, we may return UINT_MAX for freq-increasing case for simpleondemand as well, because they are filtered centrally anyway. (This commit might be better merged to 4/11 in that case as well.) Cheers, MyungJoo