From patchwork Mon Nov 26 08:09:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151988 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5345402ljp; Mon, 26 Nov 2018 00:10:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/VcoxEMUXcIwdzeanrUpc6T7r3O4ay8mGI4lvmYMKl9u9LzPZaQaeyfoEql+Yd1KLqXqAUa X-Received: by 2002:a63:9c1a:: with SMTP id f26mr24065284pge.381.1543219819103; Mon, 26 Nov 2018 00:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543219819; cv=none; d=google.com; s=arc-20160816; b=c6hs+MPkspesVNBMKySRJkWBG3/TvCvHZU75hTgbgopb63icRHlfD8EDKFKrnej8p/ ZT65hB6LSsXEEjuvfPHzJwVJ2izrX1vGz7bTzRxGEs9ZRNNpE/W6txkeYUpUY8xagM/S QgTIy+xr/qAPlO0ODIYL7300SlMf/MVALGBegpf1mxF34+nhhNUaokqHaiLUqfB6eBti m4Ur0pkQWVSNKNxtl7dW3p9S1zScuEwoP6/dr6WH5fqcSvncLH6pTeCHNXHoqdXVi5Ig 35cbFERaojqdXkR4mY9248UMNMN2baOLxmTv+sd2BSTnqyIjgGRcVbCU80ssT8boREcv QgBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=w/GMM1ff8p/gM+URgpq1+8fAO9Gjz+eWd4YbnE/xt2Q=; b=TN6vBOkgiFa9Ohbt34dCer5d3X40POv29juLsDgdDyNIIbDkBZwDFzxmKaC8RU6I81 HVlfcOfiOdqH5fzhjUTdS9WzlkE3C8Km1TdSJgJChANPm8gUW473yt69eeTmES/lnGnl kVxLshgnbfYC+UcETnbFBtckO1RMDDvGdTScsgLv/2s0E3H34zYcoGOJRVQue5eCg0XO nBOwIQPBgmmXYepYYwHrGQSo9LsEB8NlTnakdRdWUR3feD4JIS6fPnHvtoSK+f8UhZJL irYsX0MPFPvpN+pTt7sgPKYxKvhwIjBeRWAP646CPkGfXLjGv853rWMxia9XU2e0MYOO wG7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cuFqq0sb; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n34si29954913pld.381.2018.11.26.00.10.18; Mon, 26 Nov 2018 00:10:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=@linaro.org header.s=google header.b=cuFqq0sb; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726209AbeKZTDg (ORCPT + 11 others); Mon, 26 Nov 2018 14:03:36 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42347 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbeKZTDg (ORCPT ); Mon, 26 Nov 2018 14:03:36 -0500 Received: by mail-pf1-f196.google.com with SMTP id 64so6182669pfr.9 for ; Mon, 26 Nov 2018 00:10:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w/GMM1ff8p/gM+URgpq1+8fAO9Gjz+eWd4YbnE/xt2Q=; b=cuFqq0sbM4dbCfR1isEaD457wwgRo7duSKA7RMJdvxVuRpoUXU0WDE4d04dPjUNgSk VCUfmwrBAJmQnY4ZDjnLz9jQ6nuRXJL8zWv6zjYsFhleCS4XiQ9FEsGOz8MB+L/wI8WB 5O1TaOdf4KFOmyKVkBK7reKsriky0KbRaAX0w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w/GMM1ff8p/gM+URgpq1+8fAO9Gjz+eWd4YbnE/xt2Q=; b=KQ4J53NG1bAA0Z31NbB4qe0FJskOQNdI67qKbo4A5Cfrb7HOAPdHPrYvrK8+TbrZVX Vb3l8rjKIKgcoVX/DKZC2qHL5c7zGu1OMUOarLI+FKtsTKAXVXnZaaZJlZcAc0uwXjrQ dGyjKssx3OvFVANeDURjnbQ2bA1k++nIdfaB51cVgnxuYnfKZiPVajwQZzvyw4VD10by wDfBLoGaCnWQWHcNsn+IzOtZyVV4JjIBgHASSrvVgAz/i+Lnw5N/wK1WbnrgePbB2W7e avsrlgQHWkpnNVrYTiBWJDjopISpRCMDOUTSOffTspbNJrCVG7qsxyRY+VocfKE4Lrgv bASQ== X-Gm-Message-State: AA+aEWYjM2Esx3Hq1G8ZdY9yvjebTNQCTBwnHIK3KAkEP4L0QtcAEPVy 7qfD+1gT5Zep3Wl/F5X8D/GwKA== X-Received: by 2002:a63:588:: with SMTP id 130mr23447488pgf.273.1543219816695; Mon, 26 Nov 2018 00:10:16 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id 12sm41463533pgd.35.2018.11.26.00.10.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 00:10:15 -0800 (PST) From: Viresh Kumar To: ulf.hansson@linaro.org, Rafael Wysocki , Kevin Hilman , Len Brown , Nishanth Menon , Pavel Machek , Stephen Boyd , Viresh Kumar Cc: Viresh Kumar , Vincent Guittot , rnayak@codeaurora.org, niklas.cassel@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH V2 0/5] PM / Domains: Allow performance state propagation Date: Mon, 26 Nov 2018 13:39:59 +0530 Message-Id: X-Mailer: git-send-email 2.19.1.568.g152ad8e3369a MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi, This series adds performance state propagation support in genpd core. The propagation happens from the sub-domains to their masters. More details can be found in the individual commit logs. This is tested on hikey960 by faking power domains in such a way that the CPU devices have two power domains and both of them have the same master domain. The CPU device, as well as its power domains have "required-opps" property set and the performance requirement from the CPU eventually configures all the domains (2 sub-domains and 1 master). Based on opp/linux-next branch (which is 4.20-rc1 + multiple-power-domain-support-in-opp-core + some OPP fixes). v1->V2: - First patch (1/5) is new and an improvement to earlier stuff. - Move genpd_status_on() check to _genpd_reeval_performance_state() from _genpd_set_performance_state(). - Improve dev_pm_opp_xlate_performance_state() to handle 1:1 pstate mapping between genpd and its master and also to fix a problem while finding the dst_table. - Handle pstate=0 case properly. -- viresh Viresh Kumar (5): OPP: Improve _find_table_of_opp_np() OPP: Add dev_pm_opp_xlate_performance_state() helper PM / Domains: Save OPP table pointer in genpd PM / Domains: Factorize dev_pm_genpd_set_performance_state() PM / Domains: Propagate performance state updates drivers/base/power/domain.c | 211 +++++++++++++++++++++++++++--------- drivers/opp/core.c | 59 ++++++++++ drivers/opp/of.c | 14 ++- include/linux/pm_domain.h | 6 + include/linux/pm_opp.h | 7 ++ 5 files changed, 244 insertions(+), 53 deletions(-) -- 2.19.1.568.g152ad8e3369a Tested-by: Rajendra Nayak Acked-by: Ulf Hansson Signed-off-by: Viresh Kumar