Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4375100imm; Wed, 30 May 2018 04:36:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK3uDkBHeuhc/KqAUv10QLX6oLfGizkUPVs/LmfcaThd8DECWJ9DmkpaJRFmZFfwRtDAQf2 X-Received: by 2002:a63:78c3:: with SMTP id t186-v6mr1916839pgc.93.1527680190215; Wed, 30 May 2018 04:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527680190; cv=none; d=google.com; s=arc-20160816; b=GtKd4uffmS02HQupqLd+zaF1HMX1Fzw30EGG4q4ncxG02Bfuw9CDeeMc+rv8WNS8uc E1aXVsRaJ8abSBVhuCJQWP1EjCyOamy/boxBHvql29BUn5j0POGlEGqJEEmhqP6bnW56 K10B+smYDaXVEBdE2mqoENfJo2K4pWS1m4woUcAnhQj/RpHkSeBQOLii3FKCVJNQDkTn g09QniRyxkbhX6a1+iu1NtM62dKMJeuvcFafnZFzOxBHUsiO2o8VAh4IOhlJO5sSs0Nq xSkfWnelwPLsYOacA7BJscgOpwsrVORTfoapSep0x26QmITQbs8NdFDxt2CqaLjmZvlF gRdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=pxpexx+WUrnELC0XWSuB/XlIQPbxlx7NJKOMzoVDr1g=; b=v4dqQKlR1w/2kEGmq8455WzZHKoYJjW2p55Khda2daT7jsB2QJEJr0WMOreN0mZ1MH n/TLYU/B80H0nF3nEv6f4oswZVbfJOryAm1G8Ojvpy/XXYtu/JJq8rJMyiZb5X6fxuZ5 OhLGvQ4TpZjgR9Wy6FdXzdlLgivs790xXgnp9++/DcVN6aonid8zXAdWmMwDg2tP936s FHtRkAGa51gt6vRoUXNlSGMODxnm7Rtd7pzqltCLSbX9zAR6SSkjcUcdPBG6Ii9f54sA b0GympWHLmZzcQhwlin0fXHBL79smsAiUFWsngLnD8O9oS1k5nxXnUPr8d/FGSXXgGdj ufuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dgu1FMSe; 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 e11-v6si15364984pgq.191.2018.05.30.04.36.15; Wed, 30 May 2018 04:36:30 -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=Dgu1FMSe; 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 S1753644AbeE3Leb (ORCPT + 99 others); Wed, 30 May 2018 07:34:31 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:51550 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753633AbeE3LeU (ORCPT ); Wed, 30 May 2018 07:34:20 -0400 Received: by mail-it0-f67.google.com with SMTP id d10-v6so22676778itj.1 for ; Wed, 30 May 2018 04:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pxpexx+WUrnELC0XWSuB/XlIQPbxlx7NJKOMzoVDr1g=; b=Dgu1FMSemBwjjm3/FY7fBNRxB70XDdX3m+IZ4r5MLJ2e1VUEf3OhYydU6vzHANcKVi JkRCXMI1pqp1r1Ax9tmbxLUQ8pYydtlyCHLlo0LARy3/88kKiDUOGOxnpCM77eCxQpbk xT6w2NMtoWAhwDJKiRs/EZwECDXob2K4eNXMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pxpexx+WUrnELC0XWSuB/XlIQPbxlx7NJKOMzoVDr1g=; b=LdozhHau9ScvPRBhXy3XYbqMchPHc0SsmIMp74OVabzHnpPICYvUzisJFa7uCO5H+f gDBDZIN7Abff6kPUh9CDMfXm/W0/+sKkQQB1fv8W3M77KjhkxCcdF15+nE6Yonqf13Je bUZmS7/fxD5ei6QSqmMEv4c0c1jT6cpUkq8tDOhfiMxDlTIUvDuEny4PJ7MCAXkdw+T6 RCgBavvKcZEozK0a8h2NnDg4cC5k/PksS8QYJcr5LWmxV+O3jgY8t+Oy1ZWYQmKrl9TB T1XeNdL2yrIqe2etjlhCus7ASKA2CMMGZnryCaeTUN8vN0Pdvk8E2NcNOy/Z55CYHzRK qfyg== X-Gm-Message-State: APt69E0QXUXIGu6bLhxP1HlsgrI+1kl3sAyCR6w3xu/7pjMLw2f/j2+D I3Q9zrkDhlwM/ir0MXsrzZ+AsMHStogHNgmIE9nkOA== X-Received: by 2002:a24:694b:: with SMTP id e72-v6mr1282758itc.38.1527680059471; Wed, 30 May 2018 04:34:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:c054:0:0:0:0:0 with HTTP; Wed, 30 May 2018 04:34:18 -0700 (PDT) In-Reply-To: References: <20180529100421.31022-1-ulf.hansson@linaro.org> From: Ulf Hansson Date: Wed, 30 May 2018 13:34:18 +0200 Message-ID: Subject: Re: [PATCH v2 0/9] PM / Domains: Add support for multi PM domains per device To: "Rafael J. Wysocki" Cc: "Rafael J . Wysocki" , Linux PM , Greg Kroah-Hartman , Jon Hunter , Geert Uytterhoeven , Todor Tomov , Rajendra Nayak , Viresh Kumar , Vincent Guittot , Kevin Hilman , Linux Kernel Mailing List , Linux ARM , linux-tegra@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30 May 2018 at 11:30, Rafael J. Wysocki wrote: > On Tue, May 29, 2018 at 12:04 PM, Ulf Hansson wrote: >> Changes in v2: >> - Addressed comments from Geert around DT doc. >> - Addressed comments from Jon around clarification of how to use this >> and changes to returned error codes. >> - Fixed build error in case CONFIG_PM was unset. >> >> There are devices that are partitioned across multiple PM domains. Currently >> these can't be supported well by the available PM infrastructures we have in >> the kernel. This series is an attempt to address this. >> >> The interesting parts happens from patch 5 an onwards, including a minor DT >> update to the existing power-domain bindings, the 4 earlier are just trivial >> clean-ups of some related code in genpd, which I happened to stumble over. >> >> Some additional background: >> >> One existing case where devices are partitioned across multiple PM domains, is >> the Nvida Tegra 124/210 X-USB subsystem. A while ago Jon Hunter (Nvidia) sent a >> series, trying to address these issues, however this is a new approach, while >> it re-uses the same concepts from DT point of view. >> >> The Tegra 124/210 X-USB subsystem contains of a host controller and a device >> controller. Each controller have its own independent PM domain, but are being >> partitioned across another shared PM domain for the USB super-speed logic. >> >> Currently to make the drivers work, either the related PM domains needs to stay >> powered on always or the PM domain topology needs to be in-correctly modelled >> through sub-domains. In both cases PM domains may be powered on while they >> don't need to be, so in the end this means - wasting power -. >> >> As stated above, this series intends to address these problem from a PM >> infrastructure point of view. More details are available in each changelog. >> >> It should be noted that this series has been tested on HW, however only by using >> a home-cooked test PM domain driver for genpd and together with a test driver. >> This allowed me to play with PM domain (genpd), runtime PM and device links. >> >> Any further deployment for real use cases are greatly appreciated. I am happy to >> to help, if needed! >> >> Kind regards >> Ulf Hansson >> >> >> Ulf Hansson (9): >> PM / Domains: Drop extern declarations of functions in pm_domain.h >> PM / Domains: Drop __pm_genpd_add_device() >> PM / Domains: Drop genpd as in-param for pm_genpd_remove_device() >> PM / Domains: Drop unused parameter in genpd_allocate_dev_data() >> PM / Domains: dt: Allow power-domain property to be a list of >> specifiers >> PM / Domains: Don't attach devices in genpd with multi PM domains >> PM / Domains: Split genpd_dev_pm_attach() >> PM / Domains: Add support for multi PM domains per device to genpd >> PM / Domains: Add dev_pm_domain_attach_by_id() to manage multi PM >> domains >> >> .../bindings/power/power_domain.txt | 19 ++- >> drivers/base/power/common.c | 39 ++++- >> drivers/base/power/domain.c | 155 ++++++++++++++---- >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 2 +- >> include/linux/pm_domain.h | 79 ++++----- >> 5 files changed, 216 insertions(+), 78 deletions(-) > > I can take patches [1-4/9] from this series for 4.18. Thanks! > > I need an ACK from Rob on the bindings change. Yes, of course! > > The rest of the series doesn't seem to be ready yet. It's getting reviewed and tested, so let's give it some more time. BTW, from an overall design point of view, you seems okay with it? Kind regards Uffe