lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <573ec775-c1f0-4a09-afe4-83793fb11f3c@arm.com>
Date:   Mon, 27 Nov 2023 10:17:51 +0000
From:   Lukasz Luba <lukasz.luba@....com>
To:     Chen-Yu Tsai <wenst@...omium.org>
Cc:     linux-kernel@...r.kernel.org, linux-rockchip@...ts.infradead.org,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        heiko@...ech.de, conor+dt@...nel.org, daniel.lezcano@...aro.org
Subject: Re: [PATCH] arm64: dts: rockchip: Add dynamic-power-coefficient to
 rk3399 GPU



On 11/27/23 10:02, Chen-Yu Tsai wrote:
> On Mon, Nov 27, 2023 at 4:14 PM Lukasz Luba <lukasz.luba@....com> wrote:
>>
>> 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.
>>
>> Signed-off-by: Lukasz Luba <lukasz.luba@....com>
>> ---
>>   arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> index 9da0b6d77c8d..87cfdf570b19 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> @@ -2113,6 +2113,7 @@ gpu: gpu@...a0000 {
>>                  interrupt-names = "job", "mmu", "gpu";
>>                  clocks = <&cru ACLK_GPU>;
>>                  #cooling-cells = <2>;
>> +               dynamic-power-coefficient = <2640>;
> 
> For reference, in the ChromeOS downstrean v5.10 kernel we have:
> 
> gpu_power_model: power_model {
>          compatible = "arm,mali-simple-power-model";
>          static-coefficient = <411522>;
>          dynamic-coefficient = <977>;
>          ts = <32000 4700 (-80) 2>;
>          thermal-zone = "gpu";
> };
> 
> This is for the Mali kbase.

That's downstream driver for downstream IPA thermal governor, which is
different. As you can see there, there is a split of the total power
to 'static power' and 'dynamic power' and thus those 2 coefficients:
'static-coefficient' and 'dynamic-coefficient'. There is also
polynomial for the exponential curve approximating temperature impact
to the increasing leakage (static power).

This is totally not upstream code and quite complex to derive thus
fly upstream. Therefore, in upstream we have very simple power
model right now, but it will be possible to update it at runtime
when the leakage is increased. I hope the new v5 version that
I'm going to send, will get into mainline soon [1].

Regards,
Lukasz

[1] 
https://lore.kernel.org/lkml/20230925081139.1305766-1-lukasz.luba@arm.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