Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6072211pxu; Wed, 23 Dec 2020 12:40:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzS/o+WeGmKc4+C7LfKE8vdbsxcYLKZuYCadcG8E40kPxsA+xLzlJIz1J3HG+kuWj0WYR7 X-Received: by 2002:a50:fd18:: with SMTP id i24mr26682200eds.146.1608756000262; Wed, 23 Dec 2020 12:40:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608756000; cv=none; d=google.com; s=arc-20160816; b=Pvrhpxt9hK64cQDTCyqZsGG4HwPKzxYlFRAFvhFRN5JZ+FEaQY9bIdxDm5ZEBjXmEX ODnZGBds9tKngaUgDaul1QSLvUs8tH1stNBfgjhdjU/l382b6ByiUMEx+AXt8KYZXTjV U123qQVU4916qpE2wXGMGZRKKW4dqTO0LdRXJrEPVwg5+J92UoE2f27V748xM7V7pGwJ 4Z/6HfuTGnlqkKc/WlLokn5xNXhLLRXBCrJPbAcY7kcXoAJGUegvglxUCH0qNc4HF4cx xyGeNxkXU8xMwMlwx/R17P3S0hnF5FBpiUwwex60LTzjEY6DsIf8RH+sdsvBIcPwwM1M cvvQ== 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=3ureyQ26WVdvpPiApVvGnYNle5Fa1VHsYVcg9Aec3Z4=; b=pi5/dIn9tzHVwyj6brVLiH3G30G4OaBdWAcM+Jat2gf7SrJIJKt3+opXA5n9THu7fU gPID2MmW7cUXC3PJuaZ+l3ehW9WqKLLxx39Yc+8/uqWnUcBbwjOYHp7yKS+9U0VMuG2s 8w/H6/jLsQg3xmVQtcBKs6+Ay8nfA8q2lovMugQL+vvh0CXeziqO7vtEwWFIjJD3yj8R 4ueq4PEWsbKchoY3iPJqVAuFWweTUlCUh6PZ/6SC0ecDreh//QFzD8HTn+J6p+ZxFK3H JFxuGxVna+DO0K6n6cNwv8NR1HkuzIhTQ3Xe1uv2kO0KAvAYu1NLZJ6f1pRsWMBv1EsW Wu6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JB7ZNM87; 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 m11si14025156edr.583.2020.12.23.12.39.37; Wed, 23 Dec 2020 12:40:00 -0800 (PST) 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=20161025 header.b=JB7ZNM87; 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 S1729166AbgLWUic (ORCPT + 99 others); Wed, 23 Dec 2020 15:38:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727147AbgLWUib (ORCPT ); Wed, 23 Dec 2020 15:38:31 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A011BC06179C; Wed, 23 Dec 2020 12:37:50 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id h205so308521lfd.5; Wed, 23 Dec 2020 12:37:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3ureyQ26WVdvpPiApVvGnYNle5Fa1VHsYVcg9Aec3Z4=; b=JB7ZNM87FEjcnjJQONVUuTF17BvJ9V9ZS3hebD+x6uzZg2DGPHE7Lj1X+o+J9ISuus 85ihjaar8Lr4oCD3QODU4FGkYnl2eCgmVKKIopMmCAmQ/KoYdSiq45M2PLliJt5mggct kbQvz4I/RnBpUtpDfvzstCJx9yCv5A+xF1dc3waB/YCRipctvTjPnf7xPX8lKAn0lIyg /ebkOqGUMAUeBqGUgJZBD1K+4lyYODAmeakH/EFLCs6V/OvqtWh98BegqF1PG/j41Vcv CBmasECEhUJ0viZjm5sowMCRQ1vgelVHsqCnS+LtFcP0F8Jn0Z7f5agO/J+nwc1xMDWE EGHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=3ureyQ26WVdvpPiApVvGnYNle5Fa1VHsYVcg9Aec3Z4=; b=YvyV4MLqen4yPJvttMSNZ4CIILgbGNPwi0aiQutrAYh/CKp6sbmbtfMhFFi5MhF8iH 0FQkeX1y50vFgObCDUO5a/5oVhr+n3fHP/Hl+qxp09rvlrKc2H1b2GJ+8c8mKjb62w+S b5tJaE3HKv+pzmCsNvlWG3sPmT9vaBJK82Qtx8w8GBjW32wwODy3m7cFdWEe03lVa4un J4W20f/3A2FlXkzALH8r9Q0vtyRVVB4F0Sh1OgeJegvUdrZZ85FKyBVtfXcgJnpW+rQp c+2DCnjt99Ow2TTIn0Vn0KWemE9oOILlv2gHk2R+Cvk+mub45fRDdrvCdA3dGW+zrRiO X9uw== X-Gm-Message-State: AOAM532nEetbGsagc0aUs1zi9nZuWbfrCx0NoDmnvKUyzZcaSjMRqnsw nmI6l83OXEz1dwW9C7cywZeC0NYKvCY= X-Received: by 2002:a2e:9f01:: with SMTP id u1mr12029965ljk.386.1608755869072; Wed, 23 Dec 2020 12:37:49 -0800 (PST) Received: from [192.168.2.145] (109-252-192-57.dynamic.spd-mgts.ru. [109.252.192.57]) by smtp.googlemail.com with ESMTPSA id z14sm3349336lfd.283.2020.12.23.12.37.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Dec 2020 12:37:48 -0800 (PST) Subject: Re: [PATCH v2 11/48] opp: Add dev_pm_opp_find_level_ceil() To: Viresh Kumar Cc: Thierry Reding , Jonathan Hunter , Mark Brown , Liam Girdwood , Ulf Hansson , Mauro Carvalho Chehab , Rob Herring , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski , "Rafael J. Wysocki" , Kevin Hilman , Peter De Schrijver , Viresh Kumar , Stephen Boyd , Michael Turquette , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org References: <20201217180638.22748-1-digetx@gmail.com> <20201217180638.22748-12-digetx@gmail.com> <20201222064253.x7vsurh7q5k7qzb5@vireshk-i7> <20201223041931.klnppy4fu3sdgtsz@vireshk-i7> From: Dmitry Osipenko Message-ID: Date: Wed, 23 Dec 2020 23:37:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.2 MIME-Version: 1.0 In-Reply-To: <20201223041931.klnppy4fu3sdgtsz@vireshk-i7> 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 23.12.2020 07:19, Viresh Kumar пишет: > On 22-12-20, 22:15, Dmitry Osipenko wrote: >> 22.12.2020 09:42, Viresh Kumar пишет: >>> On 17-12-20, 21:06, Dmitry Osipenko wrote: >>>> Add a ceil version of the dev_pm_opp_find_level(). It's handy to have if >>>> levels don't start from 0 in OPP table and zero usually means a minimal >>>> level. >>>> >>>> Signed-off-by: Dmitry Osipenko >>> >>> Why doesn't the exact version work for you here ? >>> >> >> The exact version won't find OPP for level=0 if levels don't start with >> 0, where 0 means that minimal level is desired. > > Right, but why do you need to send 0 for your platform ? > To put power domain into the lowest performance state when device is idling. https://elixir.bootlin.com/linux/v5.10-rc2/source/drivers/opp/core.c#L897 https://elixir.bootlin.com/linux/v5.10-rc2/source/drivers/opp/core.c#L785 Also please see patch 32, tegra_clock_runtime_suspend().