Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751414AbdGQUHh (ORCPT ); Mon, 17 Jul 2017 16:07:37 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:34388 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbdGQUHf (ORCPT ); Mon, 17 Jul 2017 16:07:35 -0400 Date: Mon, 17 Jul 2017 15:07:33 -0500 From: Rob Herring To: Caesar Wang Cc: Heiko Stuebner , linux-rockchip@lists.infradead.org, rocky.hao@rock-chips.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Mark Rutland Subject: Re: [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI Message-ID: <20170717200733.nax6jfbvs3rjd7t4@rob-hp-laptop> References: <1500279271-15249-1-git-send-email-wxt@rock-chips.com> <1500279271-15249-3-git-send-email-wxt@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500279271-15249-3-git-send-email-wxt@rock-chips.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2091 Lines: 45 On Mon, Jul 17, 2017 at 04:14:28PM +0800, Caesar Wang wrote: > This patch adds the MALI's power-model to set the IPA model to be used > for power management. What's IPA? India Pale Ale or Intermediate Physical Address? > > Signed-off-by: Caesar Wang > --- > > Changes in v2: None > > Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > index a461e47..b616e6b 100644 > --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > @@ -37,6 +37,18 @@ Optional properties: > - operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt > for details. > > +- power_model : Sets power model parameters. Note that this model was designed for the Juno > + platform, and may not be suitable for other platforms. A structure containing : > + - compatible: Should be arm,mali-simple-power-model > + - dynamic-coefficient: Coefficient, in pW/(Hz V^2), which is multiplied > + by v^2*f to calculate the dynamic power consumption. > + - static-coefficient: Coefficient, in uW/V^3, which is multiplied by > + v^3 to calculate the static power consumption. > + - ts: An array containing coefficients for the temperature scaling > + factor. This is used to scale the static power by a factor of > + tsf/1000000, where tsf = ts[3]*T^3 + ts[2]*T^2 + ts[1]*T + ts[0], > + and T = temperature in degrees. > + - thermal-zone: A string identifying the thermal zone used for the GPU This can all easily be implied by the compatible string. I'm not inclined to accept something Mali specific here. This looks *very* precise, but I'd be surprised if these values are any more than magic values (at least the dynamic coef) adjusted until the desired power/performance requirements are achieved. To put it another way, why don't we have similar values for CPUs? Rob