linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
@ 2019-06-04 16:57 Daniel Lezcano
  2019-06-04 16:57 ` [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960 Daniel Lezcano
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-04 16:57 UTC (permalink / raw)
  To: heiko
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	edubezval, Enric Balletbo i Serra, Rob Herring, Klaus Goger,
	manivannan.sadhasivam, Matthias Brugger, Philipp Tomsich,
	moderated list:ARM/Rockchip SoC support, Christoph Muellner

Currently the common thermal zones definitions for the rk3399 assumes
multiple thermal zones are supported by the governors. This is not the
case and each thermal zone has its own governor instance acting
individually without collaboration with other governors.

As the cooling device for the CPU and the GPU thermal zones is the
same, each governors take different decisions for the same cooling
device leading to conflicting instructions and an erratic behavior.

As the cooling-maps is about to become an optional property, let's
remove the cpu cooling device map from the GPU thermal zone.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 196ac9b78076..e1357e0f60f7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -821,15 +821,6 @@
 					type = "critical";
 				};
 			};
-
-			cooling-maps {
-				map0 {
-					trip = <&gpu_alert0>;
-					cooling-device =
-						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-				};
-			};
 		};
 	};
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960
  2019-06-04 16:57 [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
@ 2019-06-04 16:57 ` Daniel Lezcano
  2019-06-07 22:18   ` Linus Walleij
  2019-06-12 14:55 ` [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-04 16:57 UTC (permalink / raw)
  To: heiko
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linus Walleij, linux-kernel, edubezval,
	open list:ARM/Rockchip SoC support, Rob Herring,
	manivannan.sadhasivam, moderated list:ARM/Rockchip SoC support

Currently the default thermal values for the rk3399-rock960 board is
inherited from the generic definition in rk3399.dtsi.

In order to ensure the rock960 has more room for througput before
being capped by the thermal framework and is correctly supported by
the IPA governor, let's define the power values and the right trip
points for better performances:

 - sustainable power is tested to be 1550mW

 - increase the first mitigation point to 75°C in order to get better
   performances

 - the first trip point is 65°C in order to let the IPA to collect
   enough data for the PID regulation when it reaches 75°C

 - restrict the cooling device to the big CPUs as the little CPUs
   contribution to the heating effect can be considered negligible

The intelligent power allocator PID coefficient to be set in sysfs
are:

    k_d: 0
    k_po: 79
    k_i: 10
    k_pu: 50

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 .../boot/dts/rockchip/rk3399-rock960.dts      | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
index 12285c51cceb..701d5b5fad46 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
@@ -114,6 +114,45 @@
 	};
 };
 
