Commit 497624ed authored by Konrad Dybcio's avatar Konrad Dybcio Committed by Bjorn Andersson

arm64: dts: qcom: sm8650: Throttle the GPU when overheating

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.

Also, register the GPU as a cooling device and hook it up to the
right thermal zones.
Signed-off-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-12-ababc269a438@linaro.orgSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent ed979c03
......@@ -2632,6 +2632,7 @@ gpu: gpu@3d00000 {
operating-points-v2 = <&gpu_opp_table>;
qcom,gmu = <&gmu>;
#cooling-cells = <2>;
status = "disabled";
......@@ -6028,16 +6029,29 @@ gpuss0-thermal {
thermal-sensors = <&tsens2 1>;
cooling-maps {
map0 {
trip = <&gpu0_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu0_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss0-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......@@ -6048,16 +6062,29 @@ gpuss1-thermal {
thermal-sensors = <&tsens2 2>;
cooling-maps {
map0 {
trip = <&gpu1_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu1_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss1-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......@@ -6068,16 +6095,29 @@ gpuss2-thermal {
thermal-sensors = <&tsens2 3>;
cooling-maps {
map0 {
trip = <&gpu2_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu2_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss2-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......@@ -6088,16 +6128,29 @@ gpuss3-thermal {
thermal-sensors = <&tsens2 4>;
cooling-maps {
map0 {
trip = <&gpu3_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu3_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss3-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......@@ -6108,16 +6161,29 @@ gpuss4-thermal {
thermal-sensors = <&tsens2 5>;
cooling-maps {
map0 {
trip = <&gpu4_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu4_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss4-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......@@ -6128,16 +6194,29 @@ gpuss5-thermal {
thermal-sensors = <&tsens2 6>;
cooling-maps {
map0 {
trip = <&gpu5_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu5_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss5-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......@@ -6148,16 +6227,29 @@ gpuss6-thermal {
thermal-sensors = <&tsens2 7>;
cooling-maps {
map0 {
trip = <&gpu6_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu6_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss6-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......@@ -6168,16 +6260,29 @@ gpuss7-thermal {
thermal-sensors = <&tsens2 8>;
cooling-maps {
map0 {
trip = <&gpu7_alert0>;
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
trip-point0 {
gpu7_alert0: trip-point0 {
temperature = <85000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
temperature = <90000>;
hysteresis = <2000>;
hysteresis = <1000>;
type = "hot";
};
gpuss7-critical {
trip-point2 {
temperature = <110000>;
hysteresis = <0>;
hysteresis = <1000>;
type = "critical";
};
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment