Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2941482pxa; Tue, 18 Aug 2020 02:06:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5Sv4D1sKqHtHgh73/5Z9ZTw8NM+9n3Tcqhpt0qdmXEdwsm5ZfztaL1K2CuFe4XuPX3PaN X-Received: by 2002:a17:906:1f8b:: with SMTP id t11mr19392687ejr.32.1597741599882; Tue, 18 Aug 2020 02:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597741599; cv=none; d=google.com; s=arc-20160816; b=x04tXiKNCVfGxhI8gV+kgfFD//tIJD+y3AvOkJzh35wEImurPF8oBYbpyZlHPxIgAW 7rqyKkPqKiMqXwi7nWvaHYdy1W9EC/3UnNjHDzAvKLCZdk5XEFGGExBRK++w8MTHJmw2 vRwWOkIeTuA7syHEM6sNaZjEePw02pRRbendXMBiwDcOOZ1S+ADqahJ0opKyQJC5hJLi BMfod/xyUeYBXWr299REIiQ5aOmS3oo5/n9a52+ymfAaA7FDGyBe9NJC2Rf9aNPngTw2 CGHYWGihafBUgk0V2FTI6H3tyS8oFSES5UM8wvjfPOqTRUzHiSR98eKKwd06yyh8ypLn k+8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=AKEs3FjP4gzSXoMLGbgZjGNeqGkQDTm0T08hGb1hPTA=; b=sBYyPeC9QQBqMIYpuOKOsoni6kz8MuBxuHthHsel5VpffxA1hC63Qh1cqq/sni66zS W26T/yHCZ9p0y6D+1aTDOMNsh7N0nuBcTpQ1pBK/rk+US6mALWbPEJOCnu5G9KZrTDB7 3efEqgz40xN1t/AytBpWaITCmGvASYww7wcaXsH7C3slvfWBRFuV8yPCJwI9Q8rmFi3i DH7NYIgUxB5arywZhtov+AszMB4rZiR9Y6FZ9UfDMRYblABa7eAbTbum2nzn2tGzLwyO xENlLxTNys41NQ0TD+0ApJF+Y/BvXKDZqSh6beDopJ+/EVLeuGKQ7Wyys8oLj+bzM9ax fLuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=PaqdYeZ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si12900359ejf.220.2020.08.18.02.06.16; Tue, 18 Aug 2020 02:06:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=PaqdYeZ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgHRJFb (ORCPT + 99 others); Tue, 18 Aug 2020 05:05:31 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:50619 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbgHRJFb (ORCPT ); Tue, 18 Aug 2020 05:05:31 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597741529; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=AKEs3FjP4gzSXoMLGbgZjGNeqGkQDTm0T08hGb1hPTA=; b=PaqdYeZ8QNKo1w47fEe0jx+s+J3WfaxQ5tnWnmjQZPEkMjyds7m3ytgqjtbePFJjd3nvMR9w GLXMjmRevoGYxuYQbqP4r7fIIrvqwbqN5Cd6mvsDGwJt37SIsrSY01NUNysG1j88bhN1Nt0F V0XPx/nMjV//sWlkOn//K626tRA= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5f3b9959668ab3fef60a8606 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 18 Aug 2020 09:03:21 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 73540C43391; Tue, 18 Aug 2020 09:03:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sibis) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4E090C433C6; Tue, 18 Aug 2020 09:03:20 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 18 Aug 2020 14:33:20 +0530 From: Sibi Sankar To: Ulf Hansson Cc: Bjorn Andersson , "Rafael J. Wysocki" , Andy Gross , Linux Kernel Mailing List , linux-arm-msm , Linux PM , Greg Kroah-Hartman , Pavel Machek , Len Brown , Rajendra Nayak , Doug Anderson , linux-kernel-owner@vger.kernel.org, Kevin Hilman , linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH 1/2] PM / Domains: Add GENPD_FLAG_SUSPEND_ON flag In-Reply-To: References: <20200811190252.10559-1-sibis@codeaurora.org> <1ba3e4d703dd0a52547d63fa014451eb@codeaurora.org> <1ca666c336ebee569a429e729d5ae547@codeaurora.org> <33169e221707a2456397e478b275cfa9@codeaurora.org> Message-ID: X-Sender: sibis@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-18 14:01, Ulf Hansson wrote: > On Mon, 17 Aug 2020 at 18:49, Sibi Sankar wrote: >> >> On 2020-08-17 14:14, Ulf Hansson wrote: >> > On Thu, 13 Aug 2020 at 19:26, Sibi Sankar wrote: >> >> >> >> On 2020-08-13 18:04, Ulf Hansson wrote: >> >> > On Wed, 12 Aug 2020 at 19:03, Sibi Sankar wrote: >> >> >> >> >> >> Uffe, >> >> >> Thanks for taking time to review the >> >> >> series! >> >> >> >> >> >> On 2020-08-12 15:15, Ulf Hansson wrote: >> >> >> > On Tue, 11 Aug 2020 at 21:03, Sibi Sankar wrote: >> >> >> >> >> >> >> >> This is for power domains which needs to stay powered on for suspend >> >> >> >> but can be powered on/off as part of runtime PM. This flag is aimed at >> >> >> >> power domains coupled to remote processors which enter suspend states >> >> >> >> independent to that of the application processor. Such power domains >> >> >> >> are turned off only on remote processor crash/shutdown. >> >> >> > >> >> >> > As Kevin also requested, please elaborate more on the use case. >> >> >> > >> >> >> > Why exactly must the PM domain stay powered on during system suspend? >> >> >> > Is there a wakeup configured that needs to be managed - or is there a >> >> >> > co-processor/FW behaviour that needs to be obeyed to? >> >> >> >> >> >> Yes this is a co-processor behavior that >> >> >> needs to be obeyed. Specifically application >> >> >> processor notifies the Always on Subsystem >> >> >> (AOSS) that a particular co-processor is up >> >> >> using the power domains exposed by AOSS QMP >> >> >> driver. AOSS uses this information to wait >> >> >> for the co-processors to suspend before >> >> >> starting its sleep sequence. The application >> >> >> processor powers off these power domains only >> >> >> if the co-processor has crashed or powered >> >> >> off. >> >> > >> >> > Thanks for clarifying! >> >> > >> >> > Although, can you please elaborate a bit more on the actual use case? >> >> > What are the typical co-processor and what drivers are involved in >> >> > managing it? >> >> >> >> The co-processors using the power domains >> >> exposed by qcom_aoss driver are modem, >> >> audio dsp, compute dsp managed using >> >> qcom_q6v5_mss and qcom_q6v5_pas driver. >> >> >> >> > >> >> > As you may know, runtime PM becomes disabled during system suspend of >> >> > a device. Which means, if the driver tries to power off the >> >> > coprocessor (via calling pm_runtime_put() for example), somewhere in >> >> > the system suspend phase of the corresponding device, its attached PM >> >> > domain stays powered on when managed by genpd. >> >> >> >> The drivers aren't really expected >> >> do anything during suspend/resume >> >> pretty much because the co-processors >> >> enter low-power modes independent to >> >> that of the application processor. On >> >> co-processor crash the remoteproc core >> >> does a pm_stay_awake followed by a >> >> pm_relax after crash recovery. >> > >> > Okay, thanks again for clarifying. You have convinced me about the >> > need for a new flag to cope with these use cases. >> > >> > Would you mind updating the commit message with some of the >> > information you just provided? >> > >> > Additionally, to make it clear that the flag should be used to keep >> > the PM domain powered on during system suspend, but only if it's >> > already powered on - please rename the flag to GENPD_FLAG_NO_SUSPEND, >> > and update the corresponding description of it in the header file. >> >> Thanks, naming it ^^ makes more sense :) >> >> https://lore.kernel.org/lkml/340a7aafcf0301ff3158a4e211992041@codeaurora.org/ >> >> Also we wouldn't want to power on >> runtime suspended power domains with >> the NO_SUSPEND flag set, on resume as >> explained ^^. Do you agree with that >> as well? > > Actually no. > > Instead, I think that deserves a separate flag, as it may very well > turn out that resuming can be skipped for other cases than > "NO_SUSPEND". > > Therefore, please add a GENPD_FLAG_NO_RESUME for this. Thanks I'll do that in v2 > > Kind regards > Uffe -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.