From patchwork Fri Oct 12 11:11:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 148747 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp598677lji; Fri, 12 Oct 2018 04:11:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV63KayNiSqgHF9irxLBfRzLmwaZbDtPFnmwvHNx8K1wOfH6VGB/nM2PRNLiYcW28wIZWSaOp X-Received: by 2002:a17:902:6ac4:: with SMTP id i4-v6mr5468473plt.153.1539342705305; Fri, 12 Oct 2018 04:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539342705; cv=none; d=google.com; s=arc-20160816; b=qGB1H6L1zUuw75v5m0c8DGomjD78HZDi37VnmbpkgpS6VA937OlaOF51Doyiq7lGmY dGzw8wUen/xEKS/IzjGo7kPFaH4d2X2GYInS4fhHYH2NJ57pJpjfLUsfoJOmMp81nstD etS40Nhfv79vx4yIJEDsAWPpUOPWoICL06ojf7YM47cQCcTKfFf1RKJuJNxoKKhJKDhn 5fMDgIbNeTUf9bF+LImnQISRwAtebYCjGR4asXDAY6/073qWkI/Kb2LwhQwzrqAcUfPc FMTlt9mFilUucj19/lpHtNl3qe0zTIe8eLBA/AUMbTmIGTQetSrrE+VuuT0oAhSgampv FNWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=lC+8ZnXbEaknaWpQYGS8dSHNeFRKofdA00EXaBKsxz8=; b=tjfuGizHggNZLp1TjB2vQ5OVltNt0LntUFXoK1s6Z0efwDpKkL2Jga8L0GoBrzKyuf j5q1gKvel6flcdpYst0iE3+tZGx1rmmQ1dsiM2X714QnxiLXDt38lDRVLWDEUEN1xF47 BxRyc0hMuhHd5b34UmbXMZNVDbVQZFh67g5Azc8uOHxbioA7IN9XmkOJEDTeUKXXKfwh BTb7Qr114wdyCZXaRr1Np02aops453oH4vwK7lcfQCUEqmhqoFrHKsvT8NX/CttTHN5c 3r4orGg69WGwIVu+VkQKFx5AJcYuOJQoO0bNPKt8FCFRCYkDbJ35S0+MuAnf0Hvk6K9n rG7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VmnmrCxL; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj3-v6si958732plb.12.2018.10.12.04.11.44; Fri, 12 Oct 2018 04:11:45 -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=@linaro.org header.s=google header.b=VmnmrCxL; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728108AbeJLSnh (ORCPT + 32 others); Fri, 12 Oct 2018 14:43:37 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:32947 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbeJLSnh (ORCPT ); Fri, 12 Oct 2018 14:43:37 -0400 Received: by mail-pg1-f196.google.com with SMTP id y18-v6so5720941pge.0 for ; Fri, 12 Oct 2018 04:11:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=lC+8ZnXbEaknaWpQYGS8dSHNeFRKofdA00EXaBKsxz8=; b=VmnmrCxL/eQoplTJ59zWk0guAGacHTMND2LzCpJ/FT/gjXwx8S8BpCjy/L896FURNx R1qkTmCMdPraeopkIH3HlfQ+tZJJZa2NIh1Kg71uxRdXkoKKNPciBMHDMJh0AOU3PkMt c40Fqv/pYE38NV7TiMNOSqj784DyN6AN9+Z+k= 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; bh=lC+8ZnXbEaknaWpQYGS8dSHNeFRKofdA00EXaBKsxz8=; b=dw8PaLTbBFxijCAkgobS8TdRDBVpIfroSwkHYT70/BUro7a67wPj32xvPvbRjuZeyH 8VQJoyIg5PkTTTAVPb50XXcH0Vde2107yiMqXZC146IZjdI79uL8sxoPKDuo4jL3qIQK owIUkN6OcS5XXAOvFDyoh1FvAK6VZU2vHCsfcXitiWnYJsM1T6wddQpFS+Rnq5NzEMJh RXt4cFlk+iOyRfYWkyZ8bRGvIi3ZsZRRhj/eLhWVlxA+KGJJ4HnGDkYdf/DPzy+THvmI O5DdcvAF2x9vm44nkzH+kJkKN1fdrph/WKKP6u1O2xm1QfRoGLM8YkLUsgIpMXSTzqfy p8EQ== X-Gm-Message-State: ABuFfoh2CpTLDFlkVgaSXJP+mCOhRuHCb+qvdIFwe9mBXy2cTsNiu8i0 Ai+nZxBgOTWNvXXE1UfkstQ74A== X-Received: by 2002:a63:2503:: with SMTP id l3-v6mr5102928pgl.69.1539342700956; Fri, 12 Oct 2018 04:11:40 -0700 (PDT) Received: from localhost ([122.171.67.41]) by smtp.gmail.com with ESMTPSA id a2-v6sm1385179pgc.68.2018.10.12.04.11.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 04:11:40 -0700 (PDT) From: Viresh Kumar To: ulf.hansson@linaro.org, Kevin Hilman , Len Brown , Nishanth Menon , Pavel Machek , "Rafael J. Wysocki" , Stephen Boyd , Viresh Kumar Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , niklas.cassel@linaro.org, rnayak@codeaurora.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 0/9] OPP: Support multiple power-domains per device Date: Fri, 12 Oct 2018 16:41:08 +0530 Message-Id: X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a2c Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, We are already at 4.19-rc7 and there may not enough time to get this reviewed/tested/ready for the upcoming merge window and so there is no hurry in getting this merged. The purpose to send now is to get this reviewed/tested, which would allow more more development to happen on top of this. This series improves the OPP core (and a bit of genpd core as well) to support multiple phandles in the "required-opps" property, which are only used for multiple power-domains per device for now. We still don't propagate the changes to master domains for the sub-domains, but this patchset is an important stepping stone for that to happen. Tested on Hikey960 after faking some power domains for CPUs. V1->V2: - Had a discussion at Linaro connect with Ulf regarding the changes V1 did in the genpd core and what his objections are to them. Based on his suggestions many changes are made. - The OPP core still needs the virtual device pointers to set the performance state for multiple domains, but the genpd core doesn't provide them automatically to the OPP core. One of the reasons behind this is to give more power to the consumer drivers which may not want to enable all the genpds at once. - The consumer drivers would now need to call the APIs dev_pm_opp_{set|put}_genpd_device() in order to set/reset these virtual device pointers. - More locking is put in place to protect the genpd device pointers in OPP core. - Reorg of the code at many places to make code less redundant. -- viresh Viresh Kumar (9): OPP: Identify and mark genpd OPP tables OPP: Separate out custom OPP handler specific code OPP: Populate required opp tables from "required-opps" property OPP: Populate OPPs from "required-opps" property PM / Domains: Add genpd_opp_to_performance_state() OPP: Add dev_pm_opp_{set|put}_genpd_device() helper OPP: Configure all required OPPs OPP: Rename and relocate of_genpd_opp_to_performance_state() OPP: Remove of_dev_pm_opp_find_required_opp() drivers/base/power/domain.c | 51 +++--- drivers/opp/core.c | 261 ++++++++++++++++++++++-------- drivers/opp/of.c | 313 +++++++++++++++++++++++++++++++----- drivers/opp/opp.h | 20 +++ include/linux/pm_domain.h | 7 +- include/linux/pm_opp.h | 16 +- 6 files changed, 519 insertions(+), 149 deletions(-) -- 2.18.0.rc1.242.g61856ae69a2c