Skip to contentSkip to conversation

Hook up GPU cooling on most qcom arm64 platforms

PATCH Applied Konrad Dybcio 3 participants 26 messages Jan 2, 2024 – Jan 28, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Hook up GPU cooling on most qcom arm64 platforms

It's been years since Adreno has been registered as a cooling device, yet only so many platforms had the correct DT setup for it. This series attempts to hook it up on most supported snapdragons.

---
Konrad Dybcio (12):
arm64: dts: qcom: msm8916: Hook up GPU cooling device
arm64: dts: qcom: msm8939: Hook up GPU cooling device
arm64: dts: qcom: sc8180x: Hook up GPU cooling device
arm64: dts: qcom: sdm845: Hook up GPU cooling device
arm64: dts: qcom: sm6115: Hook up GPU cooling device
arm64: dts: qcom: sm6115: Mark GPU @ 125C critical
arm64: dts: qcom: sm8150: Hook up GPU cooling device
arm64: dts: qcom: sm8250: Hook up GPU cooling device
arm64: dts: qcom: sm8350: Hook up GPU cooling device
arm64: dts: qcom: sm8450: Hook up GPU cooling device
arm64: dts: qcom: sm8550: Hook up GPU cooling device
arm64: dts: qcom: sdm630: Hook up GPU cooling device

 arch/arm64/boot/dts/qcom/msm8916.dtsi |  9 ++++++
 arch/arm64/boot/dts/qcom/msm8939.dtsi |  9 ++++++
 arch/arm64/boot/dts/qcom/sc8180x.dtsi | 20 ++++++++++--
 arch/arm64/boot/dts/qcom/sdm630.dtsi  |  9 ++++++
 arch/arm64/boot/dts/qcom/sdm845.dtsi  | 19 ++++++++++--
 arch/arm64/boot/dts/qcom/sm6115.dtsi  | 13 ++++++--
 arch/arm64/boot/dts/qcom/sm8150.dtsi  | 19 ++++++++++--
 arch/arm64/boot/dts/qcom/sm8250.dtsi  | 19 ++++++++++--
 arch/arm64/boot/dts/qcom/sm8350.dtsi  | 19 ++++++++++--
 arch/arm64/boot/dts/qcom/sm8450.dtsi  | 19 ++++++++++--
 arch/arm64/boot/dts/qcom/sm8550.dtsi  | 57 +++++++++++++++++++++++++++++++++++
 11 files changed, 198 insertions(+), 14 deletions(-)

---
base-commit: ab0b3e6ef50d305278b1971891cf1d82ab050b35
change-id: 20240102-topic-gpu_cooling-155d4d4b051e

Best regards,

Signature · 1 line
Konrad Dybcio <[email protected]>
#1 lore raw