+&thermal_zones {
+	cpu_thermal: cpu {
+		polling-delay-passive = <100>;
+		polling-delay = <1000>;
+		thermal-sensors = <&tsadc 0>;
+		sustainable-power = <1550>;
+
+		trips {
+			cpu_alert0: cpu_alert0 {
+				    temperature = <65000>;
+				    hysteresis = <2000>;
+				    type = "passive";
+			};
+
+			cpu_alert1: cpu_alert1 {
+				    temperature = <75000>;
+				    hysteresis = <2000>;
+				    type = "passive";
+			};
+
+			cpu_crit: cpu_crit {
+				  temperature = <95000>;
+				  hysteresis = <2000>;
+				  type = "critical";
+			};
+		};
+
+		cooling-maps {
+			     map0 {
+
+			     trip = <&cpu_alert1>;
+			     cooling-device =
+					<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+			};
+		};
+	};
+};
+
 &usbdrd_dwc3_0 {
 	dr_mode = "otg";
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960
  2019-06-04 16:57 ` [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960 Daniel Lezcano
@ 2019-06-07 22:18   ` Linus Walleij
  2019-06-08 22:05     ` Daniel Lezcano
  0 siblings, 1 reply; 14+ messages in thread
From: Linus Walleij @ 2019-06-07 22:18 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Heiko Stübner, linux-kernel, Eduardo Valentin,
	open list:ARM/Rockchip SoC support, Rob Herring,
	Manivannan Sadhasivam, moderated list:ARM/Rockchip SoC support

On Tue, Jun 4, 2019 at 6:58 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote:

> The intelligent power allocator PID coefficient to be set in sysfs
> are:
>
>     k_d: 0
>     k_po: 79
>     k_i: 10
>     k_pu: 50

With all the other interesting parametrization in the device tree
I kind of wonder why the PID regulator constants defaults are
not set up from device tree?

Any specific reason?

To me it seems like the kind of stuff userpace will invariably just
get wrong or forget about (somebody just runs a different
distribution without the extra magic to set sysfs right) unless
we supply good defaults.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960
  2019-06-07 22:18   ` Linus Walleij
@ 2019-06-08 22:05     ` Daniel Lezcano
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-08 22:05 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Heiko Stübner, linux-kernel, Eduardo Valentin,
	open list:ARM/Rockchip SoC support, Rob Herring,
	Manivannan Sadhasivam, moderated list:ARM/Rockchip SoC support

On 08/06/2019 00:18, Linus Walleij wrote:
> On Tue, Jun 4, 2019 at 6:58 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> 
>> The intelligent power allocator PID coefficient to be set in sysfs
>> are:
>>
>>     k_d: 0
>>     k_po: 79
>>     k_i: 10
>>     k_pu: 50
> 
> With all the other interesting parametrization in the device tree
> I kind of wonder why the PID regulator constants defaults are
> not set up from device tree?
> 
> Any specific reason?

None I'm aware of. I guess these constants are considered as tweak
values and not hardware related.

> To me it seems like the kind of stuff userpace will invariably just
> get wrong or forget about (somebody just runs a different
> distribution without the extra magic to set sysfs right) unless
> we supply good defaults.

I agree.

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-04 16:57 [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
  2019-06-04 16:57 ` [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960 Daniel Lezcano
@ 2019-06-12 14:55 ` Daniel Lezcano
  2019-06-14  9:35 ` Heiko Stuebner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-12 14:55 UTC (permalink / raw)
  To: heiko
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	edubezval, Enric Balletbo i Serra, Rob Herring, Klaus Goger,
	manivannan.sadhasivam, Matthias Brugger, Philipp Tomsich,
	moderated list:ARM/Rockchip SoC support, Christoph Muellner


Hi all,

is there any comment on these two patches?


On 04/06/2019 18:57, Daniel Lezcano wrote:
> Currently the common thermal zones definitions for the rk3399 assumes
> multiple thermal zones are supported by the governors. This is not the
> case and each thermal zone has its own governor instance acting
> individually without collaboration with other governors.
> 
> As the cooling device for the CPU and the GPU thermal zones is the
> same, each governors take different decisions for the same cooling
> device leading to conflicting instructions and an erratic behavior.
> 
> As the cooling-maps is about to become an optional property, let's
> remove the cpu cooling device map from the GPU thermal zone.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 196ac9b78076..e1357e0f60f7 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -821,15 +821,6 @@
>  					type = "critical";
>  				};
>  			};
> -
> -			cooling-maps {
> -				map0 {
> -					trip = <&gpu_alert0>;
> -					cooling-device =
> -						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> -						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> -				};
> -			};
>  		};
>  	};
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-04 16:57 [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
  2019-06-04 16:57 ` [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960 Daniel Lezcano
  2019-06-12 14:55 ` [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
@ 2019-06-14  9:35 ` Heiko Stuebner
  2019-06-14 10:09   ` Robin Murphy
  2019-06-14 13:03   ` Daniel Lezcano
  2019-06-24  7:31 ` Daniel Lezcano
  2019-06-26 22:26 ` Heiko Stuebner
  4 siblings, 2 replies; 14+ messages in thread
From: Heiko Stuebner @ 2019-06-14  9:35 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	dianders, edubezval, Enric Balletbo i Serra, Rob Herring,
	Klaus Goger, manivannan.sadhasivam, Matthias Brugger,
	Philipp Tomsich, robin.murphy,
	moderated list:ARM/Rockchip SoC support, Christoph Muellner

Hi Daniel,

Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
> Currently the common thermal zones definitions for the rk3399 assumes
> multiple thermal zones are supported by the governors. This is not the
> case and each thermal zone has its own governor instance acting
> individually without collaboration with other governors.
> 
> As the cooling device for the CPU and the GPU thermal zones is the
> same, each governors take different decisions for the same cooling
> device leading to conflicting instructions and an erratic behavior.
> 
> As the cooling-maps is about to become an optional property, let's
> remove the cpu cooling device map from the GPU thermal zone.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 196ac9b78076..e1357e0f60f7 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -821,15 +821,6 @@
>  					type = "critical";
>  				};
>  			};
> -
> -			cooling-maps {
> -				map0 {
> -					trip = <&gpu_alert0>;
> -					cooling-device =
> -						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> -						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> -				};
> -			};
>  		};
>  	};

my knowledge of the thermal framework is not that big, but what about the
rk3399-devices which further detail the cooling-maps like rk3399-gru-kevin
and the rk3399-nanopc-t4 with its fan-handling in the cooling-maps?


Heiko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-14  9:35 ` Heiko Stuebner
@ 2019-06-14 10:09   ` Robin Murphy
  2019-06-14 13:03   ` Daniel Lezcano
  1 sibling, 0 replies; 14+ messages in thread
From: Robin Murphy @ 2019-06-14 10:09 UTC (permalink / raw)
  To: Heiko Stuebner, Daniel Lezcano
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	dianders, edubezval, Enric Balletbo i Serra, Rob Herring,
	Klaus Goger, manivannan.sadhasivam, Matthias Brugger,
	Philipp Tomsich, moderated list:ARM/Rockchip SoC support,
	Christoph Muellner

On 14/06/2019 10:35, Heiko Stuebner wrote:
> Hi Daniel,
> 
> Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
>> Currently the common thermal zones definitions for the rk3399 assumes
>> multiple thermal zones are supported by the governors. This is not the
>> case and each thermal zone has its own governor instance acting
>> individually without collaboration with other governors.
>>
>> As the cooling device for the CPU and the GPU thermal zones is the
>> same, each governors take different decisions for the same cooling
>> device leading to conflicting instructions and an erratic behavior.
>>
>> As the cooling-maps is about to become an optional property, let's
>> remove the cpu cooling device map from the GPU thermal zone.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>   arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>>   1 file changed, 9 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> index 196ac9b78076..e1357e0f60f7 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> @@ -821,15 +821,6 @@
>>   					type = "critical";
>>   				};
>>   			};
>> -
>> -			cooling-maps {
>> -				map0 {
>> -					trip = <&gpu_alert0>;
>> -					cooling-device =
>> -						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>> -						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>> -				};
>> -			};
>>   		};
>>   	};
> 
> my knowledge of the thermal framework is not that big, but what about the
> rk3399-devices which further detail the cooling-maps like rk3399-gru-kevin
> and the rk3399-nanopc-t4 with its fan-handling in the cooling-maps?

