From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.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 325F622C323 for ; Mon, 13 Jan 2025 10:45:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736765156; cv=none; b=rpsuHIucxGue8cTbbKdgwJjGP00r7X8bf2z6zt6D6paygUwLKKfSMWnRIfiOae8OBtC9nU3QIFmI7s4KJRFXtLLDjB8ZIrpxaRRAOFXLSanPJa6i7zRVHy7W8IskH031pyBnGWzkNqhyECY7Q1w9tWgnmHa2WvU3NFy0n9EfGCA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736765156; c=relaxed/simple; bh=th0Pa9/QADvWRhfo7Knx/NJ77U9f3xc17Pxzy7okQi4=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=ceskdKLanUM6mvKgxMp97hZTD8lPgoMcNSJGRgfIbUJt9qUIhWByKsDyk/EVPn9P1zOXR+kRzfA2vu1aO7Ae8/AGT2RWHufzwn45h7xFUeYDQcQjcTgtJYiP8w82VDa//9LiKZZo9MNYrUJUbA62JIbXp/7omIUOb+pJXSAojsQ= 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=kix5QH1S; arc=none smtp.client-ip=209.85.221.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="kix5QH1S" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-38637614567so1985764f8f.3 for ; Mon, 13 Jan 2025 02:45:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736765152; x=1737369952; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=v1cPUFzwsNh1Qbx10EVjwJYJO/KgBZ7O1LEl7A2FwMo=; b=kix5QH1SghDuJ+XffY2ZvaT/zIgcFXeSAldEDPLHVJntZXCbd9ar6Z8fjnh+srhlT4 81hozKg4StCvLErRA2Jr/uOcDwuUGN2b5qV7yDDu4T3OW4A6MIs4/1oRHhpuI505JzYB l2PtXuVDslO8/bRwRNpVtzvrSaxXUXRaD/zQDrAA45rWiql9eaGTr2J9dnO1qqd2lK1z gXHR8HP7o/YcKIDluVaVWErbffHR1i2GY68pUNiwMVK+1SCrPdw0F/BNQwUYWHMte4kp Zv4/5nn0xXVe5W2DbU0Rj1dsHC7fo6KyW4XpTGJY2WwwiYTTAiVdVxhfbm4JVs9X4WII U/8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736765152; x=1737369952; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=v1cPUFzwsNh1Qbx10EVjwJYJO/KgBZ7O1LEl7A2FwMo=; b=Q67KIxVpDnQRnG8958eHIGFqDSxNxZRZp2FY8i6OR9EbI0zaa9I37DkoNve8CDqxJh vnNXNlsNnL+EDGH5/TtYEe0vFGM4F6P1yhL8mhe7s25xaSA+MPRtLAdp7etl9PV2Zj2c 3UyvbFmauUZBTemtK5NnicVIlqSzLeZ86A0jpjwulR3P9fPCVjpScyMbnZOOjQZ7oN4y TmvRf6YhS8P6oQ5W+U6ruKT/GUlojjB6U4SC8mRyTtH58kh+CYSVTZc5YaYJBjffKqwj csEbm05FJ4hUqq4HblO5XVAn8XidI0m4UT0gotcl1daURe6x5RZC3V26/JlOkNhY5V8A YyNQ== X-Forwarded-Encrypted: i=1; AJvYcCXEzq7zHl170ynb249CAss+V90N2iLXszf0UECrzZyKjsjswTYRB7riJ743JSBYMRnBCMKkYF0VN6LYqIk=@vger.kernel.org X-Gm-Message-State: AOJu0YxO6HmCqZvihjPkb2JqA+FmmN+DhznOuyVd/1DBtV33Gu8aY+wS 8umDmsC9BqL5OdcCUpjTgopQdBbvXsquOIgquGrmGL6hL+kDBDqawAtFiitRjGU= X-Gm-Gg: ASbGncvH1FrGROWHLM5c/AWPzp8QwIPLS4/myAa+8Jp39Av2swyIlYgVaSR9rX5I5rt F/eC7o9+bGBk/h+j2PRyhXe3LvD8vRG9JWv/sYlhBC8O0k3kVxDF7al4okdLTbXqrJ1yZUiAAHi mjbaRhUhOER3Aro900n5YY9DN8jwh8lNoC2HVS+DdjuleKDlzcrfTd1EOY4nYkWacZ95sLX///U Gu/Zn0Xz+7CYYA2TbH681J8pFP1Ll4lKtpzn5+EyKueQ0OlNAm92H547rIyWfo+91pf2spZTcg7 zGIMROtBMbJyzEc//bcYTLGeqpr+AuQ= X-Google-Smtp-Source: AGHT+IGV9V9tYCbI3l9Vg38OHZMvUdoHz/iGVE/XhWxS7C+Vfxx6ggQkZ0YWwLsqwwW6crrVzpY1Ew== X-Received: by 2002:adf:a41e:0:b0:385:ec9b:e442 with SMTP id ffacd0b85a97d-38a8733a391mr14490597f8f.40.1736765152407; Mon, 13 Jan 2025 02:45:52 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:1062:7a9:f363:72f2? ([2a01:e0a:982:cbb0:1062:7a9:f363:72f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e37d0fasm12053707f8f.19.2025.01.13.02.45.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jan 2025 02:45:51 -0800 (PST) Message-ID: Date: Mon, 13 Jan 2025 11:45:50 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v2 2/2] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures To: Akhil P Oommen , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250110-topic-sm8650-thermal-cpu-idle-v2-0-5787ad79abbb@linaro.org> <20250110-topic-sm8650-thermal-cpu-idle-v2-2-5787ad79abbb@linaro.org> <8fc3b958-5c2f-4c79-8dc0-d1eec9f5e47d@quicinc.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIe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JC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <8fc3b958-5c2f-4c79-8dc0-d1eec9f5e47d@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 13/01/2025 11:28, Akhil P Oommen wrote: > On 1/10/2025 4:06 PM, Neil Armstrong wrote: >> On the SM8650, the dynamic clock and voltage scaling (DCVS) for the GPU >> is done in an hardware controlled loop by the GPU Management Unit (GMU). >> >> Since the GMU does a better job at maintaining the GPUs temperature in an >> acceptable range by taking in account more parameters like the die >> characteristics or other internal sensors, it makes no sense to try >> and reproduce a similar set of constraints with the Linux devfreq thermal >> core. > > Just FYI, this description is incorrect. SM8650's GMU doesn't do any > sort of thermal management. Ok, thx for confirming this, in our tests the temperature steadily stayed at a max trip point when setting them higher. But perhaps it's a side effect of other mitigations. Are the new trip points still ok ? they are derived from the downstream DT. Thanks, Neil > > -Akhil. > >> >> Instead, set higher temperatures in the GPU trip points corresponding to >> the temperatures provided by Qualcomm in the dowstream source, which will >> trigger the devfreq thermal core if the GMU cannot handle the temperature >> surge, and try our best to avoid reaching the critical temperature trip >> point which should trigger an inevitable thermal shutdown. >> >> Fixes: 497624ed5506 ("arm64: dts: qcom: sm8650: Throttle the GPU when overheating") >> Signed-off-by: Neil Armstrong >> --- >> arch/arm64/boot/dts/qcom/sm8650.dtsi | 48 ++++++++++++++++++------------------ >> 1 file changed, 24 insertions(+), 24 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi >> index 95509ce2713d4fcc3dbe0c5cd5827312d5681af4..e9fcf05cb084b7979ecf0f4712fed332e9f4b07a 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi >> @@ -6173,19 +6173,19 @@ map0 { >> >> trips { >> gpu0_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> @@ -6206,19 +6206,19 @@ map0 { >> >> trips { >> gpu1_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> @@ -6239,19 +6239,19 @@ map0 { >> >> trips { >> gpu2_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> @@ -6272,19 +6272,19 @@ map0 { >> >> trips { >> gpu3_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> @@ -6305,19 +6305,19 @@ map0 { >> >> trips { >> gpu4_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> @@ -6338,19 +6338,19 @@ map0 { >> >> trips { >> gpu5_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> @@ -6371,19 +6371,19 @@ map0 { >> >> trips { >> gpu6_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> @@ -6404,19 +6404,19 @@ map0 { >> >> trips { >> gpu7_alert0: trip-point0 { >> - temperature = <85000>; >> + temperature = <95000>; >> hysteresis = <1000>; >> type = "passive"; >> }; >> >> trip-point1 { >> - temperature = <90000>; >> + temperature = <115000>; >> hysteresis = <1000>; >> type = "hot"; >> }; >> >> trip-point2 { >> - temperature = <110000>; >> + temperature = <125000>; >> hysteresis = <1000>; >> type = "critical"; >> }; >> >