From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6A11C4743E for ; Tue, 8 Jun 2021 12:53:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96B2B611BD for ; Tue, 8 Jun 2021 12:53:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232640AbhFHMzP (ORCPT ); Tue, 8 Jun 2021 08:55:15 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.53]:15956 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232299AbhFHMzO (ORCPT ); Tue, 8 Jun 2021 08:55:14 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623156791; cv=none; d=strato.com; s=strato-dkim-0002; b=iktalfMGhuFVVPNe7abSgfi4HUwMHxxpDQH1UJgQ9DELDCrJg1q9oqCSd9XDuAxR1C a/yhUAK1LXmRCx9iXBH1jG6t6PPVmD89SCbqfbxd3h2E5708hA3P9JEB8a+VjJhoqeEO iLlpLh270aajLKaok0WLaDvUVoFcav37A87WZSXzseYryBaLaQMr7/UkInD0xd67gDtf 1kgZaVrdWhV87M1Xad0j1bNd/OKg6jrrVrbpXtEF1pK31rkEungcXQDnO0xcXYgEDazX nc2K/DiKGKg3GTbzF9IJr3rZ/oy5qo4FejKxFDzt6QA8rYoIb0TUFe4fnF7rGUPNsHP1 pgbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623156791; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=rB+uyQ8t9oJZLhbyMwCpJlNoKpSqnO6KJlB/IeAfyXs=; b=czBP43zxiD1A5Ce+yiwu0AVqYPfGVLfcJcaA2lBhQCEUktHZmjlVYaOTOX5D87BMLS ub+P3u0nIHJqSlU48IPN2+SRYcwMvNnd1PdeiU7QziLZe2GWVN0Wk4Z14fchOHL9vg6H 3D6WC/ywyUrEWW8isvvlwX4z8zGRbFhNJxWKfPtF9jKDMTytEcJXPEZsStxjr9xug76a wItmSNYt4LtUfKYWMTsMVgF0oCc21RLvS7eGMNQg6VN5oQ3GC+jXehRymGxIdeHnxKAi aIxPYWyQcHljZirK0ZTXOG5w4jM2ylksm1dfR8FZKmTd4uZKUxWELeY1iTKpZ+JGlKV3 r8sA== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623156791; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=rB+uyQ8t9oJZLhbyMwCpJlNoKpSqnO6KJlB/IeAfyXs=; b=nlHcBPMtMpUSi4lZpVA2ijF3vPYRH9hHAFeiJcdrtMJSY+Qw4siKU5/MdXUXKM5fsu //+S13URJ8OJ+mAHKVzcaH3Bn1ykyVZ7P943T3Yyh+y7P+CLVQlQCnZfeoT/ff+cS/1j 9hhC5McQoRJmgN6IOy2tYFALrCZ07X7bVQTwP6SK6h3sLL3M9LHbn6FNQuVMT5IcveFB Wt+VV4b2J273qeJYll0v7lJHB5mL3DSq8rhlYFB9ck8AV0W4Jd4VN1wXuU7mQ47a/e34 egZIulhKwxDmcqV55qTUXuajiCVKkIRqoyCdWxUa/ZLdBIFWzTVIKMkL+Dpqx4rlcvHk qfsw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u26zEodhPgRDZ8j7IcbDBg==" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id y01375x58CrBdLb (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 8 Jun 2021 14:53:11 +0200 (CEST) Date: Tue, 8 Jun 2021 14:53:05 +0200 From: Stephan Gerhold To: Ulf Hansson Cc: "Rafael J . Wysocki" , Viresh Kumar , Dmitry Baryshkov , Mark Brown , Linux PM , Dmitry Osipenko , Jonathan Hunter , Thierry Reding , Roja Rani Yarubandi , Bjorn Andersson , Vincent Guittot , Stephen Boyd , Linux Kernel Mailing List , Rajendra Nayak Subject: Re: [PATCH v2 4/4] PM: domains: Drop/restore performance state votes for devices at system PM Message-ID: References: <20210603093438.138705-1-ulf.hansson@linaro.org> <20210603093438.138705-5-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Jun 03, 2021 at 12:20:57PM +0200, Ulf Hansson wrote: > + Mark Brown, Dmitry Baryshkov > > On Thu, 3 Jun 2021 at 11:34, Ulf Hansson wrote: > > > > Recent changes in genpd drops and restore performance state votes for > > devices during runtime PM. > > > > For the similar reasons, but to avoid the same kind of boilerplate code in > > device PM callbacks for system sleep in subsystems/drivers, let's drop and > > restore performance states votes in genpd for the attached devices during > > system sleep. > > > > Signed-off-by: Ulf Hansson > > After a second thought, it looks like we maybe should defer to apply > this final patch of the series. At least until we figured out how to > address the below issue: > > So, I noticed that we have things like "regulator-fixed-domain", that > uses "required-opps" to enable/disable a regulator through the > dev_pm_set_performance_state() interface. Not directly related to your concern, but related to another discussion we had recently: To me, this looks mostly like another solution for voting for performance states without doing full DVFS, also known as assigned-performance-states [1] or required-opps on devices [2]. :) It's just wrapped in a regulator interface here. Actually, if we implement [2], the regulator-fixed-domain should mostly just become some sort of simple wrapper around runtime PM for the regulator device, since the required-opp might be applied automatically then. [1]: https://lore.kernel.org/linux-arm-msm/1622095949-2014-1-git-send-email-rnayak@codeaurora.org/ [2]: https://lore.kernel.org/linux-arm-msm/YLYV3ov%2FiBffZMg4@gerhold.net/ > We likely don't want to drop the performance state internally in genpd > when genpd_suspend_noirq() gets called, for the corresponding struct > device for the regulator. > So your concern is that the performance state is dropped during suspend even though the regulator core thinks the regulator stays enabled? I played with regulator-fixed-domain a bit and I would say this is already broken (unless you rely on one of the side effects I mentioned in [3]). The power domain gets powered off entirely during system suspend, and then the performance state won't have any effect either. I guess we would need some way to say that this device should only be managed through runtime PM and never automatically suspended during system suspend? Stephan [3]: https://lore.kernel.org/linux-pm/YLkOAyydZMnxkEy+@gerhold.net/