FWIW, my knowledge of thermal is probably even less :)

For NanoPC-T4 I think I more or less just took Odroid-XU3/4 as the best 
pwm-fan example and adapted that into the existing RK3399 zones in the 
manner which seemed most logical to my interpretation - if what was 
there wasn't right to begin with, then I may well have done that wrong too.

Robin.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-14  9:35 ` Heiko Stuebner
  2019-06-14 10:09   ` Robin Murphy
@ 2019-06-14 13:03   ` Daniel Lezcano
  2019-06-14 14:02     ` Robin Murphy
  1 sibling, 1 reply; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-14 13:03 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	dianders, edubezval, Enric Balletbo i Serra, Rob Herring,
	Klaus Goger, manivannan.sadhasivam, Matthias Brugger,
	Philipp Tomsich, robin.murphy,
	moderated list:ARM/Rockchip SoC support, Christoph Muellner

On 14/06/2019 11:35, Heiko Stuebner wrote:
> Hi Daniel,
> 
> Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
>> Currently the common thermal zones definitions for the rk3399 assumes
>> multiple thermal zones are supported by the governors. This is not the
>> case and each thermal zone has its own governor instance acting
>> individually without collaboration with other governors.
>>
>> As the cooling device for the CPU and the GPU thermal zones is the
>> same, each governors take different decisions for the same cooling
>> device leading to conflicting instructions and an erratic behavior.
>>
>> As the cooling-maps is about to become an optional property, let's
>> remove the cpu cooling device map from the GPU thermal zone.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>>  1 file changed, 9 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> index 196ac9b78076..e1357e0f60f7 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> @@ -821,15 +821,6 @@
>>  					type = "critical";
>>  				};
>>  			};
>> -
>> -			cooling-maps {
>> -				map0 {
>> -					trip = <&gpu_alert0>;
>> -					cooling-device =
>> -						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>> -						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>> -				};
>> -			};
>>  		};
>>  	};
> 
> my knowledge of the thermal framework is not that big, but what about the
> rk3399-devices which further detail the cooling-maps like rk3399-gru-kevin
> and the rk3399-nanopc-t4 with its fan-handling in the cooling-maps?

