Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp405206rdb; Tue, 19 Dec 2023 23:56:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeEuyAuGnjyzpRxNfMlbpvoNDRIcjz8fufqTbuvwM0TaTLr/EnBxfe+hRUz4w2Cpd2xrfn X-Received: by 2002:a05:6358:78e:b0:170:9dd0:760e with SMTP id n14-20020a056358078e00b001709dd0760emr20076187rwj.63.1703058985210; Tue, 19 Dec 2023 23:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703058985; cv=none; d=google.com; s=arc-20160816; b=BjToxlbJjB/TWWyh7pto5cJazQevV626J+P75+UsiJgsSmKwiCkQQqb2diy1EpZfPj N71i1+jonXHB2wIvUi8gvG6gon8MsS8IVi26/o0yLIV2tNcACLriuGhAnbSNlURij0wE QlH2T1TOerukWKQClSzzkl6+GvqzouXAIy/6+vETLqAgZ8eThus1mei8aOsH7jkdbFMp pkJRJKnp2HD/AvWNowLecYvJZWpt2GoCvmcBcMnuE6hZMBI6LGPf51gBCu0/pokEWTY6 y2YJsNNhUcG4QkCZlHVFI0B/NZX+mbI2aEu9+y/u0O/+SnNXMdCEMh5eBtUR9vA3pByW ZMKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=tDvF00Q3X0BhUzhZydb48NP6E8gilTjOTOUtKNWPqOE=; fh=J/p+DtVyEoVa934YZKq/hgBNWRpdBKZo2Ma3QDpRqus=; b=o9F5J9b4Uqe848I8ERKhTARBPQGx/IfGUXCXH/t1LOy3zspbYBK0UlDpuQRrhg2npi jYmAg/kq8WKiEJSoVSykd8GIE+GNKUDofORsOZTsEBXJzQk9GC3pIoRM/E50MoaWeBuU JzkwnjHC0Naykoun3+KcvSdugOvTL4UJsun3e6GoCPkOHL5RwwuwPyObAyhXwpHwyhOA NldmV4hEONn41kGV8VdI0t0+EIqNGGgWlP/NVCUlYI61c42rV2hLZX42qeUIP0PGSGeo O1OlceeMbvtA5+CfqJSoSm8SlbSum0H3/AkTr0N+FIhhVhWmWCfiG5T1SwDaDEoxNvw3 QRGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6520-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6520-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k9-20020a17090a62c900b0028af3016cc4si2609309pjs.37.2023.12.19.23.56.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 23:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6520-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6520-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6520-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D3B9A285C13 for ; Wed, 20 Dec 2023 07:56:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66867168DF; Wed, 20 Dec 2023 07:56:18 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A4D11C680; Wed, 20 Dec 2023 07:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E9CDF1FB; Tue, 19 Dec 2023 23:56:59 -0800 (PST) Received: from [10.57.82.217] (unknown [10.57.82.217]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D23B13F64C; Tue, 19 Dec 2023 23:56:12 -0800 (PST) Message-ID: <930c762f-518a-420e-8da5-54c5ab1bf578@arm.com> Date: Wed, 20 Dec 2023 07:57:19 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 23/23] Documentation: EM: Update with runtime modification design Content-Language: en-US To: Xuewen Yan Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rafael@kernel.org, dietmar.eggemann@arm.com, rui.zhang@intel.com, amit.kucheria@verdurent.com, amit.kachhap@gmail.com, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, len.brown@intel.com, pavel@ucw.cz, mhiramat@kernel.org, qyousef@layalina.io, wvw@google.com References: <20231129110853.94344-1-lukasz.luba@arm.com> <20231129110853.94344-24-lukasz.luba@arm.com> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/20/23 02:08, Xuewen Yan wrote: > On Tue, Dec 19, 2023 at 5:31 PM Lukasz Luba wrote: >> >> >> >> On 12/19/23 06:22, Xuewen Yan wrote: >>> Hi Lukasz, >>> >>> On Wed, Nov 29, 2023 at 7:11 PM Lukasz Luba wrote: >> >> [snip] >> >>>> + >>>> + -> drivers/soc/example/example_em_mod.c >>>> + >>>> + 01 static void foo_get_new_em(struct device *dev) >>> >>> Because now some drivers use the dev_pm_opp_of_register_em() to >>> register energy model, >>> and maybe we can add a new function to update the energy model using >>> "EM_SET_ACTIVE_POWER_CB(em_cb, cb)" >>> instead of letting users set power again? >>> >> >> There are different usage of this EM feature: >> 1. Adjust power values after boot is finish and e.g. ASV in Exynos >> has adjusted new voltage values in the OPP framework. It's >> due to chip binning. I have described that in conversation >> below patch 22/23. I'm going to send a patch for that >> platform and OPP fwk later as a follow up to this series. > > I understand what you mean, what I mean is that if we can provide an > interface for changing EM of opp fwk, it will be more friendly for > those users who use opp, because then they don't have to calculate the > new EM by themselves, but only need After updating the voltage of opp, > just call this interface directly. It is the plan. Don't worry. I didn't wanted to push this in one big patch set. Exynos driver + the OPP change would do exactly this. The EM functions from drivers/opp/of.c will be re-used for this. It is too big to be made in one step. There is pattern in those more complex changes, like in Arm SCMI fwk to make the improvements gradually. This folds into the same bucket. Although, you are another person asking for similar thing, so I will send a follow-up change using this new EM API - instead of waiting to finish this review. Thanks, Lukasz