From patchwork Tue Jan 2 13:34:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 759517 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 00A3210798 for ; Tue, 2 Jan 2024 13:34:23 +0000 (UTC) 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="cwLdJ70I" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a271a28aeb4so548113466b.2 for ; Tue, 02 Jan 2024 05:34:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704202462; x=1704807262; 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=KOAtXsI/uyP60NRG3xZQcpZuT7i2wbzmgZI2BTLUXGQ=; b=cwLdJ70Iu6w7HJJiUM6Q6aVDwZcLJIRCT17O0XtdF0vP6MhmtL21+MjuMXK/CiXKX1 DYqpZ9FMDIubwDVSYbwWn0GuVH7ur8RkmUpj0X+9LVPN5nUUQy5t1Yauzspdh91G7RDq BgDC6YBRJUuA50Bd4d9s5ZV6VgkIcRSZrkI5VtvwJPZhW36qCOVCPctKmIaN/TdBibty omZAUHsCa0illCz5gKoOuV+9IyM0BKd2E9NNJMJnOFqXboe55dIwevf5LDGD/LLNaaMW Abr6q/0H2p7f2XQPkKCe+Es4fEfoR+sTu+BdwS2vxDtZeYrVlEo6SrPoR1NwhGYjqtcI zNoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704202462; x=1704807262; 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=KOAtXsI/uyP60NRG3xZQcpZuT7i2wbzmgZI2BTLUXGQ=; b=W0vmxIEcne20Tror9cED3QC6y0RCzPG6+Jfo6swW32SifrRGhifXY/gbU+QM4GldLc ymAvICR/BmhfuRMU3PqJ9C2nVGlzoZf7DZUlFrL+EINTr8YBKv4c4CyUZ4pzIKsRBLEQ eZvlE7XLaKlymKg3ywDJBZkU5wxoCPFkkZocRDK6PlgA0h7WDQsHD2EObB6uhKSZxP/7 JAc2Cs+COsP7SpqCYHe/o3R8DYEZXsSxGFBgZoVZiKHPO0RRKj8BHQypseBQRqAb+ijN WF1BIjfT7lBKXQukXQppUdUSSa1GoouFk7pxaEFvHugEGS7YMAXf73ZIV1ncTqeT3e5k fnRQ== X-Gm-Message-State: AOJu0YxKeySBrKFVP+8KuaDGR+gujxxl0vleaXkg9CpQApThC40qb1xt eJ6VHRK7r3IXgRKYKtbQGS7/KQk4/FwoFfQUbKVcD92xEnU= X-Google-Smtp-Source: AGHT+IFLkStxmpygHl5wNEMZju5WTXCJ4MlOl04HMR6hl0o+e0M7iEB9zfITG4DtpJJL20mI5gtibA== X-Received: by 2002:a17:906:51dd:b0:a27:e711:8b7f with SMTP id v29-20020a17090651dd00b00a27e7118b7fmr1709373ejk.20.1704202461908; Tue, 02 Jan 2024 05:34:21 -0800 (PST) Received: from [10.167.154.1] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id u23-20020a170906109700b00a26af5717e9sm10950923eju.42.2024.01.02.05.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:34:21 -0800 (PST) From: Konrad Dybcio Date: Tue, 02 Jan 2024 14:34:06 +0100 Subject: [PATCH 02/12] arm64: dts: qcom: msm8939: Hook up GPU cooling device Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-topic-gpu_cooling-v1-2-fda30c57e353@linaro.org> References: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> In-Reply-To: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1704202458; l=1054; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=1NgY9bVcLf6ubSjBJsunesS1yE8LCS8qHk+beqjE2Yg=; b=V7yOCEVXcQPjLL6quQMaUNQeZk328WuCDWD+AQW2cBe4pP9+62UnE1pCj0YW1ymUUY+GKNeiQ bxDTNWsobI3Byx1wO4FASpJdQWDVQfv8BWC+1QgmBjQWyc9NKXRGxZV X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8939.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index 29f6bd9df2eb..e0521a060cf8 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -1439,6 +1439,8 @@ gpu: gpu@1c00000 { power-domains = <&gcc OXILI_GDSC>; operating-points-v2 = <&opp_table>; iommus = <&gpu_iommu 1>, <&gpu_iommu 2>; + #cooling-cells = <2>; + status = "disabled"; opp_table: opp-table { @@ -2468,6 +2470,13 @@ gpu-thermal { thermal-sensors = <&tsens 3>; + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { gpu_alert0: trip-point0 { temperature = <75000>; From patchwork Tue Jan 2 13:34:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 759516 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 7173414ABD for ; Tue, 2 Jan 2024 13:34:27 +0000 (UTC) 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="gBF+D835" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-50e81761e43so6912861e87.2 for ; Tue, 02 Jan 2024 05:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704202465; x=1704807265; 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=97jPHG+cR3581Xl+GMf1JKp2vtRKFSusYrcakFXqK5U=; b=gBF+D835JIqOQUb6hmLpu38muSEzGolVQV/pAtrkTJNkCOaIX2bWrb3olo2wa6tvZT m9LNh7auJfrql8SUFC9gLy6sV4mtqPk3+gLgkiG9ewk3AnRr5sT6Q1FLJtPXUdNXmLkl awQbAd0APv1pz6xC6ong/hAHgP0w/LbM335ebRIH363OCX9hG+D0r9fIQSv2l93PSmzz zGUMQnS58ZpLBQ/XTfHoeyOlwI9dn9asP71IzIaDpD6AsxoLI59J3TlykLb15WhgB/4x +Jgy1nmxo00y6yAPFG9SxACVs3AfOpVewmwVkNKc5vIO1qDHrqdxuUmB4myEXe+arHdN AAzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704202465; x=1704807265; 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=97jPHG+cR3581Xl+GMf1JKp2vtRKFSusYrcakFXqK5U=; b=XrZL0SLG6Ukt4bA9V6Rt6NFrgvamkco86AJfUbZrkZGYzUOpQ8KM0/rcHkx8D5ltKq fhUpocb1PNJ21vs+yuoMXVlFF9PSZZ5BBnIm80f32CaYUBjHyOeTGQA68l39+NQCq8R/ LctRwm1HkG3KUX/swINOtH+11kMx4GGAaRxxhFmyvVBgqiHzGLPUOy6tbeDKvuxv1dXj NHN3xvbeyq/c9qykSf7wEfciocRYfnlK9TOtmXJm/Zc7CBsFbFe5E308Y1ryWcRdCp3g qWzmBTRTKlOBdUQeoZdPZaAIxV5ExTZk3ZstNvSRH6gvi/8hjLZBhxfSqqo7NWp6Rg8y XYxA== X-Gm-Message-State: AOJu0Ywq3X3P1V76IHXjyQek9MDfit/AQ0EEAGvy4luhHLE8CCcEFYxw e2jiBORs6N/2juJBJPYsXz0CXAO0wg6qb/XjTR/BafpI2IM= X-Google-Smtp-Source: AGHT+IGyfOYRUZ4spVxFrdlr4EEKGyzsq18TddAdsSRofijeK06vcV97EvlAemjebKghcn+gqknShw== X-Received: by 2002:a19:2d12:0:b0:50e:5082:a868 with SMTP id k18-20020a192d12000000b0050e5082a868mr6834514lfj.104.1704202465322; Tue, 02 Jan 2024 05:34:25 -0800 (PST) Received: from [10.167.154.1] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id u23-20020a170906109700b00a26af5717e9sm10950923eju.42.2024.01.02.05.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:34:25 -0800 (PST) From: Konrad Dybcio Date: Tue, 02 Jan 2024 14:34:09 +0100 Subject: [PATCH 05/12] arm64: dts: qcom: sm6115: Hook up GPU cooling device Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-topic-gpu_cooling-v1-5-fda30c57e353@linaro.org> References: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> In-Reply-To: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1704202458; l=1343; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=MM0iaMoLU2hpNJK6qncAaunE1g9CP/uf4D/oMinm+8w=; b=zTibY+b97qc8gu1fNWYkZYWhalWuxLR7XgDDgGbbUAe0ayzdhoelFoE+j5dBzbUv8wmXC+5vo y464dOCNMysBBefVK4VwibRSy4+uhQqCNiR2ymnUCwTiJiiEGanktF1 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6115.dtsi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 160e098f1075..a8c819d53104 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -14,6 +14,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -1646,6 +1647,7 @@ gpu: gpu@5900000 { nvmem-cells = <&gpu_speed_bin>; nvmem-cell-names = "speed_bin"; + #cooling-cells = <2>; status = "disabled"; @@ -3294,8 +3296,15 @@ gpu-thermal { polling-delay = <0>; thermal-sensors = <&tsens0 15>; + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpu_alert0: trip-point0 { temperature = <115000>; hysteresis = <5000>; type = "passive"; From patchwork Tue Jan 2 13:34:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 759515 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 9413614F89 for ; Tue, 2 Jan 2024 13:34:28 +0000 (UTC) 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="mM2ELidf" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2cce70ad1a3so43187281fa.1 for ; Tue, 02 Jan 2024 05:34:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704202466; x=1704807266; 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=34J+ataehAS0kN0wmOzRLl75fKygJv6uiWJvejhyOeY=; b=mM2ELidfJLWDbefbOhxedBkg1X/iJgGgdnWq4ZA95w8W9aVfcaL8DwabDa9oVOeEri OPJXL4hOxktd80nInSAf1f85MRyVNTxVplWKYvpJkKVE2IXAp7bIUePwxiUEiUyNm0ZR crgvrmhtl/ACNkqXUjwSvGqSFByapMAnPWSeHcNvPXFMTUojCuOboEvq+ieNHCFdAhLw ixfE0BNYZgmv0EVP1n9YKwFbzjVtyzwhL3uKGgFKn7YSWtFA8PpTHCz8Dx8uMyp2qg35 2eM7rC7B0iFn1vlP4CKYMdglS7KQFvmAIlgYNG2tuSrbSSahohAWsvn0RJqlgSYjv45s 6J4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704202466; x=1704807266; 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=34J+ataehAS0kN0wmOzRLl75fKygJv6uiWJvejhyOeY=; b=FF/9XrkiBJPfrXYTaxWcuouas5VsJihABZWln3xeBO4O/zW81teS0jt9tpSdk7hSo9 Muc0lkC0RIHpIMVbaVguG4Z+IGfrfC+2XZcJVBW9rBxzutPfHX4RjHtaZ5A85rS485Ie oNRyVg8Gop5jAKyzL0kpy/dVLcS9iDShnLN8F1v3eh8ahrudWhw+2x1bXVtdLyH7Bw+A MUBb4ipWhffDb0RT+yyHyDtcQA88WpdggFemsUdFIwBRzSvfxGuruU7sPxYGAlS5HNcY Pvs6UggBnGzpZ41mjEJd4jkC+Agk3egQTuFZP7V7p6LyHn9O59h90BrJO3AP3cxteikE PEEQ== X-Gm-Message-State: AOJu0YwpnVCxim7NummdlQudrjBuRO+8mru0uRSfevuEdhNZyS+Z04FA eiy9Awt9AXCcjUiNzkIMrZLL2a3FtfGFXaluIO4jSRIwtCo= X-Google-Smtp-Source: AGHT+IHXrc9Ym5F9eqiYgXkxGm+4L934dDO+blkfx9684d1nMXyIuClUdc1sNa3SYeW03dvIreCDIw== X-Received: by 2002:a05:6512:6cd:b0:50e:7f56:bfaf with SMTP id u13-20020a05651206cd00b0050e7f56bfafmr5489178lff.129.1704202466366; Tue, 02 Jan 2024 05:34:26 -0800 (PST) Received: from [10.167.154.1] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id u23-20020a170906109700b00a26af5717e9sm10950923eju.42.2024.01.02.05.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:34:26 -0800 (PST) From: Konrad Dybcio Date: Tue, 02 Jan 2024 14:34:10 +0100 Subject: [PATCH 06/12] arm64: dts: qcom: sm6115: Mark GPU @ 125C critical Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-topic-gpu_cooling-v1-6-fda30c57e353@linaro.org> References: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> In-Reply-To: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1704202458; l=716; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=tdRYL6qoS01TCJIXkVVITyvW8ksCa31Ur6gaqfY9lys=; b=435Q94/MvJOGykViraXp5aKhBpHNva5jUKmeYVW4xChvmxipKqCj72crKrLG/+SbxQrwv+Ryx 2qx/6EJr8i8CFqNZtnV/nTHVCFoYNxVegFRghav3sFpW54/+9xoJOaD X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= If the GPU ever reaches this temperature, the "critical" signal shuold definitely be propagated. Fix the wrong type. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index a8c819d53104..be51cbaeeb7e 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -3313,7 +3313,7 @@ gpu_alert0: trip-point0 { trip-point1 { temperature = <125000>; hysteresis = <1000>; - type = "passive"; + type = "critical"; }; }; }; From patchwork Tue Jan 2 13:34:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 759514 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 33812156DC for ; Tue, 2 Jan 2024 13:34:30 +0000 (UTC) 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="lITZMO+8" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a2331caab22so946139766b.3 for ; Tue, 02 Jan 2024 05:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704202469; x=1704807269; 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=MkfALVEFrCG1/CmRPVW4W3XftugRTQcsk6w6+JqNKcA=; b=lITZMO+8hC4nmHJYEvADQqW5uQyHr6iHDdEntzr8m1Ydvp7Dm+uPaLxNLk5NqjcwjD ceR8ECmQmu4zV+xuVfu7g1TXMc2RiqquPihdyuE/ZiBSsbS+2lRWxyJfk5kZxL1qeJZu KDSQkq6TRCNjCGyjoSohDm0xdtfmBdP6VxfY1Y5JC6V31Ou3cEMdQW2U5Mxb6iOz1fUA nJPi/u9eEFh9CzAXXwgM7h7p1oke6Yvp8ariB/0DWcieUb38QcZ6aJ+ZWhoDjzECWGXG CWxi2P06KN2WhhkDmfmpj1nrXLgqACvlc4rkV2P01VRmtiVTfOzlGFZhey/2chsX9EZJ 88nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704202469; x=1704807269; 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=MkfALVEFrCG1/CmRPVW4W3XftugRTQcsk6w6+JqNKcA=; b=NFw/OBeHcLBrOz/QArz42LU/6R25ur+jEmyKpTTRuG692yt5AHCwh0jxRY5rFFtCnH tdLQbBv7pusfJn2IduwTXnW+1+piI5zTmzOha7XJe3bmVQI0qIv8ITnaMOvzKY+EXvn+ zFvlpMAcvgj6q2Z1+HMEaK+jZyJip77BmeQUC/DygmeE8p3gVVm0A9GfZPxA5JJgbmsj vDXc8AU4aydAmhUMN1u2NqS809yVb7aHdgyTUPOzYA+/K+aUn/EERbwRsDPmSj1pbx30 7lE75uxSFGL+oQxRy3HRZfsQcp5WUarF6vEKjCcXL3/GkEm2R9fQImxW/2rAo2ffG4kt rnAQ== X-Gm-Message-State: AOJu0YzPctovLOWmc8wpZoIi7U+KMXBmzoXMxXwB6crwsT1Oq4/tgQPh jeX2UpapB/2Lr5Nr7b/+ewn2xOIMVrjycoLvcIlKcmfIpik= X-Google-Smtp-Source: AGHT+IFL0AsmS3IC0Nfst0eE3adsL9lyo5NQeFZdZuY9nVjY852z2XgcdxG6B1eT7yb0CrLWAYJ6Sg== X-Received: by 2002:a17:906:1c4f:b0:a28:78b7:78a8 with SMTP id l15-20020a1709061c4f00b00a2878b778a8mr27376ejg.62.1704202468829; Tue, 02 Jan 2024 05:34:28 -0800 (PST) Received: from [10.167.154.1] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id u23-20020a170906109700b00a26af5717e9sm10950923eju.42.2024.01.02.05.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:34:28 -0800 (PST) From: Konrad Dybcio Date: Tue, 02 Jan 2024 14:34:12 +0100 Subject: [PATCH 08/12] arm64: dts: qcom: sm8250: Hook up GPU cooling device Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-topic-gpu_cooling-v1-8-fda30c57e353@linaro.org> References: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> In-Reply-To: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1704202458; l=1569; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=iFnGHk+ZK2tVmuhe34jg6IepMU+CLbbATUG+enVgvts=; b=pAn29b2XQnVV1b4D94YHc0qXd0xXVEEoWngkk1UMaRiQGmjsCYHxzUP61qoM3yKEVqFuOBXbz /z9Of7ZRwJUBkzC/yXRWQHd4eRFxBRIiXTrc3f7bUxdGuU39/4/XYjF X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 760501c1301a..03bf49818798 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -2888,6 +2888,7 @@ gpu: gpu@3d00000 { nvmem-cells = <&gpu_speed_bin>; nvmem-cell-names = "speed_bin"; + #cooling-cells = <2>; status = "disabled"; @@ -6791,8 +6792,15 @@ gpu-top-thermal { thermal-sensors = <&tsens0 15>; + cooling-maps { + map0 { + trip = <&gpu_top_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - gpu1_alert0: trip-point0 { + gpu_top_alert0: trip-point0 { temperature = <90000>; hysteresis = <2000>; type = "hot"; @@ -6926,8 +6934,15 @@ gpu-bottom-thermal { thermal-sensors = <&tsens1 8>; + cooling-maps { + map0 { + trip = <&gpu_bottom_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - gpu2_alert0: trip-point0 { + gpu_bottom_alert0: trip-point0 { temperature = <90000>; hysteresis = <2000>; type = "hot"; From patchwork Tue Jan 2 13:34:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 759513 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 4CE6D15AD7 for ; Tue, 2 Jan 2024 13:34:34 +0000 (UTC) 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="xJ1vpSlv" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a2871a2b898so12678966b.3 for ; Tue, 02 Jan 2024 05:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704202472; x=1704807272; 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=kn6ZcGR++MLyZKYtulEm7pL4y4QPEqxKkTxTEz9NJCo=; b=xJ1vpSlvQ4WpjA2eLh54Rd6f5XGamBZyMGETp3sWTWZO+/lsjvKUXu4EbOP7OwLcvq gtHqfxDmhvgFwUFigFwCviJ2D3xHpALz5N8NehYzR7OFuDv85BC+mKzGg176DnBExaDr Z/2jhHTz/m+7/DPsfMULF5Dnw66+2kljjBe1oXB1n5UU146NOAF8QksRKFBAuz+sCfE4 Ts6HsdQ+mpdp59uJr+8GUAapjIy7/oKUV2/cNsWm6cI8+p1YDBKGpybw0lKe2Ao97jGe D1dErzf5A50h8xaIOiVcTfI9/0osHJT/9hdQYm0KHpoCye4EcaZM/BtOpmeYHtQBfasn 8a2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704202472; x=1704807272; 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=kn6ZcGR++MLyZKYtulEm7pL4y4QPEqxKkTxTEz9NJCo=; b=EWx4/Fh9NQf3SO6lOr7T6v9FY7ofomxlXKgQQOLy+Jj0lulX78y3icU5JvFYg/+kNC c7+xv9JBu1U9/Xe9l8LZaT76Jd3jbMW9H6egAKIv98Mwn3e5ERkWzi3F8Kvcy0XSAKC2 5VSq/4R0H1R8JbVnotysT7f/fes+sBWeZvRsbpCVjCT5Trf/KLEcDyrQs+w72F7cnPNQ kZhIIlEZG1Gb+w74F8ibHtGXYOt7FuvTKSvJ6VDlk/ajND8oAJpKaXUTEka9rIdMWRed +FqufPzu67qqUi7w8hOZN/9Rqjfd48gpkkag9HE7s/CCicw3rAYfEDIXxV78DIx3Akj9 FZ6w== X-Gm-Message-State: AOJu0YyuoAwY5PghiFjB3XZu2S/VRwP3MPNYu6uvawZGGJ/ovmhEyJR2 WNZEevbNDJi5gmlELqujxP6wh1lBLtUjzMsJfFRBSGJ7ePQ= X-Google-Smtp-Source: AGHT+IF8V3w4eO8tAGhtwTO7CeHY5MfrrduezFfd/hCSv78bIIbXrbW5bgSlswiqDeONC6lUwdP1vA== X-Received: by 2002:a17:906:1988:b0:a27:e0e2:e641 with SMTP id g8-20020a170906198800b00a27e0e2e641mr1874730ejd.19.1704202472564; Tue, 02 Jan 2024 05:34:32 -0800 (PST) Received: from [10.167.154.1] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id u23-20020a170906109700b00a26af5717e9sm10950923eju.42.2024.01.02.05.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:34:32 -0800 (PST) From: Konrad Dybcio Date: Tue, 02 Jan 2024 14:34:14 +0100 Subject: [PATCH 10/12] arm64: dts: qcom: sm8450: Hook up GPU cooling device Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-topic-gpu_cooling-v1-10-fda30c57e353@linaro.org> References: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> In-Reply-To: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1704202458; l=1883; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=lgxbgRXfXDX4Jn2UaC0FqFuodM62KE9jmIfHnDAxRyI=; b=r1N0BwVrwMRyHsSl/wlgYiyjpYzDxjqQwnnvJPf2fYSr+T2RY6ZNExH/zeL+RLmYR8wlycfOx XoRmgKlx0klDyyJtSzKp6+wyUdh00TiOkXRaPzCXYHLdD+XOmuIDwb6 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Also, update the trip point label to be more telling, while at it. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 01e4dfc4babd..8f5a093c8828 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -2038,6 +2038,7 @@ gpu: gpu@3d00000 { operating-points-v2 = <&gpu_opp_table>; qcom,gmu = <&gmu>; + #cooling-cells = <2>; status = "disabled"; @@ -4890,6 +4891,13 @@ gpu-top-thermal { polling-delay = <0>; thermal-sensors = <&tsens0 14>; + cooling-maps { + map0 { + trip = <&gpu_top_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { thermal-engine-config { temperature = <125000>; @@ -4909,7 +4917,7 @@ reset-mon-cfg { type = "passive"; }; - gpu0_tj_cfg: tj-cfg { + gpu_top_alert0: trip-point0 { temperature = <95000>; hysteresis = <5000>; type = "passive"; @@ -4922,6 +4930,13 @@ gpu-bottom-thermal { polling-delay = <0>; thermal-sensors = <&tsens0 15>; + cooling-maps { + map0 { + trip = <&gpu_bottom_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { thermal-engine-config { temperature = <125000>; @@ -4941,7 +4956,7 @@ reset-mon-cfg { type = "passive"; }; - gpu1_tj_cfg: tj-cfg { + gpu_bottom_alert0: trip-point0 { temperature = <95000>; hysteresis = <5000>; type = "passive"; From patchwork Tue Jan 2 13:34:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 759512 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.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 F360815AF9 for ; Tue, 2 Jan 2024 13:34:36 +0000 (UTC) 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="Vf8rxYT/" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-50e759ece35so7110301e87.3 for ; Tue, 02 Jan 2024 05:34:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704202475; x=1704807275; 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=zeKwT1A3XsXuuDojkgywa+/EpDJdsCptqUtmXkx5794=; b=Vf8rxYT/cUQV/82ACMVl+SFhMehHNmfIxv73Y7aY6oLTtJYb2EpRa6+nhHIyHc0KKW wdo5cxr8OSZBwKbVmpr5qw1mGI/gSYwtCl/V+hB2+js3SAPsMO/mAYKCMTNcAWUhAdwB kZdRlNT6bEKV64ujRkGojPDtihlugobIhXJfl4TvC379zuOOT4CNZmSjTj0yoMBQU09K ciqNJ4XqC1IFxK3yqlPoKZB192IIG9wR+wHfmfW6RsEnbFO47EzPqs8em8cj+Fd/ewHJ 90JCAg0PsZszz3eJPz+g9AQaxjw5WQ94KscvY4ip4sTrlgoguSXGbwmWPQdF8mli/yyQ aD2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704202475; x=1704807275; 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=zeKwT1A3XsXuuDojkgywa+/EpDJdsCptqUtmXkx5794=; b=uNJBFyKQwDcXzQrazuEtsZGd4MootZtu8WUXcyDuPUITTpiYQU4bc5LY7A7YwGoCnp DTNsWnSukUtHVxlJYpnh8v3t7FVKcGNfr/nQk8wjpwJDgUFhf09CVdioxr8WJb1SbUTI vg8vexmDwNdfdhHyxhHJqdq0AfyuQrnQVWzs0qe6ZR/l1oPGDnFnwqLNkNc5tUqAEvGX A6fcMMJIv8BD46hPcdyxfCZrNomEwoSImYfT5zpTsgGO4upjvNN6rWG/IAarzLKbt6i8 T/b8YireEIfx44ZK4eQ8EWQKp69JeJ2EQCpEhMBXzB3xhgbFIDKcI4qpF38uRxOqYDl1 jKHg== X-Gm-Message-State: AOJu0YwI9qFDl/7CfZ/mqqhJYNKi+Bg4WibhyXac7AEXOXOTPOtxadEd 3HL1KBfxS67gvm1jJHyzi80pTL8FZmpTvCp/4pudvf2PtC8= X-Google-Smtp-Source: AGHT+IGiqR0JDwID0n3wdeBwAvdvieXgN6ZSyb5hHkLZQG2NRFovAJb7WIX9mIkPnIsl2BZkIL28Ow== X-Received: by 2002:ac2:4836:0:b0:50e:7dfe:fe82 with SMTP id 22-20020ac24836000000b0050e7dfefe82mr4306564lft.82.1704202474834; Tue, 02 Jan 2024 05:34:34 -0800 (PST) Received: from [10.167.154.1] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id u23-20020a170906109700b00a26af5717e9sm10950923eju.42.2024.01.02.05.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:34:34 -0800 (PST) From: Konrad Dybcio Date: Tue, 02 Jan 2024 14:34:16 +0100 Subject: [PATCH 12/12] arm64: dts: qcom: sdm630: Hook up GPU cooling device Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-topic-gpu_cooling-v1-12-fda30c57e353@linaro.org> References: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> In-Reply-To: <20240102-topic-gpu_cooling-v1-0-fda30c57e353@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1704202458; l=1248; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=dkeGc5o0HQxWFtiMDhc/Q4H/20eU/xyAL75klKJTI2M=; b=E2ErxoQ3kpFQPbKINlrBy6Bu2+Ni5vxkudf5gW7KmKfY/ZCu82WDVuQ7h6Fbth7tWCFbKEVxo KjJLpsPDLoPDWIqV1jSwBCBpmFQLG0voDpYCBVsHcrLBIs0duhS7zn0 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= In order to allow for throttling the GPU, hook up the cooling device to the respective thermal zones. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sdm630.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi index 775700f78e0f..fc06665861e2 100644 --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi @@ -13,6 +13,7 @@ #include #include #include +#include #include / { @@ -1120,6 +1121,7 @@ adreno_gpu: gpu@5000000 { interconnect-names = "gfx-mem"; operating-points-v2 = <&gpu_sdm630_opp_table>; + #cooling-cells = <2>; status = "disabled"; @@ -2580,6 +2582,13 @@ gpu-thermal { thermal-sensors = <&tsens 8>; + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = <&adreno_gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { gpu_alert0: trip-point0 { temperature = <90000>;