Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp739029pxb; Wed, 6 Oct 2021 14:27:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBVKjx5Zc0u9J22EzDNDZTRVYdfP57aX/zChFrYE4p3ADI3kqNv3ZGgS8sLxEqU3sXZ/af X-Received: by 2002:aa7:c948:: with SMTP id h8mr825289edt.380.1633555643461; Wed, 06 Oct 2021 14:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633555643; cv=none; d=google.com; s=arc-20160816; b=Ea6LRdZtI19jucQaGJuipyxD3REuNiezY6ZU0IVUzCn2S1oUUA8RlCCG48qHyrLfWj DFeNJFqRjn0aXZ1leLoMpEVJIw2VVyg8tRzGXr4QXo1jIkzTBjoO7wDb82EoZCUNIPdE 1+9U5EkNYwskbpLSYzVaYjzKrz90K8SyFOMAjtz3KX/WDlc2bakkv3P+p2i52UC3rLOm 9u3n3e7gZFyU0hF0JEbhHpH6VXB2c4FGM0pHEuTXs5LV+BD9OPtGur+HYIynH1WalKny +gqzyN2HgWaHrXYIu0851+Ubn77rN7vLdy8v1cBAg3ZUG7YKLV9/Nvfv5oSmLggUP0M9 SJ2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Z+D15vASJYR0SWQDyQP1KR8IKSZuDFJmcBUbxtdKwZQ=; b=prbiLJVBUL+HIkIdYEUj1CpJ2bGScnUYvMpeAFHLGPJsJE28vL+Me57cYsZ8cWNoHA RELbkpJC7PkiquwBd3IJA6TxRhhpOeBb0A1PdYE+a84ATk7cRtTzN+2ks/+ykn30cAzS vuO77qNE5y0NWPgC500D6l8Njn/dVKz1XZWQ8I8FVIPT7kt2hpefv9VFJYOGhSmGjjA6 CGPfFFQzImoB4dubs8gz0cA5wtCUrRuY8EpGan7s7fLm1hswRlFMBvk/1xyBy/RevcpD O+Byvritnx22JPLMV6fiBqKCAvUREZfJ5FfcS4JY662OvV6Jf4whz/eaFTSxIQnu1DXE ktaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AZF3RQpl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne20si2196302ejc.429.2021.10.06.14.26.56; Wed, 06 Oct 2021 14:27:23 -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=pass header.i=@gmail.com header.s=20210112 header.b=AZF3RQpl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239587AbhJFV1C (ORCPT + 99 others); Wed, 6 Oct 2021 17:27:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239683AbhJFV1B (ORCPT ); Wed, 6 Oct 2021 17:27:01 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67CB2C061746; Wed, 6 Oct 2021 14:25:08 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id y23so16238275lfb.0; Wed, 06 Oct 2021 14:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Z+D15vASJYR0SWQDyQP1KR8IKSZuDFJmcBUbxtdKwZQ=; b=AZF3RQplv1wwucr3sX1VkhwqLxjb5jhLmlPTf6BcmzWR9S/ab1/50oKhYytjUxuxjF OHbHbObgbt4KErSP1sBFtIGwDtqomaoinmksPntQwQo7yPKa9M8wW3aTrRkR1ENr9YXH An3NYJ3BFO03YmpjlOAhqA15ukSOSB0TmSxxvb7VM8/kfAy6BCpaA8CZeYQjS7j0xRGz CIwjLR5d3klZfaAeb5Knr5b9YHfwyA4YgK3OqOvAXLc4tncC4f/hvr9mbFYGzpAun4QX mHvtjJ798n0SKwZ8bTfGtw8Fxr4u/DkYaIvvzaIRXqZRO/CW8DDEWuYH/pEiTmGzLMvD XQ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Z+D15vASJYR0SWQDyQP1KR8IKSZuDFJmcBUbxtdKwZQ=; b=eoI47RpotMB6l/W+VEtTxFLDzwNq8P/uyNHr42K7EWPwthQ2NpE0TiyKjLOuD2tdOL J2q1uepIWAJGbJe6HYN9M8eFZjX1C/tKa2nVdpHTM8DgMebknWB6buakbT3m+qyVuPxv eswrlSGQFl27hbpj71JjlaU77vRfc3Wr/VMIXaYYVqnJF5rZfQ6S3E38nLC1rnu5GEtn NQ37OIpuHAwUdGJex7B3oR0AvJ2Elk0I7C7i69DpBcvS2PQ8helKynEzHerebW/TsBV+ Lerp4yqk9J8bMzVytJfch/QBmFtIDnhD2UcYZmpGSDuyMhQQ4FZEh8Ar+S24j4D8y2Bj m3oA== X-Gm-Message-State: AOAM533Zj3tjYEXdAlcccH2fYDykd/DdgveE8NZI0qF4nJX+rGypXegK oOqBuTe8od0SDBdiW6fMAIs= X-Received: by 2002:a2e:1404:: with SMTP id u4mr387417ljd.269.1633555506822; Wed, 06 Oct 2021 14:25:06 -0700 (PDT) Received: from [192.168.2.145] (79-139-163-57.dynamic.spd-mgts.ru. [79.139.163.57]) by smtp.googlemail.com with ESMTPSA id s30sm2577705lfb.90.2021.10.06.14.25.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 14:25:06 -0700 (PDT) Subject: Re: [PATCH v13 06/35] clk: tegra: Support runtime PM and power domain To: Ulf Hansson Cc: Thierry Reding , Jonathan Hunter , Viresh Kumar , Stephen Boyd , Peter De Schrijver , Mikko Perttunen , Peter Chen , Lee Jones , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Nishanth Menon , Adrian Hunter , Michael Turquette , Linux Kernel Mailing List , linux-tegra , Linux PM , Linux USB List , linux-staging@lists.linux.dev, linux-pwm@vger.kernel.org, linux-mmc , dri-devel , DTML , linux-clk , Mark Brown , Vignesh Raghavendra , Richard Weinberger , Miquel Raynal , Lucas Stach , Stefan Agner , Mauro Carvalho Chehab , David Heidelberg References: <20210926224058.1252-1-digetx@gmail.com> <20210926224058.1252-7-digetx@gmail.com> <24101cd6-d3f5-1e74-db39-145ecd30418b@gmail.com> <4bdba8a2-4b9b-ed7d-e6ca-9218d8200a85@gmail.com> From: Dmitry Osipenko Message-ID: <35714b9d-d855-1ad3-241b-f97859f8c97b@gmail.com> Date: Thu, 7 Oct 2021 00:25:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 06.10.2021 15:38, Ulf Hansson пишет: >> I'm also wondering if we could add some 'was_enabled' flag to GENPDs, >> setting it by genpd_suspend_noirq() for the enabled domains, and then >> powering-on GENPDs from genpd_resume_noirq() only if they were in the >> enabled state during genpd_suspend_noirq() time. It actually puzzled me >> for a quite long time why GENPD core enables domains unconditionally >> during early resume. This should solve a part of the problem and it >> makes suspend/resume a bit safer because there is a smaller chance to >> crash hardware during suspend, at least it's easier to debug. > Just because the PM domain was already off at genpd_suspend_noirq(), > doesn't mean that it can stay powered off at genpd_resume_noirq(). At > least as is today. > > The main reason why genpd_resume_noirq() powers on the PM domain, is > because it's not possible for the consumer drivers to rely on runtime > PM to do it (because runtime PM has been disabled by the PM core). At least Tegra doesn't need to have domains force-resumed. This should be a platform-specific behaviour. We may add a new flag for that, I suppose. I'll try to keep this in mind for a future improvement. Thank you for the clarification.