PATCH 1/12 arm64: dts: qcom: msm8916: Hook up GPU cooling device

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/msm8916.dtsi +9 -0
index 7f8327b0dbdb..31ceb1df550a 100644
@@ -1794,6 +1794,8 @@ gpu: gpu@1c00000 {
 			power-domains = <&gcc OXILI_GDSC>;
 			operating-points-v2 = <&gpu_opp_table>;
 			iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+			#cooling-cells = <2>;
+
 			status = "disabled";
 
 			gpu_opp_table: opp-table {
@@ -2697,6 +2699,13 @@ gpu-thermal {
 
 			thermal-sensors = <&tsens 2>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				gpu_alert0: trip-point0 {
 					temperature = <75000>;
Signature · 1 line
2.43.0
Reviewed-by on v1 1/12
#2 lore raw

Re: [PATCH 01/12] arm64: dts: qcom: msm8916: Hook up GPU cooling device

Quoted 8 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
Signature · 2 lines
With best wishes
Dmitry
#3 lore raw

PATCH 2/12 arm64: dts: qcom: msm8939: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/msm8939.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/msm8939.dtsi +9 -0
index 29f6bd9df2eb..e0521a060cf8 100644
@@ -1439,6 +1439,8 @@ gpu: gpu@1c00000 {
 			power-domains = <&gcc OXILI_GDSC>;
 			operating-points-v2 = <&opp_table>;
 			iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+			#cooling-cells = <2>;
+
 			status = "disabled";
 
 			opp_table: opp-table {
@@ -2468,6 +2470,13 @@ gpu-thermal {
 
 			thermal-sensors = <&tsens 3>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				gpu_alert0: trip-point0 {
 					temperature = <75000>;
Signature · 1 line
2.43.0
Reviewed-by on v1 2/12
#4 lore raw

Re: [PATCH 02/12] arm64: dts: qcom: msm8939: Hook up GPU cooling device

Quoted 8 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/msm8939.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
Signature · 2 lines
With best wishes
Dmitry
#5 lore raw

PATCH 3/12 arm64: dts: qcom: sc8180x: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sc8180x.dtsi | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc8180x.dtsi +18 -2
index 0430d99091e3..b1227e04429c 100644
@@ -2173,6 +2173,8 @@ gpu: gpu@2c00000 {
 			interconnect-names = "gfx-mem";
 
 			qcom,gmu = <&gmu>;
+			#cooling-cells = <2>;
+
 			status = "disabled";
 
 			gpu_opp_table: opp-table {
@@ -3880,8 +3882,15 @@ gpu-top-thermal {
 
 			thermal-sensors = <&tsens0 15>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_top_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				trip-point0 {
+				gpu_top_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
@@ -4030,8 +4039,15 @@ gpu-bottom-thermal {
 
 			thermal-sensors = <&tsens1 11>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_bottom_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				trip-point0 {
+				gpu_bottom_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
Signature · 1 line
2.43.0
Reviewed-by on v1 3/12
#6 lore raw

Re: [PATCH 03/12] arm64: dts: qcom: sc8180x: Hook up GPU cooling device

Quoted 8 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sc8180x.dtsi | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#7 lore raw

PATCH 4/12 arm64: dts: qcom: sdm845: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845.dtsi +17 -2
index c2244824355a..1c2d01f0cf07 100644
@@ -4760,6 +4760,7 @@ gpu: gpu@5000000 {
 			operating-points-v2 = <&gpu_opp_table>;
 
 			qcom,gmu = <&gmu>;
+			#cooling-cells = <2>;
 
 			interconnects = <&mem_noc MASTER_GFX3D 0 &mem_noc SLAVE_EBI1 0>;
 			interconnect-names = "gfx-mem";
@@ -5602,8 +5603,15 @@ gpu-top-thermal {
 
 			thermal-sensors = <&tsens0 11>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_top_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu1_alert0: trip-point0 {
+				gpu_top_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
@@ -5617,8 +5625,15 @@ gpu-bottom-thermal {
 
 			thermal-sensors = <&tsens0 12>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_bottom_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu2_alert0: trip-point0 {
+				gpu_bottom_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
Signature · 1 line
2.43.0
Reviewed-by on v1 4/12
#8 lore raw

Re: [PATCH 04/12] arm64: dts: qcom: sdm845: Hook up GPU cooling device

Quoted 8 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#9 lore raw

PATCH 5/12 arm64: dts: qcom: sm6115: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6115.dtsi +10 -1
index 160e098f1075..a8c819d53104 100644
@@ -14,6 +14,7 @@
 #include <dt-bindings/interconnect/qcom,sm6115.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
 	interrupt-parent = <&intc>;
@@ -1646,6 +1647,7 @@ gpu: gpu@5900000 {
 
 			nvmem-cells = <&gpu_speed_bin>;
 			nvmem-cell-names = "speed_bin";
+			#cooling-cells = <2>;
 
 			status = "disabled";
 
@@ -3294,8 +3296,15 @@ gpu-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens0 15>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				trip-point0 {
+				gpu_alert0: trip-point0 {
 					temperature = <115000>;
 					hysteresis = <5000>;
 					type = "passive";
Signature · 1 line
2.43.0
Reviewed-by on v1 5/12
#10 lore raw

Re: [PATCH 05/12] arm64: dts: qcom: sm6115: Hook up GPU cooling device

Quoted 8 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Signature · 2 lines
With best wishes
Dmitry
#11 lore raw

PATCH 6/12 arm64: dts: qcom: sm6115: Mark GPU @ 125C critical

In reply to Konrad Dybcio

If the GPU ever reaches this temperature, the "critical" signal shuold definitely be propagated. Fix the wrong type.

---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6115.dtsi +1 -1
index a8c819d53104..be51cbaeeb7e 100644
@@ -3313,7 +3313,7 @@ gpu_alert0: trip-point0 {
 				trip-point1 {
 					temperature = <125000>;
 					hysteresis = <1000>;
-					type = "passive";
+					type = "critical";
 				};
 			};
 		};
Signature · 1 line
2.43.0
Reviewed-by on v1 6/12
#12 lore raw

Re: [PATCH 06/12] arm64: dts: qcom: sm6115: Mark GPU @ 125C critical

Quoted 3 lines · Konrad Dybcio

If the GPU ever reaches this temperature, the "critical" signal shuold definitely be propagated. Fix the wrong type.

I hope it will be shut down before reaching 125°C

Quoted 24 lines
---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6115.dtsi +1 -2
index a8c819d53104..be51cbaeeb7e 100644
@@ -3313,7 +3313,7 @@ gpu_alert0: trip-point0 {
                                trip-point1 {
                                        temperature = <125000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
+                                       type = "critical";
                                };
                        };
                };
 
--

2.43.0

Signature · 2 lines
With best wishes
Dmitry
#13 lore raw

PATCH 7/12 arm64: dts: qcom: sm8150: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8150.dtsi +17 -2
index 761a6757dc26..26dbda713e51 100644
@@ -2198,6 +2198,7 @@ gpu: gpu@2c00000 {
 
 			nvmem-cells = <&gpu_speed_bin>;
 			nvmem-cell-names = "speed_bin";
+			#cooling-cells = <2>;
 
 			status = "disabled";
 
@@ -5101,8 +5102,15 @@ gpu-top-thermal {
 
 			thermal-sensors = <&tsens0 15>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_top_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu1_alert0: trip-point0 {
+				gpu_top_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
@@ -5281,8 +5289,15 @@ gpu-bottom-thermal {
 
 			thermal-sensors = <&tsens1 11>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_bottom_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu2_alert0: trip-point0 {
+				gpu_bottom_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
Signature · 1 line
2.43.0
Reviewed-by on v1 7/12
#14 lore raw

Re: [PATCH 07/12] arm64: dts: qcom: sm8150: Hook up GPU cooling device

Quoted 9 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#15 lore raw

PATCH 8/12 arm64: dts: qcom: sm8250: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +17 -2
index 760501c1301a..03bf49818798 100644
@@ -2888,6 +2888,7 @@ gpu: gpu@3d00000 {
 
 			nvmem-cells = <&gpu_speed_bin>;
 			nvmem-cell-names = "speed_bin";
+			#cooling-cells = <2>;
 
 			status = "disabled";
 
@@ -6791,8 +6792,15 @@ gpu-top-thermal {
 
 			thermal-sensors = <&tsens0 15>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_top_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu1_alert0: trip-point0 {
+				gpu_top_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
@@ -6926,8 +6934,15 @@ gpu-bottom-thermal {
 
 			thermal-sensors = <&tsens1 8>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_bottom_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu2_alert0: trip-point0 {
+				gpu_bottom_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <2000>;
 					type = "hot";
Signature · 1 line
2.43.0
Reviewed-by on v1 8/12
#16 lore raw

Re: [PATCH 08/12] arm64: dts: qcom: sm8250: Hook up GPU cooling device

Quoted 9 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#17 lore raw

PATCH 9/12 arm64: dts: qcom: sm8350: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8350.dtsi +17 -2
index e78c83a897c2..1c6f80b14d09 100644
@@ -1847,6 +1847,7 @@ gpu: gpu@3d00000 {
 			operating-points-v2 = <&gpu_opp_table>;
 
 			qcom,gmu = <&gmu>;
+			#cooling-cells = <2>;
 
 			status = "disabled";
 
@@ -4214,8 +4215,15 @@ gpu-top-thermal {
 
 			thermal-sensors = <&tsens1 1>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_top_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu1_alert0: trip-point0 {
+				gpu_top_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <1000>;
 					type = "hot";
@@ -4229,8 +4237,15 @@ gpu-bottom-thermal {
 
 			thermal-sensors = <&tsens1 2>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_bottom_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
-				gpu2_alert0: trip-point0 {
+				gpu_bottom_alert0: trip-point0 {
 					temperature = <90000>;
 					hysteresis = <1000>;
 					type = "hot";
Signature · 1 line
2.43.0
Reviewed-by on v1 9/12
#18 lore raw

Re: [PATCH 09/12] arm64: dts: qcom: sm8350: Hook up GPU cooling device

Quoted 10 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#19 lore raw

PATCH 10/12 arm64: dts: qcom: sm8450: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8450.dtsi +17 -2
index 01e4dfc4babd..8f5a093c8828 100644
@@ -2038,6 +2038,7 @@ gpu: gpu@3d00000 {
 			operating-points-v2 = <&gpu_opp_table>;
 
 			qcom,gmu = <&gmu>;
+			#cooling-cells = <2>;
 
 			status = "disabled";
 
@@ -4890,6 +4891,13 @@ gpu-top-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens0 14>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_top_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -4909,7 +4917,7 @@ reset-mon-cfg {
 					type = "passive";
 				};
 
-				gpu0_tj_cfg: tj-cfg {
+				gpu_top_alert0: trip-point0 {
 					temperature = <95000>;
 					hysteresis = <5000>;
 					type = "passive";
@@ -4922,6 +4930,13 @@ gpu-bottom-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens0 15>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_bottom_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -4941,7 +4956,7 @@ reset-mon-cfg {
 					type = "passive";
 				};
 
-				gpu1_tj_cfg: tj-cfg {
+				gpu_bottom_alert0: trip-point0 {
 					temperature = <95000>;
 					hysteresis = <5000>;
 					type = "passive";
Signature · 1 line
2.43.0
Reviewed-by on v1 10/12
#20 lore raw

Re: [PATCH 10/12] arm64: dts: qcom: sm8450: Hook up GPU cooling device

Quoted 9 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it.

---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#21 lore raw

PATCH 11/12 arm64: dts: qcom: sm8550: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, unify the naming scheme of the thermal zones across the tree while at it.

---
 arch/arm64/boot/dts/qcom/sm8550.dtsi | 57 ++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
arch/arm64/boot/dts/qcom/sm8550.dtsi +57 -0
index ee1ba5a8c8fc..692cd85f03fb 100644
@@ -2012,6 +2012,7 @@ gpu: gpu@3d00000 {
 			operating-points-v2 = <&gpu_opp_table>;
 
 			qcom,gmu = <&gmu>;
+			#cooling-cells = <2>;
 
 			status = "disabled";
 
@@ -5304,6 +5305,13 @@ gpuss-0-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 1>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu0_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -5336,6 +5344,13 @@ gpuss-1-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 2>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu1_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -5368,6 +5383,13 @@ gpuss-2-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 3>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu2_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -5400,6 +5422,13 @@ gpuss-3-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 4>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu3_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -5432,6 +5461,13 @@ gpuss-4-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 5>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu4_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -5464,6 +5500,13 @@ gpuss-5-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 6>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu5_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -5496,6 +5539,13 @@ gpuss-6-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 7>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu6_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
@@ -5528,6 +5578,13 @@ gpuss-7-thermal {
 			polling-delay = <0>;
 			thermal-sensors = <&tsens2 8>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu7_junction_config>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				thermal-engine-config {
 					temperature = <125000>;
Signature · 1 line
2.43.0
Reviewed-by on v1 11/12
#22 lore raw

Re: [PATCH 11/12] arm64: dts: qcom: sm8550: Hook up GPU cooling device

Quoted 9 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, unify the naming scheme of the thermal zones across the tree while at it.

---
 arch/arm64/boot/dts/qcom/sm8550.dtsi | 57 ++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
Signature · 2 lines
With best wishes
Dmitry
#23 lore raw

PATCH 12/12 arm64: dts: qcom: sdm630: Hook up GPU cooling device

In reply to Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/sdm630.dtsi +9 -0
index 775700f78e0f..fc06665861e2 100644
@@ -13,6 +13,7 @@
 #include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/thermal/thermal.h>
 #include <dt-bindings/soc/qcom,apr.h>
 
 / {
@@ -1120,6 +1121,7 @@ adreno_gpu: gpu@5000000 {
 			interconnect-names = "gfx-mem";
 
 			operating-points-v2 = <&gpu_sdm630_opp_table>;
+			#cooling-cells = <2>;
 
 			status = "disabled";
 
@@ -2580,6 +2582,13 @@ gpu-thermal {
 
 			thermal-sensors = <&tsens 8>;
 
+			cooling-maps {
+				map0 {
+					trip = <&gpu_alert0>;
+					cooling-device = <&adreno_gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
 			trips {
 				gpu_alert0: trip-point0 {
 					temperature = <90000>;
Signature · 1 line
2.43.0
Reviewed-by on v1 12/12
#24 lore raw

Re: [PATCH 12/12] arm64: dts: qcom: sdm630: Hook up GPU cooling device

Quoted 9 lines · Konrad Dybcio

In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones.

---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
Signature · 2 lines
With best wishes
Dmitry
maintainer Applied
#25 lore raw
In reply to Konrad Dybcio
Quoted 5 lines · Konrad Dybcio

It's been years since Adreno has been registered as a cooling device, yet only so many platforms had the correct DT setup for it. This series attempts to hook it up on most supported snapdragons.

Applied, thanks!

[01/12] arm64: dts: qcom: msm8916: Hook up GPU cooling device

        commit: 04ee83047e4f7ba3e12f96315c08e146d10e1b7b
[02/12] arm64: dts: qcom: msm8939: Hook up GPU cooling device
        commit: 93c4e1fb9dd9e56b09adc4a85692de3a97209960
[03/12] arm64: dts: qcom: sc8180x: Hook up GPU cooling device
        commit: f48cea4a6fffa3651ced6f8f348f62ff4f268d87
[04/12] arm64: dts: qcom: sdm845: Hook up GPU cooling device
        commit: 08b1b831e1a91793a20a41e090f969f41195a03d
[05/12] arm64: dts: qcom: sm6115: Hook up GPU cooling device
        commit: de5e4e88ac148eb3aa9759095c91cbf810901774
[06/12] arm64: dts: qcom: sm6115: Mark GPU @ 125C critical
        commit: 834932689f2f545f05ee1bbaad5e5e7f4c9fe136
[07/12] arm64: dts: qcom: sm8150: Hook up GPU cooling device
        commit: f18c63a8213913394e20b07790e1ddd60d42f44c
[08/12] arm64: dts: qcom: sm8250: Hook up GPU cooling device
        commit: fb18c893816b37c907c1c0883b92e19dcad58c97
[09/12] arm64: dts: qcom: sm8350: Hook up GPU cooling device
        commit: 43c925e4567390bbf7adb4778b4cae3c93b924ec
[10/12] arm64: dts: qcom: sm8450: Hook up GPU cooling device
        commit: 36fd56ab4d1d13adb9ced8592dc51e009240442d
[11/12] arm64: dts: qcom: sm8550: Hook up GPU cooling device
        commit: 6a464089284a6192aac8405918aeed92b3bba8b6
[12/12] arm64: dts: qcom: sdm630: Hook up GPU cooling device
        commit: ac68c7d3912d09878b8b42866b47fdd6459f5703

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>