The rk3399-gru-kevin is correct.

The rk3399-nanopc-t4 is not correct because the cpu and the gpu are
sharing the same cooling device (the fan). There are different
configurations:

1. The cpu cooling device for the CPU and the fan for the GPU

2. Different trip points on the CPU thermal zone, eg. one to for the CPU
cooling device and another one for the fan.

There are some variant for the above. If this board is not on battery,
you may want to give priority to the throughput, so activate the fan
first and then cool down the CPU. Or if you are on battery, you may want
to invert the trip points.

In any case, it is not possible to share the same cooling device for
different thermal zones.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-14 13:03   ` Daniel Lezcano
@ 2019-06-14 14:02     ` Robin Murphy
  2019-06-14 14:30       ` Daniel Lezcano
  0 siblings, 1 reply; 14+ messages in thread
From: Robin Murphy @ 2019-06-14 14:02 UTC (permalink / raw)
  To: Daniel Lezcano, Heiko Stuebner
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	dianders, edubezval, Enric Balletbo i Serra, Rob Herring,
	Klaus Goger, manivannan.sadhasivam, Matthias Brugger,
	Philipp Tomsich, moderated list:ARM/Rockchip SoC support,
	Christoph Muellner

On 14/06/2019 14:03, Daniel Lezcano wrote:
> On 14/06/2019 11:35, Heiko Stuebner wrote:
>> Hi Daniel,
>>
>> Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
>>> Currently the common thermal zones definitions for the rk3399 assumes
>>> multiple thermal zones are supported by the governors. This is not the
>>> case and each thermal zone has its own governor instance acting
>>> individually without collaboration with other governors.
>>>
>>> As the cooling device for the CPU and the GPU thermal zones is the
>>> same, each governors take different decisions for the same cooling
>>> device leading to conflicting instructions and an erratic behavior.
>>>
>>> As the cooling-maps is about to become an optional property, let's
>>> remove the cpu cooling device map from the GPU thermal zone.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> ---
>>>   arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>>>   1 file changed, 9 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>> index 196ac9b78076..e1357e0f60f7 100644
>>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>> @@ -821,15 +821,6 @@
>>>   					type = "critical";
>>>   				};
>>>   			};
>>> -
>>> -			cooling-maps {
>>> -				map0 {
>>> -					trip = <&gpu_alert0>;
>>> -					cooling-device =
>>> -						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> -						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>>> -				};
>>> -			};
>>>   		};
>>>   	};
>>
>> my knowledge of the thermal framework is not that big, but what about the
>> rk3399-devices which further detail the cooling-maps like rk3399-gru-kevin
>> and the rk3399-nanopc-t4 with its fan-handling in the cooling-maps?
> 
> The rk3399-gru-kevin is correct.
> 
> The rk3399-nanopc-t4 is not correct because the cpu and the gpu are
> sharing the same cooling device (the fan). There are different
> configurations:
> 
> 1. The cpu cooling device for the CPU and the fan for the GPU
> 
> 2. Different trip points on the CPU thermal zone, eg. one to for the CPU
> cooling device and another one for the fan.
> 
> There are some variant for the above. If this board is not on battery,
> you may want to give priority to the throughput, so activate the fan
> first and then cool down the CPU. Or if you are on battery, you may want
> to invert the trip points.
> 
> In any case, it is not possible to share the same cooling device for
> different thermal zones.

OK, thanks for the clarification. I'll get my board set up again to 
figure out the best fix for rk3399-nanopc-t4 (FWIW most users are 
probably just using passive cooling or a plain DC fan anyway). You might 
want to raise this issue with the maintainers of 
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi, since the 
everything-shared-by-everything approach in there was what I used as a 
reference.

Robin.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-14 14:02     ` Robin Murphy
@ 2019-06-14 14:30       ` Daniel Lezcano
  2019-06-16  9:31         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-14 14:30 UTC (permalink / raw)
  To: Robin Murphy, Heiko Stuebner
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Krzysztof Kozlowski, Emil Renner Berthing,
	open list:ARM/Rockchip SoC support, Tony Xie, Viresh Kumar,
	Randy Li, linux-kernel, Vicente Bergas, dianders, edubezval,
	Enric Balletbo i Serra, Rob Herring, Klaus Goger, Kukjin Kim,
	manivannan.sadhasivam, Matthias Brugger, Philipp Tomsich,
	moderated list:ARM/Rockchip SoC support, Christoph Muellner

On 14/06/2019 16:02, Robin Murphy wrote:
> On 14/06/2019 14:03, Daniel Lezcano wrote:
>> On 14/06/2019 11:35, Heiko Stuebner wrote:
>>> Hi Daniel,
>>>
>>> Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
>>>> Currently the common thermal zones definitions for the rk3399 assumes
>>>> multiple thermal zones are supported by the governors. This is not the
>>>> case and each thermal zone has its own governor instance acting
>>>> individually without collaboration with other governors.
>>>>
>>>> As the cooling device for the CPU and the GPU thermal zones is the
>>>> same, each governors take different decisions for the same cooling
>>>> device leading to conflicting instructions and an erratic behavior.
>>>>
>>>> As the cooling-maps is about to become an optional property, let's
>>>> remove the cpu cooling device map from the GPU thermal zone.
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>>>   arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>>>>   1 file changed, 9 deletions(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>> b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>> index 196ac9b78076..e1357e0f60f7 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>> @@ -821,15 +821,6 @@
>>>>                       type = "critical";
>>>>                   };
>>>>               };
>>>> -
>>>> -            cooling-maps {
>>>> -                map0 {
>>>> -                    trip = <&gpu_alert0>;
>>>> -                    cooling-device =
>>>> -                        <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>>> -                        <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>>>> -                };
>>>> -            };
>>>>           };
>>>>       };
>>>
>>> my knowledge of the thermal framework is not that big, but what about
>>> the
>>> rk3399-devices which further detail the cooling-maps like
>>> rk3399-gru-kevin
>>> and the rk3399-nanopc-t4 with its fan-handling in the cooling-maps?
>>
>> The rk3399-gru-kevin is correct.
>>
>> The rk3399-nanopc-t4 is not correct because the cpu and the gpu are
>> sharing the same cooling device (the fan). There are different
>> configurations:
>>
>> 1. The cpu cooling device for the CPU and the fan for the GPU
>>
>> 2. Different trip points on the CPU thermal zone, eg. one to for the CPU
>> cooling device and another one for the fan.
>>
>> There are some variant for the above. If this board is not on battery,
>> you may want to give priority to the throughput, so activate the fan
>> first and then cool down the CPU. Or if you are on battery, you may want
>> to invert the trip points.
>>
>> In any case, it is not possible to share the same cooling device for
>> different thermal zones.
> 
> OK, thanks for the clarification. I'll get my board set up again to
> figure out the best fix for rk3399-nanopc-t4 (FWIW most users are
> probably just using passive cooling or a plain DC fan anyway). You might
> want to raise this issue with the maintainers of
> arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi, since the
> everything-shared-by-everything approach in there was what I used as a
> reference.

Cc'ed: Kukjin Kim and Krzysztof Kozlowski

Easy :)


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-14 14:30       ` Daniel Lezcano
@ 2019-06-16  9:31         ` Krzysztof Kozlowski
  2019-06-16 17:47           ` Daniel Lezcano
  0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2019-06-16  9:31 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mark Rutland, Emil Renner Berthing, Viresh Kumar, dianders,
	Tony Xie, Klaus Goger, manivannan.sadhasivam, Philipp Tomsich,
	Heiko Stuebner, open list:ARM/Rockchip SoC support, Kukjin Kim,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Randy Li, Vicente Bergas, edubezval, Rob Herring,
	Matthias Brugger, moderated list:ARM/Rockchip SoC support,
	linux-kernel, Enric Balletbo i Serra, Robin Murphy,
	Christoph Muellner

