arm64: dts: qcom: sm8550: Throttle the GPU when overheating
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Fri, 10 May 2024 12:58:40 +0000 (14:58 +0200)
committerBjorn Andersson <andersson@kernel.org>
Fri, 7 Jun 2024 23:03:52 +0000 (18:03 -0500)
Add an 85C passive trip point to ensure the thermal framework takes
sufficient action to prevent reaching junction temperature and a
110C critical point to help avoid hw damage.

Remove the copypasta-from-downstream userspace governor entries while
at it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-11-ababc269a438@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sm8550.dtsi

index 58b2c550b3ecec67f26ca4be6d55db8a7fcab03f..4234c92aafe342d510fa711c1eec06ab9c2ba9ca 100644 (file)
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu0_junction_config>;
+                                       trip = <&gpu0_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu0_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu0_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu1_junction_config>;
+                                       trip = <&gpu1_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu1_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu1_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu2_junction_config>;
+                                       trip = <&gpu2_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu2_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu2_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu3_junction_config>;
+                                       trip = <&gpu3_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu3_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu3_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu4_junction_config>;
+                                       trip = <&gpu4_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu4_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu4_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu5_junction_config>;
+                                       trip = <&gpu5_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu5_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu5_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu6_junction_config>;
+                                       trip = <&gpu6_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu6_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu6_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };
 
                        cooling-maps {
                                map0 {
-                                       trip = <&gpu7_junction_config>;
+                                       trip = <&gpu7_alert0>;
                                        cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
 
                        trips {
-                               thermal-engine-config {
-                                       temperature = <125000>;
+                               gpu7_alert0: trip-point0 {
+                                       temperature = <85000>;
                                        hysteresis = <1000>;
                                        type = "passive";
                                };
 
-                               thermal-hal-config {
-                                       temperature = <125000>;
+                               trip-point1 {
+                                       temperature = <90000>;
                                        hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               reset-mon-config {
-                                       temperature = <115000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                                       type = "hot";
                                };
 
-                               gpu7_junction_config: junction-config {
-                                       temperature = <95000>;
-                                       hysteresis = <5000>;
-                                       type = "passive";
+                               trip-point2 {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
                                };
                        };
                };