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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00D19EB64DD for ; Tue, 18 Jul 2023 12:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbjGRMtr (ORCPT ); Tue, 18 Jul 2023 08:49:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230386AbjGRMtq (ORCPT ); Tue, 18 Jul 2023 08:49:46 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3B44126 for ; Tue, 18 Jul 2023 05:49:44 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4fb960b7c9dso9288791e87.0 for ; Tue, 18 Jul 2023 05:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689684583; x=1692276583; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Fx88Y8ylLpGMnec9BSD55VgDeuGfnAWt7EEQ/PtHDpc=; b=koqsTf9JZBAUJF7/UVBzKuGMxqH9qIu3JA4uLuPxD87jLK6y30SqI9JH5CUvO96/eA px1f4wC1o8IvE/I7Few5mIzN34j1PCsZo3xIti9KbRzvsephQi37px7sde4+KuZY/+jh dXDdHZ7cl7YiOeL4CZ9G4vFWro9GLDuiaZmzFt2lcjAKlbIoVM5yyHqs1XpfkqijunDl NBlVRAlXaZrbhrQQ9aRNQ5jT70hAiKmr/dKiWEIY0bQmSqP0i3SHGZf3baH+I6vL3L8j hKZcDyYEhZprHVX5Rdd4DFZ/oUjTcmG6kiRu1GtfAtxKhuv9yU+4sMup8lIEAEUx3d2m dFNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689684583; x=1692276583; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fx88Y8ylLpGMnec9BSD55VgDeuGfnAWt7EEQ/PtHDpc=; b=KqCtEE4sb7qe4dAieMjJktkZZfNjbbF3JFyYJO408sPEs2pySC0Crx0HRZhasvuPat FeIGEe0aZXbxXwpFdmIe1Nzw4K3YfEDFlSlysE+cTUO4eceXp4l3G4AuOsl98tgJajcW uD2/+DGWn0xr38RFA25uWG7IlJP93pUFAofphgxK8rJSG65OFt1hOQ7p/2aR/srEdXfV PM4QiOY5l2Go3SD/Or5uBF2XW/GLBXPohWGFP8HuLM3Nvk19WCae0n7YOeZ9V3FEAm6z CZXbwPgd7CfoQus6sWAnFfgFown4tZePxD7qykJKnTFUx9jhT+7ccrVa+bGQsgHpl/EO 2ugA== X-Gm-Message-State: ABy/qLb99obmbNgdozseoVjcOX4HDQYI1wNxkaDQWlGyJE2WklMNMiyQ SjczF3A0fgCm984Pl8rWxbo6LQ== X-Google-Smtp-Source: APBJJlFQjh+0nmNmA5FTBnkDIQZOdmKm8Oi8kw6dVTUbNrpst5WEY+YTzAEUBE4GyrQFJ7Wdjdz1Hw== X-Received: by 2002:ac2:4461:0:b0:4f8:75af:e917 with SMTP id y1-20020ac24461000000b004f875afe917mr9567492lfl.41.1689684583024; Tue, 18 Jul 2023 05:49:43 -0700 (PDT) Received: from [192.168.1.101] (abyj181.neoplus.adsl.tpnet.pl. [83.9.29.181]) by smtp.gmail.com with ESMTPSA id d21-20020ac24c95000000b004db1a7e6decsm420016lfl.205.2023.07.18.05.49.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jul 2023 05:49:42 -0700 (PDT) Message-ID: Date: Tue, 18 Jul 2023 14:49:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 04/15] clk: qcom: gcc-sm6375: Add runtime PM Content-Language: en-US To: Stephan Gerhold , Bjorn Andersson Cc: Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20230717-topic-branch_aon_cleanup-v1-0-27784d27a4f4@linaro.org> <20230717-topic-branch_aon_cleanup-v1-4-27784d27a4f4@linaro.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 18.07.2023 14:07, Stephan Gerhold wrote: > On Mon, Jul 17, 2023 at 09:02:29PM -0700, Bjorn Andersson wrote: >> On Mon, Jul 17, 2023 at 06:26:35PM +0200, Stephan Gerhold wrote: >>> On Mon, Jul 17, 2023 at 05:19:11PM +0200, Konrad Dybcio wrote: >>>> The GCC block on SM6375 is powered by the VDD_CX rail. We need to ensure >>>> that it's enabled to prevent unwanted power collapse. >>>> >>>> Enable runtime PM to keep the power flowing only when necessary. >>>> >>> >>> Are you sure this is necessary? If VDD_CX was really possible to fully >>> "power collapse" then I would expect that you lose all register >>> settings. This is not something we want or can even handle for GCC. >>> You would need to restore all frequency settings, branch bits etc etc. >>> >> >> This differ between platforms, some allow us to completely power down CX >> while keeping registers state using MX, others require that CX stays in >> retention at least. >> >> So, CX isn't the only rail powering GCC. For the most part though, we >> have a relationship between frequencies votes for by clients and the >> corner of CX, and hence I think the current description is ok... >> > > This patch is just about sending enable/disable votes for the power > domains though, based on runtime PM which triggers when all the clocks > are disabled. > > It's unrelated to voting for CX corners required by certain clock > frequencies (we handle those in the OPP tables of the consumers). > And it's also unrelated to ensuring rentention of register contents > since we actually release all votes when the clocks are idle. > > So while adding runtime PM to all the clock drivers sounds nice, I'm > a bit confused what problem we're actually solving with this patch. :) In a very specific and unfortunate situation, there could be no other CX votes, and trying to access (perhaps at least parts of) GCC would result in a failure. Konrad