On Fri, Jun 14, 2019 at 04:30:13PM +0200, Daniel Lezcano wrote:
> On 14/06/2019 16:02, Robin Murphy wrote:
> > On 14/06/2019 14:03, Daniel Lezcano wrote:
> >> On 14/06/2019 11:35, Heiko Stuebner wrote:
> >>> Hi Daniel,
> >>>
> >>> Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
> >>>> Currently the common thermal zones definitions for the rk3399 assumes
> >>>> multiple thermal zones are supported by the governors. This is not the
> >>>> case and each thermal zone has its own governor instance acting
> >>>> individually without collaboration with other governors.
> >>>>
> >>>> As the cooling device for the CPU and the GPU thermal zones is the
> >>>> same, each governors take different decisions for the same cooling
> >>>> device leading to conflicting instructions and an erratic behavior.
> >>>>
> >>>> As the cooling-maps is about to become an optional property, let's
> >>>> remove the cpu cooling device map from the GPU thermal zone.
> >>>>
> >>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >>>> ---
> >>>>   arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
> >>>>   1 file changed, 9 deletions(-)
> >>>>
> >>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> >>>> b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> >>>> index 196ac9b78076..e1357e0f60f7 100644
> >>>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> >>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> >>>> @@ -821,15 +821,6 @@
> >>>>                       type = "critical";
> >>>>                   };
> >>>>               };
> >>>> -
> >>>> -            cooling-maps {
> >>>> -                map0 {
> >>>> -                    trip = <&gpu_alert0>;
> >>>> -                    cooling-device =
> >>>> -                        <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> >>>> -                        <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> >>>> -                };
> >>>> -            };
> >>>>           };
> >>>>       };
> >>>
> >>> my knowledge of the thermal framework is not that big, but what about
> >>> the
> >>> rk3399-devices which further detail the cooling-maps like
> >>> rk3399-gru-kevin
> >>> and the rk3399-nanopc-t4 with its fan-handling in the cooling-maps?
> >>
> >> The rk3399-gru-kevin is correct.
> >>
> >> The rk3399-nanopc-t4 is not correct because the cpu and the gpu are
> >> sharing the same cooling device (the fan). There are different
> >> configurations:
> >>
> >> 1. The cpu cooling device for the CPU and the fan for the GPU
> >>
> >> 2. Different trip points on the CPU thermal zone, eg. one to for the CPU
> >> cooling device and another one for the fan.
> >>
> >> There are some variant for the above. If this board is not on battery,
> >> you may want to give priority to the throughput, so activate the fan
> >> first and then cool down the CPU. Or if you are on battery, you may want
> >> to invert the trip points.
> >>
> >> In any case, it is not possible to share the same cooling device for
> >> different thermal zones.
> > 
> > OK, thanks for the clarification. I'll get my board set up again to
> > figure out the best fix for rk3399-nanopc-t4 (FWIW most users are
> > probably just using passive cooling or a plain DC fan anyway). You might
> > want to raise this issue with the maintainers of
> > arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi, since the
> > everything-shared-by-everything approach in there was what I used as a
> > reference.
> 
> Cc'ed: Kukjin Kim and Krzysztof Kozlowski
> 
> Easy :)
>

