Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1038368pxm; Wed, 23 Feb 2022 16:33:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyP4no48/JebyGQmU8kq5dfjrc8KRHJdEDH5M/Ft9in+lU58nv/4sfwSyaoqimgAiLCNIoX X-Received: by 2002:a05:6a00:2296:b0:4e1:3029:ee2 with SMTP id f22-20020a056a00229600b004e130290ee2mr65503pfe.22.1645662794038; Wed, 23 Feb 2022 16:33:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645662794; cv=none; d=google.com; s=arc-20160816; b=UxAX8/lo3R3E646U8xycDRosd6TLn47dDoL5CLjmrkJOxJ/N/QCeoWvKBB+tHTGnlz K4WNAgWzh2xVj7T9ZsUuloK/reV/RU7tunDqtdPeTFHr6/R6EvF763SXO2x1bmTfIpJ1 quPfcKCfGLpxcW8zWExmDe3SOaJrEhEKFAAJVLLqo/UZZcY3AUzUz4G+Bo5N8cWbAQzv Mt+2hFYy0xc28cBPRhdzD/sBvM+ylFz33uNlysgVkwGw/l5xQKou+ePkYyhEFqB0E6I+ SLBrE/JFAl3rbt9TRmheAZ7scyy11HV5Co3TfXlOO4fTecgL1UcOX8aOc9x/5fsUcYSI vuOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=Z3/Dc+xjbt9f1GRh+AtbN1PBEi1Ua7p5CDs0MksQ+1o=; b=F/AE5RsUubDG4t5JflphQ9k3OgNIcA6wXL2010gjOKyRllXgHGAAi9nqn0aqS8vGaq 14de0jTINIE3lJNxwp99JCeL9VMtXWFsT4gLmEVL5xSBCDzjhzjZ18lmBtYTawFOzuXT yditXsHHmLwRgVsPOgfw/3Hmcl4o9FeU2sCblQyfqmhEyxjlUwyHsXcIPXzI/F47qcs6 kjpfURYwvqsgKASqB3kwT3ZtUXuQD/Yaizuf80My91pUmMNukXnlBfnfeZInnEm+349g k9dg4oPNZSYVUxHdTnVHNHmyug1wRxfcpC0W09hNQZoPQehwI+1/0JBsWchoGUBm7vE/ zflw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s7si1078876plk.189.2022.02.23.16.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:33:14 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3A68D7F6E1; Wed, 23 Feb 2022 16:32:16 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239529AbiBWKQt (ORCPT + 99 others); Wed, 23 Feb 2022 05:16:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239519AbiBWKQq (ORCPT ); Wed, 23 Feb 2022 05:16:46 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 988BD8B6E0; Wed, 23 Feb 2022 02:16:19 -0800 (PST) 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 454E31042; Wed, 23 Feb 2022 02:16:19 -0800 (PST) Received: from [10.57.9.184] (unknown [10.57.9.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4F1013F70D; Wed, 23 Feb 2022 02:16:17 -0800 (PST) Message-ID: Date: Wed, 23 Feb 2022 10:16:15 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 0/2] Introduce 'advanced' Energy Model in DT Content-Language: en-US To: Daniel Lezcano Cc: dietmar.eggemann@arm.com, viresh.kumar@linaro.org, rafael@kernel.org, nm@ti.com, sboyd@kernel.org, mka@chromium.org, dianders@chromium.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220222140746.12293-1-lukasz.luba@arm.com> <467a7de4-df84-8e9e-a26a-80449ca55950@linaro.org> From: Lukasz Luba In-Reply-To: <467a7de4-df84-8e9e-a26a-80449ca55950@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, On 2/23/22 09:52, Daniel Lezcano wrote: > > Hi Lukasz, > > why not extend the energy model to any kind of devices? > > The changes are shyly proposing a new entry in the OPP table like that > is the only place where power management can happen. It was Viresh proposal to make it in the OPP v2 table. I've checked the code and this u_watt fits perfectly there. New power value looks natural there. We also have the interconnect info in the opp, so even this kind of extensions are there. It is a clean solution which meats the GPU requirements. > > Is the approach to describe by small pieces here and there, specific > attributes and let the kernel create an energy model from that soap? > > I prefer the RFC approach where the energy model is described clearly > but, IMHO, it should be more abstracted, without reference to frequency > or whatever but index <-> power (t-uple or equation) > > By this way, it could be possible to describe the battery with the > different charges, the LCD bright light, etc ... I can see your need, but I would focus on existing issues and devices. This change was motivated by existing mainline platform which wants to have EM in GPU (Chromebook) from DT. The GPU has OPP table, thus it meets this requirement. The requirements are clear for the GPU (and similar like DSP/ISP/etc which all have OPP table). This is a clean, small step forward with the OPP approach and it doesn't block your future needs and requirements. IMO it's orthogonal, devices which have OPP table naturally might provide power there. Devices which wouldn't have OPP table, but wanted to register EM via DT - it's a different story (not the existing Chromebook's GPU). This future story can be addressed in some next step. We need real devices and examples to figure out the requirements and craft something.