Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp475654lqo; Fri, 10 May 2024 05:59:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUf7CWX9eg2pu7VF5Szljv4VAakg+7RvfY2p8FJEed9wOC4OMopHsrPG/9Anl9wZrNDy3QGRfO7A59pPRMOS9vC9dN2bkpJkpfC0+WgZA== X-Google-Smtp-Source: AGHT+IG9bHzUU+rbepk5ZbzU0bamq3yR3uyUn8J40mPCn5WMe/U2935UwaM2q8M62wQExqpbJW2e X-Received: by 2002:a17:907:7845:b0:a59:c728:5421 with SMTP id a640c23a62f3a-a5a2d678729mr159044866b.68.1715345949538; Fri, 10 May 2024 05:59:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715345949; cv=pass; d=google.com; s=arc-20160816; b=qiN/gRSrbEkRZVcoWkJ/riACznzn0wDIRyDLi7EIUcq4IaslkbqG8gXE1WJajf6OFe hRTaOT/rLqtyaeYSFa96zk7WU8/8EU9jgc8Aouqd6BT/jJtvRNur7sXJrHHUeszD9Gu+ jXP9B/FVBIm6F/ZOEUPXMjlPaMLRwwp9PQy4lQaCZxTHaYdeJxYl+jSY2NeBfulRiMrS hnUCZHYgbqBW8oDdZu9rTPOmHHy5amjPNBq1WxQx160WxhzoydRNHS2HPgkI0y4E48bO rMe+hOpNEZ0+boA2gmBs6bIa1IKY3XIW8QQmRCFjUvL9LjTW9UpgimKRxtQtFQCKHdz6 8fRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=UviVANTDt/5uiKFqzI1mLhTEEii7CuMYYu8FBGQXpBM=; fh=lSuzoo+3BtnRNVV5hVPOSGHf5Tnr+LcZahDbc0fVuEk=; b=SnVfzGK4Kh3EjQdpi0I8iksHDndbl59KlTIYPS+SKP1maVeMDu3D7zh2WEq0LBY6pF 8JNQzRknxmI/IgT0ixKrXvGNzfQ12euzkBpT0cgri9V+Ab70jyewoqZ3eSyinru9+aIe I0hkIN6CQgW4R5jdPDFdOUFh6G5AI9NitxZrby5ZzT2lToqHkL1ETYvJD0Q2E17moDu6 Zam69ljdSxdBR0X0X1toFAIaXkM1R94IDAbqjWrkjEsOkQMdHXvttGqA8N0rWt9LMYNF inKWZ/v/+Zc4XA3WGkQZN2PV0HIFoJsgE5+mWB91o0gye9UOQg378ZJ1IKYN1m5Gj9Z7 kqwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BmHre4/r"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-175798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17946294si200036366b.55.2024.05.10.05.59.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:59:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BmHre4/r"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-175798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 474361F25CED for ; Fri, 10 May 2024 12:59:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57D57127E36; Fri, 10 May 2024 12:58:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BmHre4/r" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 E6D2E128386 for ; Fri, 10 May 2024 12:58:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345921; cv=none; b=HjPPS+diyBY4OGP+ss+DH5f062IO1VK1Hgg4ACPFzZEAiv436pjpyHvZ/11hInby/WCmpwBlnMZ/M/0GRzMmavf39hUJGQ29CCcgY+7k7Sg3026UxOSPLnJkPPsUlSnfuK/tXcAAx+U/iTkxETs/1apAlbbN+5ziSPVliB/3mus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345921; c=relaxed/simple; bh=U1sZM6crvXzNr36TY4xzkTtToIbdblQozjw2mMpBGo8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WWkyTZKOw8oXAkwQsW9a86YDQfGb5GT3zhTykZrZ/aB+RJK1MlaB7otMGBcTMNpDB/FwZ7ZDLWq0HPTvkIabX0kXgQZs9dT3pq79r5rk2PG7uY6j6rSJmhsSArQ84jjJlVTnJrAM4udNq17Mp6w5xf3Y2XIUvnvvZRqerbKnOJo= 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=BmHre4/r; arc=none smtp.client-ip=209.85.218.50 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 Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a59a17fcc6bso483007666b.1 for ; Fri, 10 May 2024 05:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345918; x=1715950718; 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=UviVANTDt/5uiKFqzI1mLhTEEii7CuMYYu8FBGQXpBM=; b=BmHre4/rsGV/BTj4++sBLtAHnj/KrXw2W3dk2k7Mm/KRWb9lJjgmCwcAbCWLIUy30G kdZovKYJCcYtiQnxEmMJGiHQXVDQVBYZZMJY0942YAJdxXnEHEinjrAAgwttt3SFgPD4 yXGhBx65lJ7p8ZlGkbEfGPVO62JXbm5v4xXZG+fKRpL3frA9qVeepcWhp0QhvNnhzx/j 13WgDseb+v+TV4GjUGJxWR5jZqPIGhtib4rqqlW6Op7zaWSlUjMT1ap5AQ6JKNVAoOuK bKzgTszggMcMajFaEVLMyYmRPA3MXhTzOFD2wYfSodSbu5Q+tTSqY0kk30+mnxigyM96 Ykpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345918; x=1715950718; 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=UviVANTDt/5uiKFqzI1mLhTEEii7CuMYYu8FBGQXpBM=; b=t3/SgCgp2Wz2zc/qfnsfB12UdGXmVJgwbZHot6x8m5xCDfVoSoFnT9uyJnxiX+Ns1m AHcweVoDxt1fg1mzYZJOi8pE4j7NOX9zxCUQJ0IkSwS+qjyY/S3zQjKjuL9pxzE6WUKb 8O1qRpLJE/xJnIUb9302qz9pANBjhcNSX+IMsZN+NL+qzM+LperuCJ9NkbKHpbVmrUKa fe8sadiFZn5cMn4JuZ0Oy/YzCaxbs15cBhDXw3b+sHCMrSUn1wlh3ujhkzWWzdHRYgW6 dX8j0L15Zgik8s12b2wB8J2e+NJuOxy+k6N+Jfb59kGXV5us2jDMfAsgPJjAfEZYRzpO G1WA== X-Forwarded-Encrypted: i=1; AJvYcCWU2jg5K3aCHLwlFADknj9ZgzyilyISPNF+OK69OhNMBIAMjOb8dtLnKPcvr9sS40avOl07+Oeo8YjDJMGFE1wEbMs6Op9ZkzFKCqiP X-Gm-Message-State: AOJu0YyEl9DPec0Przj2nokJOK6faJzzoHHocIA3MtGCO5VlrpK8mabI 5mGbjpbODqVmbI8ieZNbznQVXd+Gce+3MeVLjGydemSg2+n1NiFiPF2MjOjK9OJUt+F6FC3VlAz dRz0= X-Received: by 2002:a17:906:194a:b0:a59:9b75:b90 with SMTP id a640c23a62f3a-a5a2d53ad53mr177181566b.2.1715345918269; Fri, 10 May 2024 05:58:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:37 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:31 +0200 Subject: [PATCH 02/12] arm64: dts: qcom: sc8280xp: 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: 7bit Message-Id: <20240510-topic-gpus_are_cool_now-v1-2-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 with 1C of hysteresis to ensure the thermal framework takes sufficient action to prevent reaching junction temperature. Also, add passive polling to ensure more than one temperature change event is recorded. Fixes: 014bbc990e27 ("arm64: dts: qcom: sc8280xp: Introduce additional tsens instances") Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index f63951186a5b..65c444cce00c 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -5956,10 +5956,25 @@ cpu-crit { }; gpu-thermal { + polling-delay-passive = <250>; + thermal-sensors = <&tsens2 2>; + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - gpu-crit { + gpu_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <110000>; hysteresis = <1000>; type = "critical"; -- 2.40.1