Assuming that all trip-points are the same between thermal zones, I
understand that solution could be to have one thermal zone with thermal
multiple sensors (some time ago bindings did not support it) and all
cooling devices? Then only one governor would be assigned?

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-16  9:31         ` Krzysztof Kozlowski
@ 2019-06-16 17:47           ` Daniel Lezcano
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-16 17:47 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Mark Rutland, Emil Renner Berthing, Viresh Kumar, dianders,
	Tony Xie, Klaus Goger, manivannan.sadhasivam, Philipp Tomsich,
	Heiko Stuebner, open list:ARM/Rockchip SoC support, Kukjin Kim,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Randy Li, Vicente Bergas, edubezval, Rob Herring,
	Matthias Brugger, moderated list:ARM/Rockchip SoC support,
	linux-kernel, Enric Balletbo i Serra, Robin Murphy,
	Christoph Muellner

On 16/06/2019 11:31, Krzysztof Kozlowski wrote:
> On Fri, Jun 14, 2019 at 04:30:13PM +0200, Daniel Lezcano wrote:
>> On 14/06/2019 16:02, Robin Murphy wrote:
>>> On 14/06/2019 14:03, Daniel Lezcano wrote:
>>>> On 14/06/2019 11:35, Heiko Stuebner wrote:
>>>>> Hi Daniel,
>>>>>
>>>>> Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
>>>>>> Currently the common thermal zones definitions for the rk3399 assumes
>>>>>> multiple thermal zones are supported by the governors. This is not the
>>>>>> case and each thermal zone has its own governor instance acting
>>>>>> individually without collaboration with other governors.
>>>>>>
>>>>>> As the cooling device for the CPU and the GPU thermal zones is the
>>>>>> same, each governors take different decisions for the same cooling
>>>>>> device leading to conflicting instructions and an erratic behavior.
>>>>>>
>>>>>> As the cooling-maps is about to become an optional property, let's
>>>>>> remove the cpu cooling device map from the GPU thermal zone.
>>>>>>
>>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>>> ---
>>>>>>   arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>>>>>>   1 file changed, 9 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>>>> b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>>>> index 196ac9b78076..e1357e0f60f7 100644
>>>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>>>> @@ -821,15 +821,6 @@
>>>>>>                       type = "critical";
>>>>>>                   };
>>>>>>               };
>>>>>> -
>>>>>> -            cooling-maps {
>>>>>> -                map0 {
>>>>>> -                    trip = <&gpu_alert0>;
>>>>>> -                    cooling-device =
>>>>>> -                        <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>>>>> -                        <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>>>>>> -                };
>>>>>> -            };
>>>>>>           };
>>>>>>       };
>>>>>
>>>>> my knowledge of the thermal framework is not that big, but what about
>>>>> the
>>>>> rk3399-devices which further detail the cooling-maps like
>>>>> rk3399-gru-kevin
>>>>> and the rk3399-nanopc-t4 with its fan-handling in the cooling-maps?
>>>>
>>>> The rk3399-gru-kevin is correct.
>>>>
>>>> The rk3399-nanopc-t4 is not correct because the cpu and the gpu are
>>>> sharing the same cooling device (the fan). There are different
>>>> configurations:
>>>>
>>>> 1. The cpu cooling device for the CPU and the fan for the GPU
>>>>
>>>> 2. Different trip points on the CPU thermal zone, eg. one to for the CPU
>>>> cooling device and another one for the fan.
>>>>
>>>> There are some variant for the above. If this board is not on battery,
>>>> you may want to give priority to the throughput, so activate the fan
>>>> first and then cool down the CPU. Or if you are on battery, you may want
>>>> to invert the trip points.
>>>>
>>>> In any case, it is not possible to share the same cooling device for
>>>> different thermal zones.
>>>
>>> OK, thanks for the clarification. I'll get my board set up again to
>>> figure out the best fix for rk3399-nanopc-t4 (FWIW most users are
>>> probably just using passive cooling or a plain DC fan anyway). You might
>>> want to raise this issue with the maintainers of
>>> arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi, since the
>>> everything-shared-by-everything approach in there was what I used as a
>>> reference.
>>
>> Cc'ed: Kukjin Kim and Krzysztof Kozlowski
>>
>> Easy :)
>>
> 
> Assuming that all trip-points are the same between thermal zones, I
> understand that solution could be to have one thermal zone with thermal
> multiple sensors (some time ago bindings did not support it) and all
> cooling devices? Then only one governor would be assigned?

