Message ID | 20211126181500.3404129-2-daniel.lezcano@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
On Fri, Nov 26, 2021 at 12:15 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote: > > Add the powerzones description. This first step introduces the big, > the little and the gpu as a powerzone place. > > Cc: Robin Murphy <robin.murphy@arm.com> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> > --- > V1: Initial post > V2: > - Move description in the SoC dtsi specific file > --- > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 25 ++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > index d3cdf6f42a30..3c0dbc0cb2bc 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > @@ -76,6 +76,8 @@ cpu_l0: cpu@0 { > #cooling-cells = <2>; /* min followed by max */ > dynamic-power-coefficient = <100>; > cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; > + #powerzone-cells = <0>; > + powerzone = <&PKG_PZ>; > }; > > cpu_l1: cpu@1 { > @@ -88,6 +90,8 @@ cpu_l1: cpu@1 { > #cooling-cells = <2>; /* min followed by max */ > dynamic-power-coefficient = <100>; > cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; > + #powerzone-cells = <0>; > + powerzone = <&PKG_PZ>; > }; > > cpu_l2: cpu@2 { > @@ -100,6 +104,8 @@ cpu_l2: cpu@2 { > #cooling-cells = <2>; /* min followed by max */ > dynamic-power-coefficient = <100>; > cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; > + #powerzone-cells = <0>; > + powerzone = <&PKG_PZ>; > }; > > cpu_l3: cpu@3 { > @@ -112,6 +118,8 @@ cpu_l3: cpu@3 { > #cooling-cells = <2>; /* min followed by max */ > dynamic-power-coefficient = <100>; > cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; > + #powerzone-cells = <0>; > + powerzone = <&PKG_PZ>; > }; > > cpu_b0: cpu@100 { > @@ -124,6 +132,8 @@ cpu_b0: cpu@100 { > #cooling-cells = <2>; /* min followed by max */ > dynamic-power-coefficient = <436>; > cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; > + #powerzone-cells = <0>; > + powerzone = <&PKG_PZ>; > > thermal-idle { > #cooling-cells = <2>; > @@ -142,6 +152,8 @@ cpu_b1: cpu@101 { > #cooling-cells = <2>; /* min followed by max */ > dynamic-power-coefficient = <436>; > cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; > + #powerzone-cells = <0>; > + powerzone = <&PKG_PZ>; > > thermal-idle { > #cooling-cells = <2>; > @@ -791,6 +803,17 @@ spi5: spi@ff200000 { > status = "disabled"; > }; > > + powerzones { > + > + PKG_PZ: pkg { > + #powerzone-cells = <0>; > + powerzone = <&SOC_PZ>; > + }; > + > + SOC_PZ: soc { > + }; > + }; > + > thermal_zones: thermal-zones { > cpu_thermal: cpu-thermal { > polling-delay-passive = <100>; > @@ -2027,6 +2050,8 @@ gpu: gpu@ff9a0000 { > clocks = <&cru ACLK_GPU>; > #cooling-cells = <2>; > power-domains = <&power RK3399_PD_GPU>; > + #powerzone-cells = <0>; > + powerzone = <&PKG_PZ>; Every CPU and the GPU are in the same powerzone. What is the point? Do you really have to be told that CPUs and GPU are a source of heat and might need to be limited? Rob
Hi Rob, On 07/12/2021 19:41, Rob Herring wrote: [ ... ] >> thermal_zones: thermal-zones { >> cpu_thermal: cpu-thermal { >> polling-delay-passive = <100>; >> @@ -2027,6 +2050,8 @@ gpu: gpu@ff9a0000 { >> clocks = <&cru ACLK_GPU>; >> #cooling-cells = <2>; >> power-domains = <&power RK3399_PD_GPU>; >> + #powerzone-cells = <0>; >> + powerzone = <&PKG_PZ>; > > Every CPU and the GPU are in the same powerzone. What is the point? Do > you really have to be told that CPUs and GPU are a source of heat and > might need to be limited? A powerzone ==> can read power && set power limit Every CPU is a powerzone as well as the GPU. They are all grouped under PKG_PZ. That means we have: pkg |-- cpu0-3 | |-- cpu4-7 | `-- gpu We can read the power consumption of cpu0-3, cpu4-7 or gpu and set their power limit. We can read the power consumption of pkg (which is the sum of the power consumption of cpu0-3, cpu4-7 and gpu) and I can set the power limit which will ensure powerof(cpu0-3 + cpu4-7 + gpu) <= powerof(pkg).
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index d3cdf6f42a30..3c0dbc0cb2bc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -76,6 +76,8 @@ cpu_l0: cpu@0 { #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + #powerzone-cells = <0>; + powerzone = <&PKG_PZ>; }; cpu_l1: cpu@1 { @@ -88,6 +90,8 @@ cpu_l1: cpu@1 { #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + #powerzone-cells = <0>; + powerzone = <&PKG_PZ>; }; cpu_l2: cpu@2 { @@ -100,6 +104,8 @@ cpu_l2: cpu@2 { #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + #powerzone-cells = <0>; + powerzone = <&PKG_PZ>; }; cpu_l3: cpu@3 { @@ -112,6 +118,8 @@ cpu_l3: cpu@3 { #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + #powerzone-cells = <0>; + powerzone = <&PKG_PZ>; }; cpu_b0: cpu@100 { @@ -124,6 +132,8 @@ cpu_b0: cpu@100 { #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <436>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + #powerzone-cells = <0>; + powerzone = <&PKG_PZ>; thermal-idle { #cooling-cells = <2>; @@ -142,6 +152,8 @@ cpu_b1: cpu@101 { #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <436>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + #powerzone-cells = <0>; + powerzone = <&PKG_PZ>; thermal-idle { #cooling-cells = <2>; @@ -791,6 +803,17 @@ spi5: spi@ff200000 { status = "disabled"; }; + powerzones { + + PKG_PZ: pkg { + #powerzone-cells = <0>; + powerzone = <&SOC_PZ>; + }; + + SOC_PZ: soc { + }; + }; + thermal_zones: thermal-zones { cpu_thermal: cpu-thermal { polling-delay-passive = <100>; @@ -2027,6 +2050,8 @@ gpu: gpu@ff9a0000 { clocks = <&cru ACLK_GPU>; #cooling-cells = <2>; power-domains = <&power RK3399_PD_GPU>; + #powerzone-cells = <0>; + powerzone = <&PKG_PZ>; status = "disabled"; };
Add the powerzones description. This first step introduces the big, the little and the gpu as a powerzone place. Cc: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- V1: Initial post V2: - Move description in the SoC dtsi specific file --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+)