From patchwork Fri May 10 12:58:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 797057 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 78C10127B77 for ; Fri, 10 May 2024 12:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345921; cv=none; b=ANOPnInO076lIGKJfydh6d9bH6XfNSNon9XqBGGv/ryQEH3FwT5x2qu5qwGxj1Gmg3vZ27R0XTdIzSBPvRy6MWOp8WIp1m+YIxYKoeo35DPqX09yEZkD0fqBdT6yz/UOPgB8JshzTynbS/eqs0mC3JXfH6mX7us8CNyOBuSOCfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345921; c=relaxed/simple; bh=+hBO09VnCHm9VUUEnYGXn9/ohn2w2P5q3w4yWPS3JP0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bcd5xjp+GyoJKNxRZoMCfHA5JU6cVBs3KQc7os5mTVS70IVPg/NrS+ks9oleDLsDIYnIcRThPrNKKvCrLCHysGEUIKQLk0UEjycKnIl8MEDiJW4mQ1+bGyREH+cS72ycgwk4CfLrgjYEn9Oy/s8H9XASCRpMnZK3RQzLbL/Xk7w= 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=Gq2yq+Ns; arc=none smtp.client-ip=209.85.218.42 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="Gq2yq+Ns" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a59b097b202so467297866b.0 for ; Fri, 10 May 2024 05:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345917; x=1715950717; 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=RtTo5y6kM/M1KKRuZY68F19Ec5TCfP5qx4+TJLYsHpE=; b=Gq2yq+Ns76zT+lvSfvzr8HzDCMrZTvMZJNNLIu/v58TW6KViKou9cXnjEXurnUpnq7 OdAJv6i9HMzKQrpmvzrjSn//uPnMDO7ZpL7F3iA4T/+DTTZDR4qJU8Py9LY9o/M61gwK o2z7ctgHiUWY+pg50rdNWK70mvp59D6cuqWYeA08Tf+OlLOW/mrTiR5J26myBzEMEsZL C/kp4qyVsdgdV9j4TpuFzOesiRKKdarlExvqw+r23EA+l0SVIInsu7qXJKofQjT57asY Uiaalrw3o1eGkfKQJLs/ZZAcgr6HAaQsePqVUhSAMgySj1sDcvajd6w7MhiaklZojZEz 8B7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345917; x=1715950717; 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=RtTo5y6kM/M1KKRuZY68F19Ec5TCfP5qx4+TJLYsHpE=; b=QIC1VXDk2OzY+eBzEI/KM6Oa2PnMSgRhohNDkVdcqzRulGeRWUe7B2oMed62jOh8AN 5MPS2TZburCUmhDHJHIwcZiBhn1M4R8Vy8/4jWj7QRRbY2SDC9/0Qe2nGVYdMvpAlPtp K8mU/wqJ9Bc9t92rTspAAUHm4rxJqhlQSvNpW+Fa9Y7iRHzQDDNQZYd4Fm3ZEbyfS4um QdU8HrrBkqw64jgbzOlnYs+okYoDgWvVtpzgCIR6IZUEF2kLjia4e3N16BUPbwQ5GF5e D7hkuZ1HhGhwGnYi0WuZ85DkvrBeUey45pPtjYmBquDRDeoj9qejl7C3zFf87xf83mYB pLDw== X-Gm-Message-State: AOJu0Yw+Pg1mhZxKh38AlfHlcO6Xn8rk0kY1sOKWgwF5/ruh5454GhNC Azetuxlpb+9aKIxpTkCvXYWUvf3k73Dq1rfWYAZqcQOEbDEEzfFwwKR0TgEH2+A= X-Google-Smtp-Source: AGHT+IEEqYn9/tuFqFQ1H1nKhLJKHexkeLgg3g5zX7HsfbpiPvw3TUSny57aso1INzM/xI8+sDhsmg== X-Received: by 2002:a17:907:7b8a:b0:a59:9b8e:aa61 with SMTP id a640c23a62f3a-a5a2d5c9303mr195736266b.35.1715345916998; Fri, 10 May 2024 05:58:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:36 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:30 +0200 Subject: [PATCH 01/12] arm64: dts: qcom: sc8180x: Throttle the GPU when overheating Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-topic-gpus_are_cool_now-v1-1-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. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi index aedf2e7db038..699f377e94d3 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi @@ -3993,10 +3993,22 @@ map0 { trips { gpu_top_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <90000>; - hysteresis = <2000>; + hysteresis = <1000>; type = "hot"; }; + + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; }; }; @@ -4140,10 +4152,22 @@ map0 { trips { gpu_bottom_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <90000>; - hysteresis = <2000>; + hysteresis = <1000>; type = "hot"; }; + + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; }; }; }; From patchwork Fri May 10 12:58:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 797056 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 51C54128377 for ; Fri, 10 May 2024 12:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345923; cv=none; b=efSZ0woXbfmXRs6EtMjHh0lwFP6aIOLrdVGSVeMUPA7y2NmXcDym1RP0KpsURD02KoDGYNzfeYezxvrYw6uap1tij7NdIlnOjjFjzrK7whsiz7Ri8W+dgMF0goaSuMvvJVn/Zxexh8HKyyzppXK41LAMKh6gUx+3GSJEmrhkC0s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345923; c=relaxed/simple; bh=xVhNv64UVnKsgiv5jGfQjveKNiXOY36HNZeDOAduTEQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sttwVY5I82h19dbxJLTnCUSrtDcPqy/z6sLO07kmV95hqQ9Cd+W5s+dxc/rz8m7sZM1S6IKbS08jtew7WMbJH0UANpTs/SGqTMEUQQ3dC/w2wEp3j9X5Xr8g71Dhu1M2R3jKE08zC8caA8LKSGzbTs7OXFBceHM4fxzhMbDA7NY= 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=PvrJTpeL; arc=none smtp.client-ip=209.85.218.52 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="PvrJTpeL" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a59cdd185b9so549622866b.1 for ; Fri, 10 May 2024 05:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345920; x=1715950720; 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=omxBI0Bjh6xff6OPmVoFkepIHS+IMVrSRXQYKvKXjaE=; b=PvrJTpeLluf8xx3uvHv7x8bFwliFB6K8br4b/Wcq3idr+9eE97IMZV0PbJ7YPnJ2rH IRMzHRova5OCXDTbCQvdD799/qmqnzeWMLQBsalNSTrMthirsukdw65Z8PdZeTRIVsE0 lDqOILK9irljJpG+YqCyFPc2RMI7TWwsXq1wgVk0SqQW71qsZs/khMaJAKdbipdZoSmX eptQmexRKtP5PzHO5w6LFa/hqqLRagwkDuv6S3c0CM+YYkKZDiljvdGSglNS+jLXqiW1 mu2sgU4QQhJGCN2Lye7FkyorLU6Y3pcAAMGjIU+cqKi8P1ZZMgDYrLl2zXqAQHWxLhyU Pwzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345920; x=1715950720; 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=omxBI0Bjh6xff6OPmVoFkepIHS+IMVrSRXQYKvKXjaE=; b=ZKLO2nIupDmjO4ybS7NZnsh2lLgx4kZ1ph1/r2DsDVqs3Vm5jrC33uP+zcjbfL7maz 8oN1/u5RBV1ly9q1mWSZIyeO0H0tndaDz+3TsLUlebvn50SOJMLqWjCrj3/oRC05pGLP 67KDNbh9TGGDeTDZKSdBq8Sd8RRLi0k++SH741xOGHediEmNewYIrA7DElCLxAn2rjn0 lRG0igz5KZkdlucUnzZ55qUGd6GPhkfbrlmSrhmoJcBYOI5NLgAUD4qq578Oj1tuX/ZV QiGi2ZuVpcm6v0yw3/3gUcbfzXU3pC/Cux6K14XpO48xKNDZnX/hk0t39upw0qsfwkYz 3Lqw== X-Gm-Message-State: AOJu0YxVOJiN5uOsOnJ8meSZdLgsyT7ARYLEDhp0RaS2zucpJyMvNeMZ iLClcnMzlPE5c4+8Gc29kkzVKkuLJgbIa1MZ9+PkNQQItCAAzlXqOOJGBi75pxQ= X-Google-Smtp-Source: AGHT+IGBZ81PpSvhLXWY35xj34kyxu+JRHRYjscx0vV2EGlV3rjYr9X26CLoLN8bvTWU6iwx3PT1bw== X-Received: by 2002:a17:906:f116:b0:a59:9a42:b7de with SMTP id a640c23a62f3a-a5a2d31702emr209323766b.36.1715345919812; Fri, 10 May 2024 05:58:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:39 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:32 +0200 Subject: [PATCH 03/12] arm64: dts: qcom: sdm630: Throttle the GPU when overheating Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-topic-gpus_are_cool_now-v1-3-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. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sdm630.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi index 7702d42e82c1..a46dbe725e54 100644 --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi @@ -2582,10 +2582,22 @@ map0 { trips { gpu_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <90000>; hysteresis = <1000>; type = "hot"; }; + + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; }; }; }; From patchwork Fri May 10 12:58:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 797055 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 6D38712CD99 for ; Fri, 10 May 2024 12:58:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345926; cv=none; b=pK4O1zbC/42vpp4iY6cMs1YDay/vgZ4qtA9uorflyBff50pWIGJ/gctjRIPK59htmyxR1THZKtM0kWgZUr29wQVX2G72lhN+YelDu9+V9loqZqkyNzW0RSx+G91pHZNdH6ayXnf2OQQy8rYvvCD6M6XFJiH1KcVukTylXRla9g0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345926; c=relaxed/simple; bh=xr4WOE90b0yFT70mlWTOrZUkB4FzmYThMvJB/hOW8og=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ItN2FT4d/+aD6yoAxULod2oVpPP1DqDWyAppHZrkgSboySZCIJsxerPoJ8f84ytKtU0HedtLz9+6vmQ6qR3MwTpJXaYxXdn1J0L2RdCy6/bo/XkBhC6ivzfzy8m16eSXxs2704+tXOKCotq8h+t97Hg39/otiTLuvz1rs/Ct190= 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=DUV9Yfud; arc=none smtp.client-ip=209.85.167.45 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="DUV9Yfud" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-51fdc9af005so3215164e87.3 for ; Fri, 10 May 2024 05:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345923; x=1715950723; 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=OCBtongGKMs+efoOjSpIIFMYyV9OANLuyMGYx1s4Pl8=; b=DUV9Yfud8E0o1IPy9ww7n1kge1KStCDFJEXjML469Yu5FTDxm0i/x7uGd+39GGQ9QZ T6sAX2rnzLM4Sl/tnyBgGRlSaGJXpdpKqr57G+IvDb0ZprNLj5OYhlOmTYGN2OtoA50i trdBpux0MNVi9ubugp2gHQyWUxIC8kts0CxBfbH0YRB72cXDErW69kUWGKxlHR1fNcES DHSI8lcpPwacyv7JAl7adkfhcZobWc/GCaBwme5qiZ6XYVcy3nNF/3USdrZyk6s62dIC 2YE6D1GhYho3a6yEVJ857DuFrxP3okPGrYaVZO9UxGhb9IhG0Xs0ESGamdyOhyv/DWdL Y8mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345923; x=1715950723; 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=OCBtongGKMs+efoOjSpIIFMYyV9OANLuyMGYx1s4Pl8=; b=IG0fbUtR+ZGds/AoJSD/7QLYR4ORFd6QtXHwdaopfDQ9yuPTTnVQqspgANSiDakcb8 FjLnqW1Kck+Bn26ZXbbNnwAbpG7xVJiHvGzMOfIYPbD5g+H6qg8BsqSu7Rd8njUto7EV ayXYyhNgO08Ye6j6Y2oPaLbfjqJDhphLsQhu40Uka5tRVKNgHO5bGY/hV6FP22JZTSKg XFadNyRQvoYskd3DTHxxVokRYGB5DJ78jrLRYhI1YGPfVm3K/SKkAwN5huJVbCNrttPn zJgITQtir1kAFGEaXUCyB4M4JFPXqoy06Bwp6YyWEXKHBm4D8dvCwSicbgV8jmws3HO8 946Q== X-Gm-Message-State: AOJu0YzYLLZhEUFNUZpVlxsy+Ch4/NrJwCF4mZRv5Ni+ByrLbv31NMYR OcI66mxzYtj8qN0uOyJxVaXE9jHgWz7l5KoStU2/+muIyZvVE+vYje8FAN7qMU2kVbe1Pj0++r4 YGDI= X-Google-Smtp-Source: AGHT+IH+YN13W0D8aUVsryu7SpYiRt5r1DezyR4hziV4BMefqRfWNCNwspAQXdw4tb+xT2vetrmyhA== X-Received: by 2002:ac2:4c50:0:b0:51c:d1ac:c450 with SMTP id 2adb3069b0e04-5220fc7c5camr2948565e87.10.1715345922740; Fri, 10 May 2024 05:58:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:42 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:34 +0200 Subject: [PATCH 05/12] arm64: dts: qcom: sm6115: Update GPU thermal zone settings Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-topic-gpus_are_cool_now-v1-5-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 Lower the thresholds to something more reasonable and introduce a passive polling delay to make sure more than one "passive" thermal point is taken into account when throttling. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6115.dtsi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 0a0bb5310849..afa08dd0dd69 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -3323,6 +3323,8 @@ trip-point1 { }; gpu-thermal { + polling-delay-passive = <250>; + thermal-sensors = <&tsens0 15>; cooling-maps { @@ -3334,13 +3336,13 @@ map0 { trips { gpu_alert0: trip-point0 { - temperature = <115000>; - hysteresis = <5000>; + temperature = <85000>; + hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <125000>; + temperature = <110000>; hysteresis = <1000>; type = "critical"; }; From patchwork Fri May 10 12:58:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 797054 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 488AA16F0DE for ; Fri, 10 May 2024 12:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345929; cv=none; b=QSQPZmZOLvdjmLbGgmAGTdAkyfBdhJ5WXOpVvtcmKS1FuwAvaWEFUDwQND0oSAFVOg7Rk8JcW1vas4e7kL4wERLB8hRARAcECnsZT2nXqY4kHRRYrAGdOql1qyT9JvZv1tuJLJr1J3FwAiOy6hoiyqc1hakqodFbBkzfIhdKGkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345929; c=relaxed/simple; bh=N7Z1UTqSXat0Px8O9Bf8HVTVlZ48y7r+JK1PVbiHrJU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UWiHGpT+17Kebst97mjQ9kBpJ7gxzAUuVNyMpYSF1hy2GV5jV+yVj8k45mVVL07eT//08PqfvEvlSCIKgx8awX4ub5OVNdFrN3YC+ai9lMP+nnI5U79z0u68+2Lo4yVHbr6bIR6Hvpv2qUHEhoJ//+FyDactjSQWHvbII+jhe3w= 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=d9eMkWgt; arc=none smtp.client-ip=209.85.218.44 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="d9eMkWgt" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a59ab4f60a6so443821766b.0 for ; Fri, 10 May 2024 05:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345926; x=1715950726; 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=+kvJ0NjI9lgZVfze2m0LNfaiMKZki2itDXIFFMMddwA=; b=d9eMkWgtaoLPS6D8rTcxMY2AykfIJ2xWB6ndeQ/srWHyVgzmO3oNdQljJOfdL7uPZy RkylE7JqD4Z/gFS3AixhvLxpRSE6gs26gPdFyKb6djl+Oz2V7T1eWlUxMCpGYluRcNgQ Q8IFtiYXsM8kLwlmKbKwnW4ihyXr9vbwL8DDXcSgvGxhx5iqLLmxRAi3yzEY8uv4m7D9 bvZo1LfD9VyRg4QLJXuvmX1Pt7Q4anR0LkpY4F2HZHg9b2Qa+mLrjva1Q+qoWS0BuSm4 fvDcP+FRErRyUXvet91/dGDcjymLrcNloclZc16vJxigbCkANHKwUP9GBwMwG4Ifz0Em iluQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345926; x=1715950726; 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=+kvJ0NjI9lgZVfze2m0LNfaiMKZki2itDXIFFMMddwA=; b=cIf9d1yoQUzvutik0kxB/x2t4ZWxmcn40AwsOJ9cIDgRDb77rd3dIYxvIMvq8NWenB 4gI4WVnvuBGXzv7SGDnLQxlPA5S8yAlMfTsRS8Cx4e9tijuzB0kYsm/4JLtAsJD5cFOe 8VA+lqrSBSvDIKOw8wyquOMhkjjDiWZ/We/cQc1YBsygQx07dagtUCQ5JFz6sdBI5lOd /Zf3Aul+hhl1eEBLJahrDSIsQLG/v2c12oUhmYv5DwWp7ihrRQZYsm7aRK4oyPsQGwbA 6f6JC+B5QmpSxg083xM5aY8gjpC4fLNa1C8rT6Wf/8wfkL1/Lz63UJk8TxAADVJ/ZDEJ fvBg== X-Gm-Message-State: AOJu0Yz2PqfwoVwbhpANLo9l+jjz5/Hqz5vuc8qrPJhvrpYSIosrr/dK N3Amf6Fa0Y9MZZa3TDH3+aNMDdVJtTEv96KfpaZA/LAyqeNU7VyXtsL0u4foviU= X-Google-Smtp-Source: AGHT+IGalolyTJ0z7eOceIS7ntIwx3MY/OTBAactA6M5X3a/KbMMqJ+6bB9q1BJKjSHRmADdQNoQBA== X-Received: by 2002:a17:906:1992:b0:a5a:15f6:157e with SMTP id a640c23a62f3a-a5a2d53adcamr235167766b.11.1715345925757; Fri, 10 May 2024 05:58:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:45 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:36 +0200 Subject: [PATCH 07/12] arm64: dts: qcom: sm8150: Throttle the GPU when overheating Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-topic-gpus_are_cool_now-v1-7-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. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index 1f597f03107b..8e9194051283 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -5157,10 +5157,22 @@ map0 { trips { gpu_top_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <90000>; - hysteresis = <2000>; + hysteresis = <1000>; type = "hot"; }; + + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; }; }; @@ -5332,10 +5344,22 @@ map0 { trips { gpu_bottom_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <90000>; - hysteresis = <2000>; + hysteresis = <1000>; type = "hot"; }; + + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; }; }; }; From patchwork Fri May 10 12:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 797053 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 C42D31708A3 for ; Fri, 10 May 2024 12:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345931; cv=none; b=S50o6TRe3ri+hWUQ3L2InRrWXCHDxMLILI9YHeg2qqc9hWw3poWKRnAqvfXdgYCOyf1ha2wY4ngnw8vDcjcoQtR0sYrB5FoaVyRIUlfTY73jZawSTKiuaxpk5PtaNb3t3ZiMgYb1HLHoF8BPrXHfyg+9D6C+JRYiOdCT+kuxS/I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345931; c=relaxed/simple; bh=M8G2mN4TaffnfNOqtxWoho4eYoLY7YRmtFMMoVV0Cck=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ttg7BNHVTNAo1oUo5LOLYP2gNPJRJWgzdFqjF3Ps6V/+ZQPhIOAYEZj0b/p3vQ66LtNgudaeidxWNCcIxbfazb+fS9vqaApmrpDnctDAL6Mi2vCy2ERiIzwqM4igmYV20xVp+g0oy5+OlR8YpJ5kLad4nnCbR38oLmRlAivoy5Q= 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=wLqRh2Zw; arc=none smtp.client-ip=209.85.218.45 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="wLqRh2Zw" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a59b81d087aso500362266b.3 for ; Fri, 10 May 2024 05:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345928; x=1715950728; 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=REOe2/rSmMpWIuGPFH1QLzss9p7iDlF03Wz1gvDMeLQ=; b=wLqRh2Zwo5rAoi6K76+WiC37pSaDINzFaw2m6kbOMtsu5MHXlVqrJcLuo90hzPunNs +Rk9dpmda4lGaM2EkLJNQXBgS5GjZ+abmp3l85FPJy1D3mLl+P7W3saMUj/zOiWOR2MB 5lvgVz5ROxMGhAhF+lILDbjRNTexWSEc2lHkGWrNmKFZx71wqdj6MqXAW3zS8VVrVkA2 H19z78kgG6cKnm9bUEGmfI2HgxWX5IlFcCEfVUlN6mv48m/7yB9SwMqMKdYEm4tsprOk DHOJ6HMEr4lQt3x4HKcf85OxUJRBZ97EDwEnu3tUOrXuFCMsIHvgaBgeK1ARuLA4Kk2w Zfrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345928; x=1715950728; 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=REOe2/rSmMpWIuGPFH1QLzss9p7iDlF03Wz1gvDMeLQ=; b=dTbkZu12IGzmrAjOszETeqMcMzZPRBGxc51Z5bcTEtZRHuSsybw/rcEXE7dFKKVgOn pRIXEzKC2ROtsMnlQRwLxqUx7b6u1H+330pOtqoACW5JDzM8+gvhpqxZtePsP+5iE1op aICnidJ5CovT9WvcDVOu56YqkVBwqSTAbISXe9ALnnMgf0CfU5yVVPD3n9xJZN5kzUnB FprxRXZ0ji16x+NBnotBZ5gLZxduKYwF6AzrCOWjKdnIVKmZ8s/MZP4kLv5ySIYTGZBi KOqID2oLbXYLa702OOVR7jf2zG3F5cV5eDrO8gE2r5rG2zHgs0JALjku0sxgVU7HVtby bD9g== X-Gm-Message-State: AOJu0Yz0uwFCl+PviqCI8VVjUXor85Em3Byd83p94K/M3XcICGYFiYsD K7A98ppjT8UpLyl5AStXqRbMhN1qK0VBLkphk/Y+/W72NhX93k5pc4zgJDr21kw= X-Google-Smtp-Source: AGHT+IGmtosNKiZsmXipclDdUMX5B1eUzYiRvXVU4iJIo/8nky814hTE0SkCNKwjjcTbgLPK0VkdqQ== X-Received: by 2002:a17:906:1992:b0:a5a:15f6:157e with SMTP id a640c23a62f3a-a5a2d53adcamr235180366b.11.1715345928254; Fri, 10 May 2024 05:58:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:47 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:38 +0200 Subject: [PATCH 09/12] arm64: dts: qcom: sm8350: Throttle the GPU when overheating Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-topic-gpus_are_cool_now-v1-9-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. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index 526d3c92eae8..94782180bce7 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -4259,10 +4259,22 @@ map0 { trips { gpu_top_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <90000>; hysteresis = <1000>; type = "hot"; }; + + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; }; }; @@ -4280,10 +4292,22 @@ map0 { trips { gpu_bottom_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + + trip-point1 { temperature = <90000>; hysteresis = <1000>; type = "hot"; }; + + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; }; }; From patchwork Fri May 10 12:58:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 797052 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 B7FE712A171 for ; Fri, 10 May 2024 12:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345934; cv=none; b=JwEKuRZOesbMxSIw/qC6O0fMgtMRC5Z404NnG++ZCG4RHpqLgzO40mZFpBfB2W/r1eBpmLQaYkQOzu/jdiTd8dwMPHmgs0wGpn8mJG78I7GMR2b9ZkDbqyUY+zh3VUZWQf/a3J8qUe8O+wMv91oxgUhLTy/lLg5DlyX+80VxJfU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345934; c=relaxed/simple; bh=mpXEdYIGFNmeTr/UviAkCq3TuhB6htqAviYK4ZRdST4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q0pTVi0Dblkj1bM5jkkHi+oK7KIYN2RfBECo6hxjLuUvA4B8GIe/OJgG5jKjeqHlariI9Py67ox9ZyAe7aBpo/VTu2bFd+D7Fi/+nUDPGovizTaiUlglv/PeWuh2tuYeiw92OeC4kJrMC5aZY0jiQIip2v0zQFifez8lA9eUDmQ= 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=j3jLTrDQ; arc=none smtp.client-ip=209.85.218.54 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="j3jLTrDQ" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a59cc765c29so447050366b.3 for ; Fri, 10 May 2024 05:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345931; x=1715950731; 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=O4LbWL7pMtjLjzOImlyCMR2kJQmPr8y/+o1GWcjQzcY=; b=j3jLTrDQe6VOuAuCGCEoheWGCXxCGtTVffDaxhsFqer6Lm6bMLf0EoSqLxUo01frxc VqD3OUb7zQxVYPbIUKGPWrkpZ3veaMjAuihExhQIdH0A/VcjwsnBTu2JzTtz2RRfJKFw MFecPqzuWabJw9ICaXKwzfI9AdJzQBnV4OPtpjRTSTyfJQbj7tlcAw4jWtlgrUDwAdJr xyeZiOXeLvvjXkxCHR/DLftgqZkF0EM50gzT2rPpSscCSiFmDgO46SeQ/ymJSfySePEr zSKu4eZBXQE/xQlECCzscBlvsVPrLsHD7R706WzhGjHaC25j49fn3EUsJtzDc1er17Zh 1vhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345931; x=1715950731; 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=O4LbWL7pMtjLjzOImlyCMR2kJQmPr8y/+o1GWcjQzcY=; b=K+8U8+lGZrCm4VpRAZvTgpQ7stK5Bjni+CzAGHUlREX2IacALJwqc+p0VMv9ol1uDh nDgTlJr2hS8MRjpIAZ6iazqI2Ow85PnjOC9L7ujnPOEMz8OuymebikF7zwWMboQd3Dz1 NSKe2v0ipFR9Pg2nEjiDKiTXXIoXg4dJFB2Qx+/ewEkEwPVp2rZVS1mP+LtQObeWEutm +j0dVHq8UWoRNkIvBoi56I2MfQgQtcfsjxd16p1cEJ2eWCTXPLNdZIej12fTbvIejh9D GF/zD3iguS9BNfLwSkBoRcWnrAGPZ6AA1kiVkPuzSioN1sQA4B/NsV6F7vNQsJ5l4wpO hRYA== X-Gm-Message-State: AOJu0Yx9BO5ynk4ubipshpu0LeYQRazkxm+qzVe/b8vJwlJuXS80nrBt TU0XKIkYAgerA2xsCqIELsz8kh1zGqhe9ezRzr01/v/KroT1mdN6EC46o4cyqeU= X-Google-Smtp-Source: AGHT+IGI57Bi1n2fSWaj3BnGu8+gLQ7UsRwbt8jtGmiWAX79UoN00c+v4fztEghOnN7ro8+Vzsqeag== X-Received: by 2002:a17:907:77c3:b0:a59:9db6:535d with SMTP id a640c23a62f3a-a5a2d67862amr168929466b.65.1715345931104; Fri, 10 May 2024 05:58:51 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:50 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:40 +0200 Subject: [PATCH 11/12] arm64: dts: qcom: sm8550: Throttle the GPU when overheating Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-topic-gpus_are_cool_now-v1-11-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. Remove the copypasta-from-downstream userspace governor entries while at it. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8550.dtsi | 208 ++++++++++++++--------------------- 1 file changed, 80 insertions(+), 128 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index 51c547872438..23f769a5b1d4 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -5367,34 +5367,28 @@ gpuss-0-thermal { 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"; }; }; }; @@ -5406,34 +5400,28 @@ gpuss-1-thermal { 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"; }; }; }; @@ -5445,34 +5433,28 @@ gpuss-2-thermal { 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"; }; }; }; @@ -5484,34 +5466,28 @@ gpuss-3-thermal { 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"; }; }; }; @@ -5523,34 +5499,28 @@ gpuss-4-thermal { 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"; }; }; }; @@ -5562,34 +5532,28 @@ gpuss-5-thermal { 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"; }; }; }; @@ -5601,34 +5565,28 @@ gpuss-6-thermal { 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"; }; }; }; @@ -5640,34 +5598,28 @@ gpuss-7-thermal { 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"; }; }; };