The multiple sensors, multiple thermal zones and governors dealing with
different group of them is not implemented [yet]. Basically, you can
consider there is a 1:1 relationship between each of them.

 one thermal zone = one sensor = one cooling device

Given the configuration and the hardware, it would make sense to create
one thermal zone per cluster.

There is one clock line per cluster. It is possible to create two CPU
cooling devices, one for each cluster.

IMO, the fan definition is correct except it should be assigned to one
thermal zone only.

One configuration could be:

thermal-zones {
	little-thermal-zone: little-thermal-zone {
		thermal-sensors = <&tmu_cpu0 0>;
                polling-delay-passive = <250>;
                polling-delay = <0>;

		trips {
			ltz_alert0: ltz-alert-0 {
				temperature = <50000>;
				hysteresis = <5000>;
                        	type = "active";
			};

			ltz_alert1: cpu-alert-1 {
				temperature = <60000>;
				hysteresis = <5000>;
				type = "active";
			};

			ltz_alert2: ltz-alert-2 {
				temperature = <70000>;
				hysteresis = <5000>;
				type = "active";
			};

			ltz_alert3: ltz-alert-3 {
				temperature = <75000>;
				hysteresis = <10000>;
				type = "passive";
			};

			ltz_crit0: ltz-crit-0 {
				temperature = <120000>;
				hysteresis = <0>;
				type = "critical";
			};
		};

		cooling-maps {
			map0 {
				trip = <&ltz_alert0>;
				cooling-device = <&fan0 0 1>;
			};

			map1 {
				trip = <&ltz_alert1>;
				cooling-device = <&fan0 1 2>;
			};

			map2 {
				trip = <&ltz_alert2>;
				cooling-device = <&fan0 2 3>;
			};

			map3 {
				trip = <&ltz_alert3>;
				cooling-device = <&cpu0
						THERMAL_NO_LIMIT
						THERMAL_NO_LIMIT>,

						 <&cpu1
						THERMAL_NO_LIMIT
						THERMAL_NO_LIMIT>,

						 <&cpu2
						THERMAL_NO_LIMIT
						THERMAL_NO_LIMIT>,

						 <&cpu3
						THERMAL_NO_LIMIT
						THERMAL_NO_LIMIT>,
			};
		};
	};

	big-thermal-zone: big-thermal-zone {

		/* The same as little, except the sensor and the cpu
		  cooling &cpu4, &cpu5, &cpu6, &cpu7 */

	};
};


