Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2912427rdh; Mon, 27 Nov 2023 01:59:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6SCgyOWBGuCcJEIkQtZfwf2d/FMY86WHhWCmVYLohYB0N6eohDum5e78zRQJNu8hI9Xei X-Received: by 2002:a17:90a:1a10:b0:281:35e:82a1 with SMTP id 16-20020a17090a1a1000b00281035e82a1mr8742803pjk.48.1701079174278; Mon, 27 Nov 2023 01:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701079174; cv=none; d=google.com; s=arc-20160816; b=SAJILfOqWlThE6TVrQ3ExXqGI3mRWhL5kFdcx5cdZC0hnMOCYQSUt7VzLFnD1zVd3i 0J9ysKAYWtHePP2zeGJpYYzRcI6KHtzKy+qUixKJTJIS7Zm7D+yXI2/wb3pZVzQnQUEO 3uOr/pCDE3ESl2945nyuZCWIU8gjQ1pLE6I0xQ/rBrhWg/WqtotIaJNC0IHPe7HG/aR+ bvjGF9Lok/zmLboWGmArNTCtS+11d6dqqErusIMSumzvC3nev4GZbwoI4NS7A/FyQ+KO X1YTqKJ+hOx5QWtHRdbEvvXQjidTV6vIkEg7swEO1JY/PwRyTL8t45H/vGRbrZNAHDKl 6rWw== 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=y2+uxpzT4oFtjyGZbAb+odZBAGB4E0qNc4p8kMNaFsg=; fh=XQrJMAtMnc0/tPoTU10kKfqu5goAIkneXhAEqtRq+9M=; b=R++q8LK/n3kL9byCS2a8g3hjj+5UqLsV/d9Z5jZU7JXoYdyu3Azc2CDuzZd4BpHUJ6 mO98cfptE5f+RM4yIyCD3btcabJ03ao3h28+I948qVICI1LSdeHjrqgE/A8AKYboI2e9 OIWep0J756rgflee0anQfLMh5HTjfKL7gIiBDmq0kQO1ua1LisUhXEsTa+A6Ds7PYxJw DfZxvfaYHFKpr+YdDlFaE1rd3oaEzx7FjBYxW2ZqyX6do8JifDU5kH7YnuoRp6N0kKA6 xwh0O/tEbFcu9BAtYHg0HACLrsHS6n3O0Nl8x6Jfe4zAPtivdF4M5mRNAG1HyV2xefLT xJaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id b13-20020a6541cd000000b005b8615b9fe6si9141339pgq.287.2023.11.27.01.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 01:59:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 73814808EF45; Mon, 27 Nov 2023 01:59:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232767AbjK0J7K (ORCPT + 99 others); Mon, 27 Nov 2023 04:59:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230181AbjK0J7K (ORCPT ); Mon, 27 Nov 2023 04:59:10 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 71332E1; Mon, 27 Nov 2023 01:59:16 -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 BE6D42F4; Mon, 27 Nov 2023 02:00:03 -0800 (PST) Received: from [10.57.4.90] (unknown [10.57.4.90]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AE4BE3F73F; Mon, 27 Nov 2023 01:59:14 -0800 (PST) Message-ID: <8aa2592d-5fc7-4ae2-a355-fcf46bb076de@arm.com> Date: Mon, 27 Nov 2023 10:00:15 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] arm64: dts: rockchip: Add dynamic-power-coefficient to rk3399 GPU Content-Language: en-US To: =?UTF-8?Q?Heiko_St=C3=BCbner?= Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, conor+dt@kernel.org, linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org References: <20231127081511.1911706-1-lukasz.luba@arm.com> <14787054.VsHLxoZxqI@diego> From: Lukasz Luba In-Reply-To: <14787054.VsHLxoZxqI@diego> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 27 Nov 2023 01:59:31 -0800 (PST) Hi Heiko, On 11/27/23 09:42, Heiko Stübner wrote: > Hi Lukasz, > > Am Montag, 27. November 2023, 09:15:11 CET schrieb Lukasz Luba: >> Add dynamic-power-coefficient to the GPU node. That will create Energy >> Model for the GPU based on the coefficient and OPP table information. >> It will enable mechanism such as DTMP or IPA to work with the GPU DVFS. >> In similar way the Energy Model for CPUs in rk3399 is created, so both >> are aligned in power scale. The maximum power used from this coefficient >> is 1.5W at 600MHz. > > 2640 is a pretty arbitary value, so it would be really helpful to describe > in the commit message, how you arrived with that specific value. It's in the above patch header. The power at 600MHz is ~1.5Watts, so for max freq and max voltage you get the coefficient. The DT schema describes quite well how the coefficient is calculated. IMO, there is no need to duplicate that description here [1]. Have you checked that documentation? Is there still anything unclear? I might elaborate a bit more why it's important for GPU to take the top OPP for considerations (due to thermal operating mostly on top-half OPPs, but the curve is a bit constraining). Unfortunately, this simple model doesn't allow to reflect the leakage impact over time. It doesn't also address the chip binning lottery. Although, it will be possible in near future to address those [2]. Regards, Lukasz [1] https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml#L94 [2] https://lore.kernel.org/lkml/20230925081139.1305766-1-lukasz.luba@arm.com/