From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8F301E521E; Fri, 16 May 2025 22:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747435883; cv=none; b=pnGe/iQN/aj9+NWn+Y/LFSYvhXExpVEWWhO6lneJ59+tN+MjsmvwplUy/Q2vwWrkOUeZWRinAuStoT9UqlD2LVpmfyMhMWu8vlHXvMn5PHdbj2A/MftEblDFS59ABRmZkOwne35gXvKy+hCoz8jKBGB3tpZAmRAlpE7cnzkMoGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747435883; c=relaxed/simple; bh=0IKKAUUmcya6bwPTCS8kI9goyASN2Frt/6FkiXbQZgM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=f4ON1Lxn90PDpJiBNweC1blBtZCbNMhiadPfMGS51cou7N2U/qt2qGJEPl7HygdBNm5loqS7v4/YroLt6X9JVPJdaageVPbWy9AsFzk91bCxknWHNNunx4oEFZ+C5Nv7DsF+3MtGbGcgdVzyOIv83aQYIx2Y1iowrqmnKN7y3AA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=C33PTffM; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="C33PTffM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1747435867; x=1748040667; i=w_armin@gmx.de; bh=qWplb7A8mjRl0/2WWE3bpC00qyUVu1xoZ2TClD60CEw=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=C33PTffMP8/zDzw+0KKoda9Hysi0cVTE2TolifH0Ws9pRNyGuQPC7+eNploL7d+u ylVW/WJjIjnKrfvhRfDgMEyhC2k8TIGcitdMvRUo6lI747XsknuZcVMB1Kz2EQkq0 mAP8KjAOUPOEm/exCVU/g5F4cuCrw6Id18HmhtC74vbJHDgkhrrvfLGnS4hKLayX/ Yh0AUiCwxNuhfbtmiGSuipXlWbYmfvQONtYnVvyjFW0PR0vv5ObBvGAp9z6thXFHm bq6V9uQ8JLWDCuKLrm1On7pC8pJ+/dN0k5vOXIBYRDklR5OkjufOWq5HX0GO7Sygd N793xTBNKY+pZZDxyQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.0.69] ([87.177.78.219]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MowKc-1ulL6r06NK-00fKsz; Sat, 17 May 2025 00:51:07 +0200 Message-ID: <12f63757-d61a-4edf-afaa-e3964d16d91b@gmx.de> Date: Sat, 17 May 2025 00:51:05 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/3] ACPI: thermal: Properly support the _SCP control method To: "Rafael J. Wysocki" Cc: rui.zhang@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250410165456.4173-1-W_Armin@gmx.de> <91ea8aed-5f98-4e4e-b3ee-fdc86d54f787@gmx.de> <90cba8fa-e6a9-4dab-a4ea-fa96d570a870@gmx.de> <5cec046e-c495-4517-82c8-83ae3cdb63a1@gmx.de> Content-Language: en-US From: Armin Wolf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:UtQck8ky/D604YTIzDI3h9zRvr6bv32gktTR6Y4bSaryxZ6v9PH fn2mZXA4M433GuJnaSmbuGGooXzlpTaR6B1s8YgsYPpuZEfxrx2iFEyfCw/BX98yqgPXfSt Jh4AD/XNwy6BGbGD76fgZxHLhuUHKQMRkBgONcBnrS6b8ZH0rmgmgogF4TotGolL9pzrIOI RUZMtR4RXHornUzdtwDaA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:WhbJ+KcsHb4=;72T/4ni9bVd8MMsyOqO+a+SE8ul +lmy5hhHBumj/KQpLn5q7oZSC40AEexg5g6QqHZ+ZwGaxfi4cHChbcuGMVOfhmP+JO3RoDMsw o9kk94gNLmteBcB4CayHElcqTjtRqkeICtYTqvt1VcrS9JjXPZZEohud4M5qUI1g0dU2PIeTG jPNxvaINfp6NoEGnLjDclzEgc8R4WtpJoMHNZzScWY+c9ZuzOnWWUJuSW83BH4HNiBSsC8Nku vwfsqnr7fX1hb5eM7p7OcutyquskmGqX7180aJ3AsVssH/CyKAhzyK+wBPbadFSye0n116RJr itnj5oQR1nBtcQ3hMd+vcKC0MOH4nLeVZPzFtzjM+LvRjw+xLPAdxcKD7AyFpb4L6sfecvvGM 7irkFx/v3VClifCaFn7laRbnW1aGfa5wH2iEUn/EhSqhCuhq36FknxQKQPGPCgCHYPVKqVo7E 1Dfm8EYZMV/ON3jqzH4i3lWr1hTVUqyL9ydMDPTv+u0fVM1UJizJhzoblJUYVO5Axsr6At4O9 HLUTXr0CzbwAwCwtfv6aG7K3jQ1taBx4lbTqKq1fPsTjWOjtnO/uJlf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FAeMOEQ+T4aGhVifad7nyva+wMMyRjEXSBf0BQ1Yu/9nlKBi5Bcr Bszzo5RBnE6cclCNnCZeYKd/SMdQV9GDN36BOQuxTP4yRmcvGOPQzEy5ZiI70QBOcszlEv6PT eAwO0pnfwO8KJsAlCpfl5TOdAOankSZ97dd7ho3jH5FOo49gjVbKbFg4QNmeejwrw6g0d5Dks x3RVXYZGaalkxosI0vc/JrW/wey0+ISao5VbXpLLHmlpeBXXD2pc2hd7W5NSkqA9Eb8DhiNRQ 9iHG3n15A78un3AQDkE776j2krlUx812yCU6LwIWe6dI+Rz+yohLBUUe4cSj76R60D1LIk2Hk XVA+EmAn2MYTrs+JzTfTU6cUELszOLaDVQD9VVrM6RM Am 16.05.25 um 18:56 schrieb Rafael J. Wysocki: > On Fri, May 16, 2025 at 3:59=E2=80=AFPM Rafael J. Wysocki wrote: >> On Sat, May 3, 2025 at 12:29=E2=80=AFAM Armin Wolf wro= te: >>> Am 28.04.25 um 14:34 schrieb Rafael J. Wysocki: >>> >>>> On Mon, Apr 28, 2025 at 2:31=E2=80=AFPM Armin Wolf w= rote: >>>>> Am 27.04.25 um 00:52 schrieb Armin Wolf: >>>>> >>>>>> Am 26.04.25 um 15:12 schrieb Rafael J. Wysocki: >>>>>> >>>>>>> On Sat, Apr 26, 2025 at 1:20=E2=80=AFAM Armin Wolf wrote: >>>>>>>> Am 10.04.25 um 18:54 schrieb Armin Wolf: >>>>>>>> >>>>>>>>> The ACPI specification defines an interface for the operating sy= stem >>>>>>>>> to change the preferred cooling mode of a given ACPI thermal zon= e. >>>>>>>>> This interface takes the form of a special ACPI control method c= alled >>>>>>>>> _SCP (see section 11.4.13 for details) and is already supported = by the >>>>>>>>> ACPI thermal driver. >>>>>>>>> >>>>>>>>> However this support as many issues: >>>>>>>>> >>>>>>>>> - the kernel advertises support for the "3.0 _SCP Extension= s" >>>>>>>>> yet the >>>>>>>>> ACPI thermal driver does not support those extensions. Th= is may >>>>>>>>> confuse the ACPI firmware. >>>>>>>>> >>>>>>>>> - the execution of the _SCP control method happens after th= e driver >>>>>>>>> retrieved the trip point values. This conflicts with the = ACPI >>>>>>>>> specification: >>>>>>>>> >>>>>>>>> "OSPM will automatically evaluate _ACx and _PSV objects= after >>>>>>>>> executing _SCP." >>>>>>>>> >>>>>>>>> - the cooling mode is hardcoded to active cooling and canno= t be >>>>>>>>> changed by the user. >>>>>>>>> >>>>>>>>> Those issues are fixed in this patch series. In the end the user >>>>>>>>> will be able to tell the ACPI firmware wether he prefers active = or >>>>>>>>> passive cooling. This setting will also be interesting for >>>>>>>>> applications like TLP (https://linrunner.de/tlp/index.html). >>>>>>>>> >>>>>>>>> The whole series was tested on various devices supporting the _S= CP >>>>>>>>> control method and on a device without the _SCP control method a= nd >>>>>>>>> appears to work flawlessly. >>>>>>>> Any updates on this? I can proof that the new interface for setti= ng >>>>>>>> the cooling mode >>>>>>>> works. Additionally the first two patches fix two issues inside t= he >>>>>>>> underlying code >>>>>>>> itself, so having them inside the mainline tree would be benefici= al >>>>>>>> to users. >>>>>>> Sure. >>>>>>> >>>>>>> I'm going to get to them next week, probably on Monday. >>>>>> Ok, thanks. >>>>>> >>>>>> Armin Wolf >>>>>> >>>>> I am a bit ashamed of myself but i think we need to put this patch s= eries on hold after all :(. >>>>> >>>>> The reason of this is that i am confused by the ACPI specification r= egarding _SCP: >>>>> >>>>> 11.1.2.1. OSPM Change of Cooling Policy >>>>> >>>>> When OSPM changes the platform=E2=80=99s cooling policy fr= om one cooling mode to the other, the following occurs: >>>>> >>>>> 1. OSPM notifies the platform of the new cooling mode by r= unning the Set Cooling Policy (_SCP) control method in all thermal zones a= nd invoking the OS-specific Set Cooling Policy interface to all participat= ing devices in each thermal zone. >>>>> >>>>> 2. Thresholds are updated in the hardware and OSPM is noti= fied of the change. >>>>> >>>>> 3. OSPM re-evaluates the active and passive cooling temper= ature trip points for the zone and all devices in the zone to obtain the n= ew temperature thresholds. >>>>> >>>>> This section of the ACPI specification tells me that we need to eval= uate the _SCP control method of all ACPI thermal zones >>>>> at the same time, yet section 11.4.13. tells me that each _SCP contr= ol methods belongs to the individual thermal zone. > It just says "This object may exist under a thermal zone or a device" > so I don't see any contradiction. Section 11.4.13 says where it is > located and Section 11.1.2.1 says when to evaluate it. > > However, Section 11.4.13 also says "OSPM will automatically evaluate > _ACx and _PSV objects after executing _SCP" which is not arranged for > in your patch [3/3] IIUC. > > Thanks! This is incorrect, i do call acpi_thermal_trips_update() after setting _SC= P in cooling_mode_store(). Thanks, Armin Wolf