Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1616749 > unrolled thread

[PATCH v4 7/8] ARM: sun8i: a33: Add devfreq-based GPU cooling

Started byQuentin Schulz <quentin.schulz@free-electrons.com>
First post2017-04-05 11:20 +0200
Last post2017-04-05 14:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 7/8] ARM: sun8i: a33: Add devfreq-based GPU cooling Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-04-05 11:20 +0200
    Re: [PATCH v4 7/8] ARM: sun8i: a33: Add devfreq-based GPU cooling Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-05 14:50 +0200

#1616749 — [PATCH v4 7/8] ARM: sun8i: a33: Add devfreq-based GPU cooling

FromQuentin Schulz <quentin.schulz@free-electrons.com>
Date2017-04-05 11:20 +0200
Subject[PATCH v4 7/8] ARM: sun8i: a33: Add devfreq-based GPU cooling
Message-ID<tsPgB-IY-5@gated-at.bofh.it>
From: Maxime Ripard <maxime.ripard@free-electrons.com>

This adds GPU thermal throttling for the Allwinner A33.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
---

v3:
  - got rid of cooling-min-level and cooling-max-level as it's not used in any
  code in the kernel,

added in v2
 arch/arm/boot/dts/sun8i-a23-a33.dtsi |  1 +
 arch/arm/boot/dts/sun8i-a33.dtsi     | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index 5e8725d..6d81a6d 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -495,6 +495,7 @@
 
 			assigned-clocks = <&ccu CLK_GPU>;
 			assigned-clock-rates = <384000000>;
+			#cooling-cells = <2>;
 		};
 
 		gic: interrupt-controller@01c81000 {
diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index b88c107..541ca45 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -188,6 +188,16 @@
 					trip = <&cpu_alert1>;
 					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+
+				map2 {
+					trip = <&gpu_alert0>;
+					cooling-device = <&mali 1 THERMAL_NO_LIMIT>;
+				};
+
+				map3 {
+					trip = <&gpu_alert1>;
+					cooling-device = <&mali 2 THERMAL_NO_LIMIT>;
+				};
 			};
 
 			trips {
@@ -198,6 +208,13 @@
 					type = "passive";
 				};
 
+				gpu_alert0: gpu_alert0 {
+					/* milliCelsius */
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
 				cpu_alert1: cpu_alert1 {
 					/* milliCelsius */
 					temperature = <90000>;
@@ -205,6 +222,13 @@
 					type = "hot";
 				};
 
+				gpu_alert1: gpu_alert1 {
+					/* milliCelsius */
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+
 				cpu_crit: cpu_crit {
 					/* milliCelsius */
 					temperature = <110000>;
-- 
2.9.3

[toc] | [next] | [standalone]


#1616899

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2017-04-05 14:50 +0200
Message-ID<tsSxP-2F7-7@gated-at.bofh.it>
In reply to#1616749

[Multipart message — attachments visible in raw view] — view raw

On Wed, Apr 05, 2017 at 11:06:33AM +0200, Quentin Schulz wrote:
> From: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> This adds GPU thermal throttling for the Allwinner A33.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web