That said, the idle injection cooling device is for the moment being
developed and that would be a good opportunity to test a real per cpu
cooling device as the exynos5422 has a per core sensor.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-04 16:57 [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
                   ` (2 preceding siblings ...)
  2019-06-14  9:35 ` Heiko Stuebner
@ 2019-06-24  7:31 ` Daniel Lezcano
  2019-06-26 22:26 ` Heiko Stuebner
  4 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2019-06-24  7:31 UTC (permalink / raw)
  To: heiko
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	edubezval, Enric Balletbo i Serra, Rob Herring, Klaus Goger,
	manivannan.sadhasivam, Matthias Brugger, Philipp Tomsich,
	moderated list:ARM/Rockchip SoC support, Christoph Muellner


Gentle ping ...


On 04/06/2019 18:57, Daniel Lezcano wrote:
> Currently the common thermal zones definitions for the rk3399 assumes
> multiple thermal zones are supported by the governors. This is not the
> case and each thermal zone has its own governor instance acting
> individually without collaboration with other governors.
> 
> As the cooling device for the CPU and the GPU thermal zones is the
> same, each governors take different decisions for the same cooling
> device leading to conflicting instructions and an erratic behavior.
> 
> As the cooling-maps is about to become an optional property, let's
> remove the cpu cooling device map from the GPU thermal zone.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 196ac9b78076..e1357e0f60f7 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -821,15 +821,6 @@
>  					type = "critical";
>  				};
>  			};
> -
> -			cooling-maps {
> -				map0 {
> -					trip = <&gpu_alert0>;
> -					cooling-device =
> -						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> -						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> -				};
> -			};
>  		};
>  	};
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi
  2019-06-04 16:57 [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
                   ` (3 preceding siblings ...)
  2019-06-24  7:31 ` Daniel Lezcano
@ 2019-06-26 22:26 ` Heiko Stuebner
  4 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2019-06-26 22:26 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Emil Renner Berthing, open list:ARM/Rockchip SoC support,
	Tony Xie, Viresh Kumar, Randy Li, linux-kernel, Vicente Bergas,
	edubezval, Enric Balletbo i Serra, Rob Herring, Klaus Goger,
	manivannan.sadhasivam, Matthias Brugger, Philipp Tomsich,
	moderated list:ARM/Rockchip SoC support, Christoph Muellner

Am Dienstag, 4. Juni 2019, 18:57:57 CEST schrieb Daniel Lezcano:
> Currently the common thermal zones definitions for the rk3399 assumes
> multiple thermal zones are supported by the governors. This is not the
> case and each thermal zone has its own governor instance acting
> individually without collaboration with other governors.
> 
> As the cooling device for the CPU and the GPU thermal zones is the
> same, each governors take different decisions for the same cooling
> device leading to conflicting instructions and an erratic behavior.
> 
> As the cooling-maps is about to become an optional property, let's
> remove the cpu cooling device map from the GPU thermal zone.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

applied both patches for 5.3

Thanks
Heiko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-06-27  5:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 16:57 [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
2019-06-04 16:57 ` [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960 Daniel Lezcano
2019-06-07 22:18   ` Linus Walleij
2019-06-08 22:05     ` Daniel Lezcano
2019-06-12 14:55 ` [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Daniel Lezcano
2019-06-14  9:35 ` Heiko Stuebner
2019-06-14 10:09   ` Robin Murphy
2019-06-14 13:03   ` Daniel Lezcano
2019-06-14 14:02     ` Robin Murphy
2019-06-14 14:30       ` Daniel Lezcano
2019-06-16  9:31         ` Krzysztof Kozlowski
2019-06-16 17:47           ` Daniel Lezcano
2019-06-24  7:31 ` Daniel Lezcano
2019-06-26 22:26 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).