From nobody Tue Feb 10 18:44:05 2026 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D2D5172764 for ; Fri, 10 May 2024 12:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345936; cv=none; b=Q3qq3LvheDd8C/PBeax5ejsu1UDIRfDNz86PClNy7i6mzhZSJJnexiFFbig6QE7riWzHMQBWYOatrL8byztNf6GlA/MSGtMD6XymTGRSOoke03RJ7wIlpbqqGPWEFahoL71aUuscZycbg219yVBPubLws8YxlCje2vUEprjkx9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345936; c=relaxed/simple; bh=Cl7BuIrFlAl4aD4Z00HnjW4zAP6QqudUQ1OzmOr+xi0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nipGedVlVWcQqczZEHY8oKxxQJwLiHXuVgEpJ5RK0Tcprsqq3XVsWcOh93MzcLGdikTTtfVgm0ifXEUyNROC2u6d6Bj/6evn7NgKZOxt1av2dXksev59vBH+z+aXCpsytqHgLQIqD6Guw/e6gZciFlBH/E9xHrDlKnVGZzwIg0c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=aCXSgKdJ; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aCXSgKdJ" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a59a0168c75so524252966b.1 for ; Fri, 10 May 2024 05:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345933; x=1715950733; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GzNgccEjJJ10l5IzhJDmyxwX1t0d4Nd8C8K0mQGyahA=; b=aCXSgKdJRS4C4o80IYRwlowg/iIz138wZ7jcqt/AM0R8vw26yutPcjoVzyDnUsn7AX ETlNJEiSLSRLdYHWxqWOzQfbysg5JrZcACZ0CSsxApmRIIry2JjM7c7RsBlwX0rgQSpW Fql2Y7QAl1tHRQ9IYYUJqT6YujSns/sS2Kh/Mt7ROKQDckKKY1c/EgALXkP8DdMmDNz4 BDWbcluzE8PHAs4hdlHu7KVJLxiufLY8nrOcalbKbW8eAfO4R8IYXUQ1zDv40SDXLV1R 3nbTasOXCBvaDhri4pgs2/916LXAZmsnxj0ZipEkIfE6IhafsYGbC0Fm7Y+Bpuy52+tr FjhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345933; x=1715950733; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GzNgccEjJJ10l5IzhJDmyxwX1t0d4Nd8C8K0mQGyahA=; b=iog2Qb0Yft2MLe/ue/4yXrUEEJ2zqLmQJAN1S/46tjLkebUPdcFq0CMa4SBMilyxxu wzWXvfBRPHJfX3PfSpgU2Yk6UUh6k2RQ+LTYqRcAD0N9ihT8VcPz1eNdZAIHk6no/GZX JJZOi2R9Qac+UZ4JChsmxLg3Lunnsto9XN9wLEjo2Jfa78sWjUi2gId+xPkd0p8fFBrM OcrL96JCWrzVY4sRhK2C7cTz3XAFx2bgZhJSMQzkDHmN+qVCRz/fmRlDGpBlHG/rCk0h 0vaxGUVL87rHm7pALosy0UN/oWln7ddXBW6h7bvAOkTYAi/PCxu3U6xQGmr0IWRwMDD0 QccQ== X-Forwarded-Encrypted: i=1; AJvYcCX5AYjc/4qsS9AXgo9v5OE7eCEV8WmGcUEcjJkSGjzhc6duAo6Fig+1fcYBR9G3fwiC8r2RYUAdBxEYAxWTmq4RckpjF8oOFZfrd9OJ X-Gm-Message-State: AOJu0Ywq5/pzXF7u09ktriy9bzNqLB2rfn414cmQufSX36kogTpilx60 VMVisBDIRpW94H2CbjcsF37+vVYQtDPYarOPdIEeFr3ZInbfkfXwnMWiNXfp4GM= X-Google-Smtp-Source: AGHT+IGz49EaXDJIZQ+dIlV387Idl3kbEJONmp6R+FnxXMvoNEpPp9bR6PYBM3a5UI0kgiLKhPl3Mg== X-Received: by 2002:a17:906:194a:b0:a58:e8c7:c0b8 with SMTP id a640c23a62f3a-a5a2d53ad9amr179754066b.7.1715345933040; Fri, 10 May 2024 05:58:53 -0700 (PDT) Received: from [127.0.1.1] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781d6bfsm181857366b.31.2024.05.10.05.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:52 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:41 +0200 Subject: [PATCH 12/12] arm64: dts: qcom: sm8650: Throttle the GPU when overheating Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240510-topic-gpus_are_cool_now-v1-12-ababc269a438@linaro.org> References: <20240510-topic-gpus_are_cool_now-v1-0-ababc269a438@linaro.org> In-Reply-To: <20240510-topic-gpus_are_cool_now-v1-0-ababc269a438@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Konrad Dybcio X-Mailer: b4 0.14-dev 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: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8650.dtsi | 169 ++++++++++++++++++++++++++++---= ---- 1 file changed, 137 insertions(+), 32 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qco= m/sm8650.dtsi index 39e789b21acc..1b20d0fcd3ef 100644 --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi @@ -2626,6 +2626,7 @@ gpu: gpu@3d00000 { operating-points-v2 =3D <&gpu_opp_table>; =20 qcom,gmu =3D <&gmu>; + #cooling-cells =3D <2>; =20 status =3D "disabled"; =20 @@ -6014,16 +6015,29 @@ gpuss0-thermal { =20 thermal-sensors =3D <&tsens2 1>; =20 + cooling-maps { + map0 { + trip =3D <&gpu0_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu0_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss0-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; @@ -6034,16 +6048,29 @@ gpuss1-thermal { =20 thermal-sensors =3D <&tsens2 2>; =20 + cooling-maps { + map0 { + trip =3D <&gpu1_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu1_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss1-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; @@ -6054,16 +6081,29 @@ gpuss2-thermal { =20 thermal-sensors =3D <&tsens2 3>; =20 + cooling-maps { + map0 { + trip =3D <&gpu2_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu2_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss2-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; @@ -6074,16 +6114,29 @@ gpuss3-thermal { =20 thermal-sensors =3D <&tsens2 4>; =20 + cooling-maps { + map0 { + trip =3D <&gpu3_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu3_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss3-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; @@ -6094,16 +6147,29 @@ gpuss4-thermal { =20 thermal-sensors =3D <&tsens2 5>; =20 + cooling-maps { + map0 { + trip =3D <&gpu4_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu4_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss4-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; @@ -6114,16 +6180,29 @@ gpuss5-thermal { =20 thermal-sensors =3D <&tsens2 6>; =20 + cooling-maps { + map0 { + trip =3D <&gpu5_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu5_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss5-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; @@ -6134,16 +6213,29 @@ gpuss6-thermal { =20 thermal-sensors =3D <&tsens2 7>; =20 + cooling-maps { + map0 { + trip =3D <&gpu6_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu6_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss6-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; @@ -6154,16 +6246,29 @@ gpuss7-thermal { =20 thermal-sensors =3D <&tsens2 8>; =20 + cooling-maps { + map0 { + trip =3D <&gpu7_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu7_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + trip-point1 { temperature =3D <90000>; - hysteresis =3D <2000>; + hysteresis =3D <1000>; type =3D "hot"; }; =20 - gpuss7-critical { + trip-point2 { temperature =3D <110000>; - hysteresis =3D <0>; + hysteresis =3D <1000>; type =3D "critical"; }; }; --=20 2.40.1