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: 13661568 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:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13661569 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 DA4B9127E15 for ; Fri, 10 May 2024 12:58:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345922; cv=none; b=WUHGWhT4Ug9bK7PXQ8ppfqCsQRXpO07ClBfh8Czkz6oEnroAwQPdTuRxfM8ouGKefpp78n/jnA1crHQhAXskzCMgnZBmzSa3tm8sNu9/v9/9sB+S4nMBvTSvlxqStA2rgMyn9bZL6YEI0owtXNGCmR9kvpJojk5DU77QxV9XHrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345922; c=relaxed/simple; bh=U1sZM6crvXzNr36TY4xzkTtToIbdblQozjw2mMpBGo8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lUUkmmiVo0P8/eElnEaFMVUxilHcMO44+ppYiO4pqepa2bHvIVC+9McMKwtHCysFTAosP8JT7MzZ+b956wjRH6EiUeiNn2dTil+FfBb03+q3ZByg/7V1cqR7jVGuta/P9iK6iIQDHmbm0ioOpvhAoP+AHtzFYjwRj7QSJOUhrig= 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.51 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="BmHre4/r" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a59cdf7cd78so512055866b.0 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=ELp6j3TGYqMF4E+qEC7ipx9bl/k15mUSTYUuoxEdLYzSwKA/2Am98sVLq+eT5oxu3b CtNgjDEGxrHhB/P8JADK1PBgo+Pyx6i+M+ySEhTo8ak+8qdA34+OvHnpgtuSv/LC8n1u 1YMmQKU/HU8hsKqO3hi2isu0Z2EUqGgPs0O1xM7Icbs1CcA+A7cOEO8AkIWXuBsK1fyq qxM3AP8amgi062GHoac5O7UcASV6sb1z65r3GNZTEiyntgHxSMX9a7eAQFW+ls+LRqYS AFgpr3LJGSgO2ht5bWqBR+Rq6FpM+Fz8v3N2GMc3KLA2KgLpitUzzC2xajcOMUr+kGiS i/aA== X-Gm-Message-State: AOJu0YwOpcSucOAXEK8IuKFLKsHY0+KyadIXmZJYyVApmVPl60z4rRVv uGO25dGRS+G4orVxNdtCD4tFgvd4Its4wiXT85iSdqWfJvrWiMof02CCTI0jqH8= X-Google-Smtp-Source: AGHT+IFftFdwrJV56gfgsr34xjkjx+Jjl7MXGjKOYrjcpGmW0lfjcSGDIRBYjrCWQu4RRSyGcWCE6Q== 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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"; 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: 13661570 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:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13661571 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 C632512C526 for ; Fri, 10 May 2024 12:58:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345924; cv=none; b=eMWK3dlXqm3kRL3pT3/1yUZT2w0gHAE/eEWS/trWPTXsWAxLBv7I/iJTt9FWVZuT/5CinCfzXpyktsOTCxD2d7cT+WEnh3hgjLNo6hFNoDeKddtzMegfWOPlgPiLuX8Tf3UjcZv3cp5D854dejY0DPTJu85Wj+z3FsGC0OXpotQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345924; c=relaxed/simple; bh=EFzj6Tk43N52U4aEkFUoO8lDb10sw/xNa2mWF4RskUM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BGvseTPvVsn6An52V4eFqCBVucpStE+6EIeS2tY2A4qxAVTW04SZppIihXk6wAjmFfvcafVAfSOqIUgzYByDbflvFzOJwKdSIVaOWI5n9QGfb+VOpeF4DZODkciLM6EwB6AIhqBvB3lUldJKaqf/GP8F+qSn6OumJOmAFeleWow= 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=OGBywj3E; arc=none smtp.client-ip=209.85.218.51 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="OGBywj3E" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a59a64db066so516674666b.3 for ; Fri, 10 May 2024 05:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345921; x=1715950721; 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=e8IcYMn2rhQRDvyV2qRDEDnniamQy74klUO7ny02ivo=; b=OGBywj3E8P75pvoytHTaTwcv4YNZ8EGUuPM0p6K9AvZrCP+XcEoKtzvOJQANRlAHFv 1kXlO0FGb4pFn6QzSYKPMtBMDy/P9X2o97uwz8x3cXPcophLbe1nPeesWPTDO9+zQoL0 CyTENni/yk9UrQQ6Tv8mveDhhQiFx/jMPCGscTYLzrns05NbF1iv3TcaEHBCRRxfRxbI CvSV2E1Nie5fBKaEDjPzXNKf3+gPdBInqZlt3h9kQ/sb/ttXazfMKn21KDm5Yq0qAQi+ ZbEANfgCDPlTejUTiZ0If5ducVhxjKSbFT9sqsX6/007s/SRt45bwRdGRjiuC1H5NZCN ARSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345921; x=1715950721; 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=e8IcYMn2rhQRDvyV2qRDEDnniamQy74klUO7ny02ivo=; b=YHVzNA5n/YSZta4LUxIC3UBedorBaQGX5i3TFR8+LL7e1+nEzuCPZ+ZUc8G64+oJqU L95HU1nAmmNLoV5rZE+zhf4y3kwNrVUlU5qGBXzBvmN3lE07KgKIvz/d8wACqduOLDCE zNXC/XIYO5mCOBs7ZR/GVK9p6CbnTZMYY91lTW457Ub8XnGa6xkRcN9EjJkKjIJrzk8I iPnioZb0eF39GqADtdl2xCgqH14JSiJ7U/wXvjRG8ms353Ml6F/KoQVppBycml6UBtOA jR5b6psd7nBZKVZ782UW4WRYswDIkx5jjekISUruC2YWxQxGd/BhbYUj2zGmcZsUpqWe vOWQ== X-Gm-Message-State: AOJu0Yy63lSIr+n4BZHXppqG5eCv8RuIaFy8eNC+PbK87Jmo4cZ2iCIU 04xFLua12rX+SHGo+BFQLtQEC1WQD9VuMO2+W6vhAoM87nz8vskstOE19kJr+Yg= X-Google-Smtp-Source: AGHT+IGbaZNwZ9rvGa7Fk+utzQGGqR12rPtV/31n/eaZ6Cr3MEIihnlCx86RwFxBR9LOXfahie7Oew== X-Received: by 2002:a17:906:6415:b0:a59:adf8:a6d5 with SMTP id a640c23a62f3a-a5a2d6786fbmr169034066b.72.1715345921227; Fri, 10 May 2024 05:58:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:40 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:33 +0200 Subject: [PATCH 04/12] arm64: dts: qcom: sdm845: 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-4-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/sdm845.dtsi | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 57507d6ec918..52eda2bb6b09 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -5630,10 +5630,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"; + }; }; }; @@ -5651,10 +5663,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: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: 13661572 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:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13661573 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 F248912FB35 for ; Fri, 10 May 2024 12:58:45 +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=1715345927; cv=none; b=pzAQiY/ASJ6KUH9TREhm1hXUUwrJ597XvUjI7tgIYXgVW+ZeAgzTwp24uN32kA2K22sbtRrUV+Gkf+KrUM8+8AsXlgZmOqbrAnTiEdbz1wxOsWTJVeyGsJZZnL1yAd04fHW+DlxIJUht2cx+wJii2JUV4I3h5XfmIvY3ZXGOYGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345927; c=relaxed/simple; bh=bRUdpwvsxjVEA+bEIQiwaB+/SrBiEO/590bU96RlLgI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hFdc2vjameUQ0iebK8Wv09UN+tqzWSt/t/RxzjLAp9Tp1eumWpFobWanGptisssXGI5NYupQizaUj96dKHSfFOQpyKFwROL6ml6aXkCsgDWJGXLjBCjuBoV2JqalclKaK7exjZnTzIbo8Z5MahV9+9OXZ1xyhsJn/4utkaoWdb4= 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=bRh6CPD4; 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="bRh6CPD4" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a59c0a6415fso570535466b.1 for ; Fri, 10 May 2024 05:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345924; x=1715950724; 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=Tv5Or4RfPJ0awNc1s7KQ9nHBJpQAMX0v2SVx0hn6YRI=; b=bRh6CPD4nhn8Q+FjDTxNcSuUg1zKmgfSdqStowhgu0YH9MPfXu+Av8EhcaZKxlwTU9 ZVcSs1GBIVP8fYcyv0cTGvhMORTymYbz0PDLaNsRGqIRtZFMgy/NQ+ZXfz/ab5fDeNmx iogriMiCGMszOJlOnA5aSdtuEl5F90nN24/82pgeiNMFZ/ayONV5L7CsnVMn5Lqg5flU vCxOzGfg2NagcMktkdws0r9wtQ76a4ozOt8vHtyoDraH+v0xZOoqbAL0zWfpEwBoMsZT kwiKtT6fTkFVxyqSaf6bSTYUlK3EErEbcqWKvcbbe4c+dX4RJ097gfZgpwNGpRfiApud rlYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345924; x=1715950724; 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=Tv5Or4RfPJ0awNc1s7KQ9nHBJpQAMX0v2SVx0hn6YRI=; b=ea2U79aQMDU3j1QcbD5YxMnCVM/fxW3UefGPjblyO/LR9agTT26QVdc54tXlzEUw4n jHl4nQIp+ihECc/ife/ftZ4ptYEgJ1+jVLWe3DSW91Pw7YlgvoG+7mdWU8oLq+4VP6Ez FvtJx3DcCDwEMfXUj6yJsgLctAtZKB7FRUBM6+/XcYRiHQ8CzxGKy9bl9BE5CQSyf8JP hlurxEHBktcsBelGVbd/2wIVgflkfEtct5br3kWvstpiJY2lBd5hMBFWKgXzkuwjTOja x8teIOuUsl2upt4OfebCLmtkHzMBWYB70CAvrt/FWW+SLA6qkH65yCywiTjMoIryq8vj VSVg== X-Gm-Message-State: AOJu0YxN0DelQMduUDIVAROvN2gQ5IeZSCVgRty+AQCyHkhDZWmG7OnF H6e7DbpP7nk8sbWQguivlro70qny6yQjyQqogCNmtLpo8oxA8lcI+Jg5nX7CP+g= X-Google-Smtp-Source: AGHT+IHD0lGCCIKmW6BWOHjW9Nj61cGVsLD6S57fVLRbgBMQdAoeu+mJwyfD2wrtNtlC6lofYf/JBQ== X-Received: by 2002:a17:907:7f94:b0:a59:ab57:741e with SMTP id a640c23a62f3a-a5a2d675779mr221351466b.76.1715345924587; Fri, 10 May 2024 05:58:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:44 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:35 +0200 Subject: [PATCH 06/12] arm64: dts: qcom: sm6350: 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-6-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/sm6350.dtsi | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index abfaa1178a39..99813f380df0 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -3177,18 +3177,20 @@ ddr-crit { }; gpuss0-thermal { + polling-delay-passive = <250>; + thermal-sensors = <&tsens0 13>; trips { gpuss0_alert0: trip-point0 { - temperature = <95000>; + temperature = <85000>; hysteresis = <2000>; type = "passive"; }; gpuss0-crit { - temperature = <115000>; - hysteresis = <0>; + temperature = <110000>; + hysteresis = <1000>; type = "critical"; }; }; @@ -3202,18 +3204,20 @@ map0 { }; gpuss1-thermal { + polling-delay-passive = <250>; + thermal-sensors = <&tsens0 14>; trips { gpuss1_alert0: trip-point0 { - temperature = <95000>; + temperature = <85000>; hysteresis = <2000>; type = "passive"; }; gpuss1-crit { - temperature = <115000>; - hysteresis = <0>; + 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: 13661574 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:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13661575 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 5E930127E3F for ; Fri, 10 May 2024 12:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345929; cv=none; b=EPiozdeH9FVYrUeweHcg56oEP2ciJWMW/rwEOTXuE+2P/aPAWp4Li7pN2QjOsVk5mcb9jmKwYbyebg2eqhSwrkdjHLYtxBw5zqgKs6F/XmuHLzO6s5oY5Ues6yFXb0HT90xTMRmCqx18UJ/yyl74q2pV4DdXbtPriNzKR2X5TCc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345929; c=relaxed/simple; bh=Q/00BRJkklPf9s3fO8pNKrRKTd5/TRA3QyfrOoaysZM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gTPz5oS6Iuon2+VQtwIcWkOOnVez1cinc+0Wdc47Dq32tvCsxPmLPq7EfRq1n8lYBssj5Bo8ooE8BQgc/9LJkjFjQQoABCu0zekUnffqhxnGqfEwu28Iddt41oZ3mEn62m2QfU8nE20bSX0YSp2DoTRRv2tpXb2zxDHTJMq3JtU= 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=Gh0cfRgv; arc=none smtp.client-ip=209.85.218.43 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="Gh0cfRgv" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a59b58fe083so475868266b.0 for ; Fri, 10 May 2024 05:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345927; x=1715950727; 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=2C/n3zrsGQEl/w7MYTYQqZ44jS2ToMDUKr4rl0zMck8=; b=Gh0cfRgvoDc51AgDGh47O4xreRJOUCfsWbOFbdN0tP4moabCxlN9ju1+PGvmnM/SuA jTIWNMygZBZj+Sze0WghWdvNPbKHYxc4n7Aso4SvRsUlnnKKzKJ/4BmAFkSSy2pds3hh /r/Lni8dfOzbtcSL13S9jQdAlg8TSFyQPj2HBHy7MZ6O3nGA+L9+9oeyOIOU6vPqk8CY A8z/NIHStS0ipluegbXnh+p75JnJ8mOwgaj0wSP1tsoPgrq/lIknfdPcjHAPQ5TxZZDy 5n5fJ8TBLsE2csF0ZHsyIW1rdq45SiVG/xlWrOiYqnhmP+2CQyxuAM00S9qwziFsPrC4 wfdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345927; x=1715950727; 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=2C/n3zrsGQEl/w7MYTYQqZ44jS2ToMDUKr4rl0zMck8=; b=va94yj7BzZn6sjrfwspYARLb0gX+ANw0qeMuHfmWt+7j6GfJnSYkfg4NOIMoz3ckPP sYgpJHAqcF/7MVfbeUkXj9YK7x0wQXl9n7T/r+kZFWPadvxfWDKbJKf1hwqYUTKvRSCI 8MPSQDaOMdXHlC2JcIcsx09wUJIcaQcyzYGoPbL5UvJ8eXITxhRXIbeN3lw65AjzAiz6 ofNVZCJPFwqUn3c9gGAmvGYuUaWC1ZHYKl99/V4eFI7Hy8+XWNRUJy5T9HKLjzUalj2u oI6DTnSxs6JNiSxl/lmyRQliC5G8D2JFZZqs6BqJQscTPbc75udiYaGGWzQaPGUHudi/ IXEQ== X-Gm-Message-State: AOJu0YzypYrSm0RRvtryXOFTyNCMgObp+P9V+E85/YNygla1AZD+aBsW 5TeeC9Fv8sHsZdvPEGljNEu7gADcUzQKVatB/IwIUVO2j3zuPCq+7E/aDv6Wz+MjwSaTfHkV0kz XPLo= X-Google-Smtp-Source: AGHT+IHSz4PmItWjK52t+PowWobXv69T8rGUTfx3gdtmyvYhvgC4+6C2HVB2d8UAWyDzcLKOOLBcKA== X-Received: by 2002:a17:907:1b0d:b0:a59:cbb5:e09f with SMTP id a640c23a62f3a-a5a2d65f230mr198156666b.53.1715345926982; Fri, 10 May 2024 05:58:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:46 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:37 +0200 Subject: [PATCH 08/12] arm64: dts: qcom: sm8250: 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-8-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/sm8250.dtsi | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 1a1202bdd915..b734aa13fd2e 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -6855,10 +6855,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"; + }; }; }; @@ -6988,10 +7000,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: 13661576 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:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13661577 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 21637171093 for ; Fri, 10 May 2024 12:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345932; cv=none; b=ry0s4Vvz0ulD8szHg3kdz6MnYuzYMLw2QVRH/27r80aQ1l9kNzgk9diqR/rMjH9DFSRvroJFhPIt/MspIF0bJ9nB4h7IRksg26Qepp/+XnRn6ulnRGADyahbCKJpCxN6laA0Fss2JaLjY6pKR5T8HAANXiNPqTMEek25PXtMlAE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345932; c=relaxed/simple; bh=ahnPT653i4P3yBKIsubPh2pxiiWDa4+WxBcxEAxXX1M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cH0VtlLVjaqLBkOw5cFqwR5HQ7yrYzG4C4KHOpFWXGZ6yotKIOW1/O603/lKe+tH+yLJtCVXh9df8mZYmnWU2GsNWV6K+Na7tAphMcXqozvHej4MiyIJchnbwlzfF0egPUE+OTGThKCGQMVPj9TJ3ck+OtXCsM72nHJjEn2t/Hk= 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=C+NSkcVY; arc=none smtp.client-ip=209.85.218.51 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="C+NSkcVY" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a59c5c9c6aeso491752066b.2 for ; Fri, 10 May 2024 05:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715345929; x=1715950729; 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=lK/7BWX9Y0nvD7QdHzfYOrPNJBMxWT+Wj9Jc9yOJ7ow=; b=C+NSkcVYRw1yU6u8Qrmp9jkbWC//3TcCiCyvGIemh9q9plKZqJZjYeMDIQJur2/IME QTkBADHuy/l1VN2+ybubn+JDJOgBHD0esUPSwswgRaMZkregdsSb2+eruQ2CTAwp8CFc oVjhY0mpAnGiAhR3w7Egk6wQ8YEUkfWD+t4sO5817kpzTbc8ya/pC/H2Cg8ElyFN76Qj ab2v0ZznSsVuPDYXXUxT0fEMA4UQUlrSntfNC2Gh78VKdfs6Dpy4b5cy2joNrucsHJYS VTX2KkpG87m3RSw2/UwBK4QCFnkCJ3gttjmyzkw4pZlgqbYHVMcg8uhfyVNRAqwHK7HB yAXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345929; x=1715950729; 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=lK/7BWX9Y0nvD7QdHzfYOrPNJBMxWT+Wj9Jc9yOJ7ow=; b=I8OKVJjHivGnR5Jp2ekoea55RcG5mNYTiy/hQxebBIb/534Sbb6KnKulyC0DvrTc+l VOluW61rj7HW5hXO6KrPBltNhGtvRQ8CNPF4KlGUVTXjzlAlqvy5RFjFC0MqCE3JkgW2 Tv4H2EcRxbOlLQ8767PBc0WT3m55xWXNda3LbO1brvL/xcvemf32/0jA1iep5OmcfUA7 r8ATpPG5ulBNSHo4UN1aKSq9pudw1xsaSXqdvb3aX3qzsThSdDB/8tsH7oGyY11FjKTk 0LaycXfJ1GIpnwHXs5tygRrfoHPTpZseKgIvzQAxy6Luf2680Lv6cmXaFz0YJv+FiTSq tV8Q== X-Gm-Message-State: AOJu0YyCUuUnxlVwfkTies+uUIkNdqMg2w0TYYBt872CTVvBVWmGFLsa 55EuiennwBefgOAQ5B7MQUNXeCOaVorrzaMKAbtHBjBqBtlEQSgTiuNzmVIPVPw= X-Google-Smtp-Source: AGHT+IHKOpovGI5VphV3uLsVQmzdZyHyTEMnWFhb29n1MWn9SfqDm/GS+pvSKWIWCe5hMFJVhvUzgA== X-Received: by 2002:a17:906:4ed0:b0:a59:c8bf:1269 with SMTP id a640c23a62f3a-a5a2d5eebf4mr178676766b.37.1715345929554; Fri, 10 May 2024 05:58:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:58:49 -0700 (PDT) From: Konrad Dybcio Date: Fri, 10 May 2024 14:58:39 +0200 Subject: [PATCH 10/12] arm64: dts: qcom: sm8450: 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-10-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/sm8450.dtsi | 48 ++++++++++++++---------------------- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index ee60fd257efe..38e8d3e9dd43 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -4928,28 +4928,22 @@ map0 { }; trips { - thermal-engine-config { - temperature = <125000>; + gpu_top_alert0: trip-point0 { + temperature = <85000>; hysteresis = <1000>; type = "passive"; }; - thermal-hal-config { - temperature = <125000>; + trip-point1 { + temperature = <90000>; hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; + type = "hot"; }; - gpu_top_alert0: trip-point0 { - temperature = <95000>; - hysteresis = <5000>; - type = "passive"; + trip-point2 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; }; }; }; @@ -4967,28 +4961,22 @@ map0 { }; trips { - thermal-engine-config { - temperature = <125000>; + gpu_bottom_alert0: trip-point0 { + temperature = <85000>; hysteresis = <1000>; type = "passive"; }; - thermal-hal-config { - temperature = <125000>; + trip-point1 { + temperature = <90000>; hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; + type = "hot"; }; - gpu_bottom_alert0: trip-point0 { - temperature = <95000>; - hysteresis = <5000>; - type = "passive"; + 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: 13661578 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"; }; }; }; From patchwork Fri May 10 12:58:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13661579 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 7FAB4171E76 for ; Fri, 10 May 2024 12:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715345936; cv=none; b=XbzcnOfulHnhJVRxfPiLNg8LfJNYQVOE1T/CvIBUHeVJ0A8XUfIaTqe+6rB7mxAemhACWGb6FBHDwfX8ij1SeTWSc6dauSa2vOjg78FKM9Ins9eBIPzu0WfrmFGDgaigH6HmUFxCYg4Rv3usELgsEuJX1TViFDj01xKj2bAi0Rs= 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.46 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-f46.google.com with SMTP id a640c23a62f3a-a59e4136010so495744866b.3 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=SWrDqv9l+99sHJM8QBx42zmtKRU1aRdaF9YlnzKiXY8FNveEUi29UBW5x8qHV+NBC1 PezRaEAk4z0P8PswRL2vFInIu/67k7/JABnQ0v68yVxp/VTzQXWq0jxrobASYVzOIT/P fiYJ+6HAd8ZJX0rAgFBagFPmednmRIwTAa6KcIace6N2u9JNmQ18P4QXRl9/oWzOEZ4B 5+pLrvYgTBphx7n4cCBe23wGc3LBJQiqENCkfTB6sBQWu3v6oiWAmQbVuNbDuLZ7aHfL UW7uSAjCZJfsBMw0ZSI8yg5VK3w2YsAOV6wb9S00tfaLGCWn4+Y3zDBOTK7/05KdO8I4 PAYg== X-Gm-Message-State: AOJu0Yz7MAmUK4l0Bjv3ctrvKWMKhLlo6+dJHqE8pAIRFhNHjh+0eBCv qq1f41ZfwA7SMOVMZw1vdBWcz2YpSOh/1QaT4tNGPEYVSzXJC1oQHQBtcyNJz18= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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/qcom/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 = <&gpu_opp_table>; qcom,gmu = <&gmu>; + #cooling-cells = <2>; status = "disabled"; @@ -6014,16 +6015,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"; }; }; @@ -6034,16 +6048,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"; }; }; @@ -6054,16 +6081,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"; }; }; @@ -6074,16 +6114,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"; }; }; @@ -6094,16 +6147,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"; }; }; @@ -6114,16 +6180,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"; }; }; @@ -6134,16 +6213,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"; }; }; @@ -6154,16 +6246,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"; }; };