]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: qcom: x1e80100: Add GPU cooling
authorStephan Gerhold <stephan.gerhold@linaro.org>
Wed, 19 Feb 2025 11:36:20 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:45:07 +0000 (14:45 +0200)
commit 5ba21fa11f473c9827f378ace8c9f983de9e0287 upstream.

Unlike the CPU, the GPU does not throttle its speed automatically when it
reaches high temperatures. With certain high GPU loads it is possible to
reach the critical hardware shutdown temperature of 120°C, endangering the
hardware and making it impossible to run certain applications.

Set up GPU cooling similar to the ACPI tables, by throttling the GPU speed
when reaching 95°C and polling every 200ms.

Cc: stable@vger.kernel.org
Fixes: 721e38301b79 ("arm64: dts: qcom: x1e80100: Add gpu support")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250219-x1e80100-thermal-fixes-v1-3-d110e44ac3f9@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/boot/dts/qcom/x1e80100.dtsi

index e690386bbe4f5ff9b45e8fb96b4bd994711c6cdc..23595aac6dacddf17fdf4824686b951db6df2cd1 100644 (file)
@@ -20,6 +20,7 @@
 #include <dt-bindings/soc/qcom,gpr.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
 #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
        interrupt-parent = <&intc>;
                };
 
                gpuss-0-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 5>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss0_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss0_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                };
 
                gpuss-1-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 6>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss1_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss1_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                };
 
                gpuss-2-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 7>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss2_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss2_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                };
 
                gpuss-3-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 8>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss3_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss3_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                };
 
                gpuss-4-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 9>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss4_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss4_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                };
 
                gpuss-5-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 10>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss5_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss5_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                };
 
                gpuss-6-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 11>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss6_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss6_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                };
 
                gpuss-7-thermal {
-                       polling-delay-passive = <10>;
+                       polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 12>;
 
-                       trips {
-                               trip-point0 {
-                                       temperature = <85000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpuss7_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+                       };
 
-                               trip-point1 {
-                                       temperature = <90000>;
+                       trips {
+                               gpuss7_alert0: trip-point0 {
+                                       temperature = <95000>;
                                        hysteresis = <1000>;
-                                       type = "hot";
+                                       type = "passive";
                                };
 
-                               trip-point2 {
+                               gpu-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";