From patchwork Tue Jan 2 13:34:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 184345 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp4447864dyb; Tue, 2 Jan 2024 05:37:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEh1yxHQ1CPpT2J7+PyE5tKPA38KW+LaD1vILdreGNKTV8r+o0Qade8rJG81W9MosnYwEb4 X-Received: by 2002:a17:906:8886:b0:a27:c366:2261 with SMTP id ak6-20020a170906888600b00a27c3662261mr1715778ejc.42.1704202645704; Tue, 02 Jan 2024 05:37:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704202645; cv=none; d=google.com; s=arc-20160816; b=SihxnVU3G8LFtLngAXb4Mk+JoYvxWOIqmmj9d/VqtHsMvRP+nmwHDSsWiePt4Q6Slr aOp24FWGFXvyuA/HLHGmDZNGKGszm0crVKPJalH5sJbVbT/PBHugnX8qmLhibPJh3EoH SwFhtiR0A7iXRPjusHjrv89lsUy5xLhd2nqXBlVme54ISx5hLHghbV6mP6N29JWAXCdz NKT0L7t6CegZePiMjR8AYwdkzMc6KYCkMTTHkGAdypayMHrePjz65D8YTriTygNjc6U/ EOaVdnUBe780dg4LT3k4r+B5sm+FB4T63J0OJ222ziqtUGuSyWkWiJQCKYGJM/Gh7lP4 UChA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=JSwJ3dWt9hLdZitz3UKxb0LWEVzUSjaE6+PW7S8QElA=; fh=VYpjbPPqx+jvrs1/9qXlyTOIyHHHTMJ7h/2E0zaqoC0=; b=DcJwjxhteBwOj17SQO6hC0c7S0Rl2hjR0ym7ClBopx7SbYXbCvtKKmNzrv9zo44341 SzDdzHvvof+6xmAVBdJZy6HGa4aOBIYUanMiympK7mhKA0M3Yga8rIBYIzGABt3Yho7D yPgCK0VPtEfGDU7eMiuHhXB/lpVOZQrfxlkjLW8D3CxDeMvLnSWBfnvLVb0wn1H/LR+I SVmXkmSKMUW0gr4W785F9gAw2xzdYGbPXZI1AbgDDcoO543gABrOcE7UsGh8P0Abu8vr 5D48NSX7CgsBEVh+KIAql/qLJJ7dQ84zCn4cjCQ53DlmN9CkXgteCYs8RxPoZyTJzMVA 97/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=elwO62J9; spf=pass (google.com: domain of linux-kernel+bounces-14415-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14415-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id wi5-20020a170906fd4500b00a26ee6b99adsi6789554ejb.394.2024.01.02.05.37.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:37:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14415-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=elwO62J9; spf=pass (google.com: domain of linux-kernel+bounces-14415-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14415-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 29A481F21088 for ; Tue, 2 Jan 2024 13:37:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BE7615ACD; Tue, 2 Jan 2024 13:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="elwO62J9" X-Original-To: linux-kernel@vger.kernel.org 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 5E8E612E67 for ; Tue, 2 Jan 2024 13:34:29 +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 Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a27cd5850d6so182051866b.1 for ; Tue, 02 Jan 2024 05:34:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704202467; x=1704807267; 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=JSwJ3dWt9hLdZitz3UKxb0LWEVzUSjaE6+PW7S8QElA=; b=elwO62J9b5ComZpKiK1cYMNmxaVk7hZZRjm+ecy8JWQnFb0Ptl5l3h+tTdUXcssRAY nkpY38Plqzv9WF+KibVNjUU7wQzOUHSXg+Iy9dcnxVTY5ryJXrEWChJdDrvb+UIHlJa9 7nEm61XAFnDqYMP+b/Etrm9z/WRRUsL0vK5j9NFrCHRarmianRDjrnMgOfzzoggkchTN ubWcG9iy93/+8KBUPQCHw8Q993pJIaQmcNkxhYqp2MF62M3xGJhgGSIiwzSiWHxPS3dt 2Crz6jBGrsvvU2WFi3DfPPtTT0shpARY1r8UAczoPFWq9+YRcAsbfxtMdpBuxSB/gvZd 51EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704202467; x=1704807267; 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=JSwJ3dWt9hLdZitz3UKxb0LWEVzUSjaE6+PW7S8QElA=; b=Tw6Q/8XcoX3HrISFWdydOiPMFN9tcYfLbv8cQj15oEOutHnQEzEM8yjfM5t96cog3D GyXmf+hGrx4CzcdtU10EUB/rYsSz9HDIOsoNE27vOtX/d3zbpw5CyFqQIRO+WB+qM789 KzJRa1NGN5vMo1FFeM+OJOo0QI6K2/2cFVAz3WSoHS5FwWURdNUM7lT3Znkyq1wG2d0R Y7hnyyQemwyuyz0nO3pFwa8Aq1gFUwlJPUxo2mwtX3JOWRXBHPDMd3Z5ctIMpyB51Kh/ PNX8Zsr/PkpB+g2wUcTauCuA9IgkyokplIh1acAlOyc5tfTFy5jVadlJRG3qlaOovcmY PAXA== X-Gm-Message-State: AOJu0YxpEnDv8X8kxdkgyTvecGV0Z8Qi55rFT3xvRDnJ3L8j9aJ5YGm6 1HG+30Bf+f0lvn5zCu21EBoPo1ZlxfGjbQ== X-Received: by 2002:a17:907:6e90:b0:a23:482:ee74 with SMTP id sh16-20020a1709076e9000b00a230482ee74mr10023202ejc.28.1704202467733; Tue, 02 Jan 2024 05:34:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:34:27 -0800 (PST) From: Konrad Dybcio Date: Tue, 02 Jan 2024 14:34:11 +0100 Subject: [PATCH 07/12] arm64: dts: qcom: sm8150: Hook up GPU cooling device Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-topic-gpu_cooling-v1-7-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=1570; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=R9UqwjL5lclX35BC6In859XOY8l0XNfuxqV/TqSMFgg=; b=BNkMeNbXaJ10HkdGRUb2ZV21Yr//wjNQZDgCON/DdlpdjArHzNIWV5+pwtOYP5/+n9NzemHZ6 A7F+B3icE7hCqTicsjp96JJxapM14kxjy5vqPEvoltz0azfEIH64C+2 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786985993592442457 X-GMAIL-MSGID: 1786985993592442457 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/sm8150.dtsi | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index 761a6757dc26..26dbda713e51 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -2198,6 +2198,7 @@ gpu: gpu@2c00000 { nvmem-cells = <&gpu_speed_bin>; nvmem-cell-names = "speed_bin"; + #cooling-cells = <2>; status = "disabled"; @@ -5101,8 +5102,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"; @@ -5281,8 +5289,15 @@ gpu-bottom-thermal { thermal-sensors = <&tsens1 11>; + 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";